to make script field read only on user criteria form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 05:20 AM
requirement : a user having knowledge manager and knowledge admin role can able to create user criteria but script field should be read only after advanced button is clicked on the user criteria form.
attempted solution:
i created one acl on the user criteria table ,write and create operation ,roles knowedge manager
i created one ui policy to make the script fied readonly
in ui policy:
table : user criteria
run script,executed if true:
g_user.hasrole('knowedge manger)
ui policy action : script field readonly true
but i cannot make script field readoly other actions like setmandatory or setvisible is working but set readonly is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2024 01:07 AM
Did you got fix for this issue, could you please share the fix details
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2024 01:14 AM
Hi @hifza and @Avinash_kurri1 ,
Simply create a onchange client script which sets the script field readonly onclick of Advance checkbox and if needed use g_form.hasroleExcactly to check for user role.
i hope this helps....
Sample code :
if(newValue == 'true' && g_form.hasroleExactly('knowledge_manager')){
g_form.setreadOnly('script', true);
} else{
// if any
}
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....