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 / Solutions, Business Un...
Power Apps
Unanswered

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? 

I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,335 Super User 2025 Season 2 on at

    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

  • Suggested answer
    ShondaT Profile Picture
    228 on at
    @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-
  • Suggested answer
    Fubar Profile Picture
    8,338 Super User 2025 Season 2 on at
    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)
     

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