How can i assign the security roles of any fields, section, tab and form of any entity according to specific users?
*This post is locked for comments
How can i assign the security roles of any fields, section, tab and form of any entity according to specific users?
*This post is locked for comments
Try with the below code for hiding section
Show a section
Xrm.Page.ui.tabs.get(“tabname”).sections.get(“sectioname”).setVisible(true);
Hide a section
Xrm.Page.ui.tabs.get(“tabname”).sections.get(“sectioname”).setVisible(false);
Thanks, btw i am just asking that same code is used to hide and show the section?
You have to use the same code just you need to check in if and else condition for the security role and hide show the tab accordingly
False to hide and true to show the tab
Xrm.Page.ui.tabs.get("DETAILS_TAB").setVisible(false)// to hide
Xrm.Page.ui.tabs.get("DETAILS_TAB").setVisible(true)// to show
Thanks Shahbaaz,
Appreciate with your answer and if i want to hide section then same way is need or there is different way to hide section?
Please check this link for remove {} from guide, it will solve your problem
What is the use of slice function in userId var?
When i apply the code it gives an script error and screenshot is attached above then now how can i remove this error?
It will be global admin + system admin who create the trial account.
Also you can create new users and assign them roles you want from setting
Regards,
Shahbaaz
Thanks Shahbaaz,
Would you please tell me that when i make a trial account in D365 then default role is system administrator or else?
False to hide and true to show the tab
Xrm.Page.ui.tabs.get("DETAILS_TAB").setVisible(false)// to hide
Xrm.Page.ui.tabs.get("DETAILS_TAB").setVisible(true)// to show
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156