- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2019 12:06 PM
How to Visible Field based on user role (LIKE : change _manager) on change request ?
Scenario : When ever Change manger group members login that time only one more extra field (Like : Author side ) field visible. Please help me ....
Thanks,
Ram
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2019 08:19 AM
It's really quite messy to use a UI policy here I would recommend an onLoad client script or an ACL.
However if you simply must have a UI policy then you can create one with a condition that is always true
like number is not empty
reverse if false is off
run scripts true
Execute is true script
function onCondition() {
var hasRole = g_user.hasRole('change_manager');
if (hasRole ==true) {
g_form.setVisible('u_ram', true);
} else{
g_form.setVisible('u_ram', false);
}
}
I have tried this in a dev instance and it's fine but you are really better off using an ACL or client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2019 09:25 AM
Wow ok....I gave the exact script to use and mentioned even in my post that it can be used in UI policy or Client Script.
Either way, glad you got a response, but for those looking at this thread. I covered UI policy and my script DOES work.
Thanks...
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2019 09:42 AM
Yes ...its working as we expected.. Thanks a lot...
Thanks,
Ram
