How to Bind Organizational Roles


I have a requirement to bind Organizational Roles to the package. I have come across some similar questions on academy and found that we can use SQL script to perform the same. Could someone please help with this if they are familiar with this approach or have done this activity previously. Thank you

Like 1





Thank you for your question. 


Please, note that it's not recommended to bind users, organizational structure, roles, licenses, and other administrative things to a package. It will be very hard to handle that if you decide to install that package after the moment when the client adjusts that administrative things according to his or her needs directly on the production.


Unfortunately, there is no script we could provide you with but in case you decide to bind this data and transfer it to another environment we suggest checking all changes on the copies before delivering it to the production websites. The organizational structure is in the "SysAdminUnit" and "SysAdminUnitInRole" tables and you are right, it's possible to bind it to the package via SQL scripts only.


Best regards,


We usualy do the following:

Create separate package for Roles

1. Add Data for SysAdminUnit 

2. Add Data for SysUserInRole

Before you install the package

Switch off trigger TRSysAdminUnitRoot in table SysAdminUnit (otherwise it will block adding new roles)

Install the package


Switch on trigger TRSysAdminUnitRoot in table SysAdminUnit

And always remember, that deleting of data cannot be transfered without SQL script

Show all comments