Visibility of 'Confidential' field on Incident form

himanshu07
Tera Contributor

We have a field on Incident form "Confidential" and I have a requirement to control its visibility.

This field should be visible, if user CHANGES the Assignment group and he is a member of that group without saving the incident form

Please note, we already have one write and one read ACL which controls it's visibility but it works when the changes are saved.

I am thinking to write one  Onchange client script to complete this task, if this is the solution, please help me with the code.

 

Thanks in Advance ! 

6 REPLIES 6

 

I already did this. But I am concerned about the condition

//This condition is not correct. I want to see onChange, if user is a member of assignment group then make the field visible.

 

if (g_user.isMemberOf(g_form.assignment_group))

{

g_form.setVisible('fieldname', true);

}

 

ismember of cannot be used in clienr script,

 

Look at this post to see how to use it in client side

https://community.servicenow.com/community?id=community_question&sys_id=18e01ba9dbdcdbc01dcaf3231f9619cd

-Anurag