Skip to main content

Tables in Dataverse can contain columns of different types. One of the column types is a “Lookup” to another table.

When you work with Lookups and View Filters in one environment, there are no issues. When you need to move your solution to another UAT or PROD environment (ALM), you need to take a few things into account.

Imagine that we have two tables:

  • Product: Contains products
  • Product Type: Contains types of products like: Books, Electronics, Garden, …

In the Product table, we want to create a Dataverse view “Products of type Books” that only shows products of type “Books”.

Every record in the “Product Type” has a GUID, which is very important. A GUID is a unique ID that identifies the record.

GUIDName
AXXX-XXXX-XXXX-XXXXBooks
BXXX-XXXX-XXXX-XXXXElectronics
CXXX-XXXX-XXXX-XXXXGarden

In our “Products of type Books” view, we show products. On the “Product Type” lookup column, we filter on “Books”.

As you see in the table above, the Product Type “Books” has a GUID.

When you move to another environment, the GUID of the “Books” record in the “Product Type” table receives another GUID. The Dataverse view filter remembers the old GUID, as a consequence, your view is broken.

Filtering a lookup column in a Dataverse view based on the text value

When you define your filter, you can choose to do the filter on the text value instead of on the GUID. When you move to another environment, your view filter keeps working because the GUID doesn’t matter anymore.

To change the advanced settings of the filters, click “Edit filters …”

Add an additional filter but choose choose “contains” instead of “equals”. This allows you to enter a text instead of choosing a lookup value.

When you are ready, you can delete the other filter.

Don’t forget to publish your view after editing.

Migrating your table records without changing the GUID’s

With some specific tools like XrmToolbox, you can migrate your table records in a way that the GUID’s are the same in every environment. Because the GUID’s don’t change the view doesn’t break.

XrmToolbox can be used without administrator right on your machine, you can just execute it.

“Data Transporter” is one of the libraries to migrate table records from one environment to another.

Quick tip: If you sort on the “All downloads” column, you can see all other popular libraries.

Wouter

Leave a Reply