The Zurich release has arrived! Interested in new features and functionalities? Click here for more

how to check current login user is in assignment group for incident table

subhashini6
Giga Contributor

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.

1 ACCEPTED SOLUTION

dhananjay21
Giga Guru

hi subhashini,

 

Please remove the quotes of true in the if statement and try it.

if (g_scratchpad.grp == true)

View solution in original post

5 REPLIES 5

i am just practicing g_scratchpad