web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Migrating Related Data...
Power Apps
Unanswered

Migrating Related Dataverse Tables between Environments

(0) ShareShare
ReportReport
Posted on by 1,302

Hi

 

I have a Solution that contains two tables where one field in the first table is a lookup to a second table.

 

I have a Business Rule that takes the value of one field in a form based on the first table and depending up on the value of that field shows or hides a second field. 

 

The value of that field is actually sourced from the second table via Lookup view.

 

So one assumes that the GUID corresponding to the value in the second table in the DEV environment is not the same GUID corresponding to the value in the second  table in the UAT environment.  SO there fore the Business Rule will never fire because its looking for a GUID and the GUID is different in the UAT environment to the DEV environment.

 

Surely the Deployment Pipeline takes care of this ?  Doesn't it ?

 

Thanks

 

Nigel

I have the same question (0)
  • ivan_apps Profile Picture
    2,187 Moderator on at

    Not that i've experienced. Customizations are transferred over but not data. Your GUID is tied to the data on the environment, and if your business rule is dependent on a specific data value, then unfortunately i don't see how it would work.

    You could try a data import and enforce the GUIDs to be the same, but you probably want a more robust setup than being dependent on specific GUIDs.

    You can also update the target environment as a post deployment step to create an unmanaged layer on top of a managed solution, that way your GUID update is maintained.

  • NPrice99 Profile Picture
    1,302 on at

    Hi @ivan_apps 

    You say "a more robust setup".  What would "a more robust setup" look like ?

     

    What is "best practise" in this use case ?

    Regards

    Nigel

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @NigelP,

     

    I recommend using the Configuration Migration Tool to migrate configuration records where your customizations take dependencies on. 

     

    The GUIDs will be maintained when you import the config data into other environments so that any business rules / workflows or other processes will still work.

     

    You can store the Schema and data files produced by the tool in source control since its XML based so you can compare differences when you make updates to it.

     

    You can use the tool to manually import the zipped config data to another environment, or you could automate this as part of a CI/CD pipeline using the Power Platform Tools extension for Azure DevOps, or use the Power Platform (PAC) CLI directly using the PAC data import command.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Jonathan Manrique Profile Picture
    2,687 on at

    Hi @NigelP 

    I recommend using the DataMigration Tool or the similar XRM ToolBox tool to migrate records, otherwise when the business rules and workflow are passed they will fail because they will not find the record.

    It is one thing to migrate the components of the solution such as tables, web resources, etc. and another is to migrate data.

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    You can accept more than one post as a solution

  • ivan_apps Profile Picture
    2,187 Moderator on at

    I would say that best practice is not to create business rules that center around lookup values, unless you're ok making that a manual post-install step (config migration). I tend to prefer as simple as possible transfer from one environment to another.

    So instead of depending on a GUID (or lookup text), can you make it dependent on a Choice? You have more control that way over the way the values are stored. Is there a flag perhaps that you can set on the form that would trigger the show/hide event?  For example, say you want to show/hide fields if a user is a 'super user'.  Instead of setting the business rules based on user names/GUIDs, you would simply add a boolean marking your user a 'super user' and trigger your business rule on that Boolean.  Same effect, but now I've lost that dependency on a specific ID.

     

    Business rules do have a lot of limitations so if you're retrieving data from related fields to show/hide on your form, it would be best to switch to Javascript. 

     

  • NPrice99 Profile Picture
    1,302 on at

    Thanks @ivan_apps 

    Javascript is a no - no.

    Choice columns are not very flexible as you have to go back to the developer everytime you need to add a new value. Lookups are much more flexible as a Super User can add values to the reference data.

    The use case I have is I am looking at, is checking to see if a field in a form is a certain value (derived from a reference data) and then hide / show a second field.

     

    Regards

     

    Nigel

  • ivan_apps Profile Picture
    2,187 Moderator on at

    That is true, choices are more locked down for regular users by design. If you have constantly changing values, a lookup is best vs more constant values for a choice.
    I would be interested in seeing the definition of your Business Rule and how it relates to your Reference Data table, if you are showing and hiding based on values you may be running the risk of allowing a user to make mistakes on your reference data and triggering your business rule when you didn’t intend to or deleting your reference data if you didn’t lock down their delete permission. I would also confirm a GUID comparison is taking place vs a primary field text reference in the comparison.

    Ultimately it is your choice to decide how you want your deployment steps to go. If importing reference data to maintain data GUIDs is acceptable to you, no reason not to do it. After all it would be transparent to the end user so it only affects the person doing the initial solution deployment. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard