Using “display” business rule and “g_scratchpad”, if the logged in user is part of “Database” group then populate Description as “Display business rule applied for Database group”.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2022 11:04 PM
hi
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2022 11:31 PM
Hi,
It is as follows. Mark my answer as correct if that helps.
Business rule.
Display Query Business rules
(function executeRule(current, previous /*null when async*/ ) {
g_scratchpad.grp = gs.getUser().isMemberOf('sys_id of the group');
})(current, previous);
Client script :
if((g_scratchpad.grp.toString() == 'true'))
{
g_form.setValue('description', "Part of Database group");
}
Please hit like and mark my response as correct if that helps
Regards,
Musab
Regards,
Musab
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2022 11:38 PM
HI Bavisetty Hemasri,
You can write script like below in display BR:
g_scratchpad.description = "";
if(gs.getUser().isMemberOf('Database')){
g_scratchpad.description = "Display business rule applied for Database group";
}
IN Onload client script:
If(g_scratchpad.description!=""){
g_form.setValue("description","Display business rule applied for Database group");
}