- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2019 09:31 PM
hi
i write the business rule for display like this
var grpname = current.assignment_group.getDisplayValue();
gs.addInfoMessage(grpname);
g_scratchpad.grp = gs.getUser().isMemberOf(grpname);
and write the client script onload
function onLoad() {
alert(g_scratchpad.grp);
alert("Hello1");
if (g_scratchpad.grp == 'true'){
alert("if con");
g_form.removeOption('state', '6'); //closed incomplete
g_form.removeOption('state', '7'); //closed skipped
}
else
{
alert("else con");
}
}
but ever time it is going to else block only.
when i am giving the alert(g_scratchpad.grp); the value is displaying true only.
where was the wrong in my code can u tell me any body.
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2019 09:50 PM
hi subhashini,
Please remove the quotes of true in the if statement and try it.
if (g_scratchpad.grp == true)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2019 10:21 PM
i am just practicing g_scratchpad