Omit Edit Condition Query?

jaisankar
Mega Contributor

Hi All,

My Omit Edit Condition Script is not Working as expected?

The Edit Condition Should Omit if the current logged in user is part of the incident assignment group.

Below is the Script!

var answer;
if(gs.getUserID().isMemberOf(current.assignment_group))
{
answer=false;

}
else{
answer=true;

}
answer;

It is not working. It removed the Edit Option for the incident assigned to myself and i'm part of that assignment group!

Can anyone correct me if i'm wrong?

Thanks in Advance!

Prem

1 ACCEPTED SOLUTION

Update this line if(gs.getUserID().isMemberOf(current.assignment_group))

with

if(gs.getUserID().isMemberOf(parent.assignment_group))

View solution in original post

5 REPLIES 5

Shashikant Yada
Tera Guru

Could you please share the screenshot, where you want to apply this condition, on the related list or list view?

jaisankar
Mega Contributor

Hi Yadav,

 

Please find the attached Screenshot. I'm trying to apply this script on Attached Knowledge (Related List) List control.

find_real_file.png

Please let me know if you need more details on this?

Regards,

Prem

Update this line if(gs.getUserID().isMemberOf(current.assignment_group))

with

if(gs.getUserID().isMemberOf(parent.assignment_group))

jaisankar
Mega Contributor

Thanks.That works

May i know why do we use "Parent" instead of "Current"?