The general idea is to define a role for a user similar to how User Personalization works, but allowing the user to have a different role assigned in another company. We attempted this using a custom table/page and subscribing to OnAfterInitialization (Codeunit System Initialization). Just in case, we also tried subscribing to OnCompanyOpenCompleted. Both events successfully change the role, but the changes do not take effect unless you reopen Business Central.
We tried replicating the behavior of the User Settings page, using:
sessionSetting.RequestSessionUpdate(true);
However, Business Central simply hangs when doing this.
Is there another way to accomplish this?
The purpose is to customize which fields a role can edit — for example, Item Description should be editable in a master company but not in a local company (using roles to enforce these restrictions).
Thanks in advance!
