Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

Solutions, Business Units, Environments & Structuring Security

(0) ShareShare
ReportReport
Posted on by 43

Can business units be included in solutions so they can be transferred between environments or is the recommended setup to define an environment, then the business units that apply to that environment and within that environment use solutions to further refine security using roles, teams and users that apply to tables, apps? 

  • Suggested answer
    Fubar Profile Picture
    7,883 Super User 2025 Season 1 on at
    Solutions, Business Units, Environments & Structuring Security
    The vast majority of things in Dataverse work based on the records GUID (not the display name). As you manually created the BU's the GUID's will be different to those in your other environment (other than the Root BU) - so if you are referencing the BU in other objects they will generally be trying to find the GUID (which doesn't exist).
    Generally, I would import the BU's (I also usually do the same thing with Teams):
    • In the source environment use Export to Excel to export the BU's
    • The first 3 columns are hidden in the Exported file, unhide them (the GUID is in column A)
    • Remove Column B & C
    • Remove the row for the Root BU (the root bu already exists in the Target environment)
    • For the rows that are the first level in the BU hierarchy, update the Parent BU to be the name (or the GUID) of the Root BU in your target environment.
    • Copy to another Excel File, then save the new file as either CSV or XML 2003 format. (this copy is so when import the file you get the option to change the mapping during the import in the next step)
    • Import into your target environment, when you import update the Mapping and set the column that holds the guid to map to the Primary Key (note: not primary name) field, if not obvious the primary key field is the tablename with an id suffix. (this mapping to the primary key field is what makes the guid's the same in both environments)
     
  • Suggested answer
    ShondaT Profile Picture
    228 on at
    Solutions, Business Units, Environments & Structuring Security
    @Michael E. Gernaey Hi again, I believe I have resolved my earlier issue, however, another one has sprung up. I believe it is related to the Business Unit I created in my Dev environment. I understand that Business Units cannot be migrated over within a solution so I chose to create it in my Test environment manually, I used the exact same name as the one in dev. I have multiple requests types in my solution. One request type is Printing and Binding which is a request for those who reside within the new business unit I created. When I submit the request, I get this message:

    Sql error: Statement conflicted with a constraint. The INSERT statement conflicted with the FOREIGN KEY constraint "business_unit_ma_intakerequest". The conflict occurred in database "db_crmcorenam_20230406_12552116_5f3a", table "dbo.BusinessUnitBase", column 'BusinessUnitId'.
    The statement has been terminated. CRM ErrorCode: -2147185375 Sql ErrorCode: -2146232060 Sql Number: 547
     
    The only difference I see, and it is a logical one, is that the business unit in dev is associated with the root business unit called ofsco.dev while the business unit in the test environment is associated with the root business unit called ofsco.test.
     
    If this is another issue you recommend I reach out to Microsoft about, I will definitely attempt to do so.
     
    Thank you,
     
    -Shonda-
  • Verified answer
    Michael E. Gernaey Profile Picture
    42,122 Super User 2025 Season 1 on at
    Re: Solutions, Business Units, Environments & Structuring Security

    Hi,

     

    In the traditional sense no they aren't components so they don't get "added" to a solution, they are Data and have to be treated as such. However, they can be

    a) manually made

    b) manually imported

    c) Treated like Domain/Sample data and be installed as part of an install package that way. 


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

Overall leaderboard

Featured topics