applying UI Policy only for specific user group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2018 08:49 PM
Hi,
how to write a filter condition based on current user group membership when applying UI policy.
the filter condition is: if current user is member of group X, then do apply some UI policy
I found a code snippet:
if(gs.getUser().isMemberOf(group_X_sys_id)){
//Do something...
}
but how do I put the code into the condition filter box?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2018 11:38 PM
Use client script to achieve this.
Write below code in Display BR. inside isMemberOf() provide sys_id in quotes
g_scrathpad.isMember = false;
if(gs.getUser().isMemberOf(group_X_sys_id)){
g_scrathpad.isMember = true;
}
Write below code in onLoad client script
if(g_scrathpad.isMember){
g_form.setReadOnly('text_field_name',true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2018 01:05 AM
when to run the BR? is it on Display, Before, After or Async?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2018 01:31 AM
Display
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2018 01:34 AM
In Display business rule there is no before or after. It always runs when form is just loaded. Just select display BR.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2018 01:37 AM
YEs only display business rule