- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 01:17 AM
How can I hide fields based on role?
For example, I have a support team for which I don't want to show all the fields but managers can able to see all the fields. please help me out
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 01:35 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 01:21 AM
Hi Amit,
You can write Client script and below code(make changes as per your requirement).
function onLoad()
{
var role_check = g_user.hasRole('Mention the Role Name');
if(role_check == true){
g_form.setDisplay('Field Name', true);
}
else if(role_check == false){
g_form.setDisplay('Field Name', false);
}
Please mark my answer Correct Or Helpful if applicable.
Thank you
Mzhar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 03:38 AM
is it possible without scripting..
because someone told you can do that from business rule, i tried but i unable to do..
is it possible through business rule, if yes then please provide answer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 03:49 AM
Hi Amit,
If you want to do with business rule then you can take condition as when to run - Display and in Advance put the same script.
You have to use the script, to hide/show fields.
Rather than use the Business-Rule the recommended way to hide/show fields is a Client-Script.
Please mark my answer Correct Or Helpful if applicable.
Thank you
Mzhar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 03:51 AM
Hello,
Business rule is a server side script and it can't hide the fields....
Thanks
Murthy