How to hide new/edit button on the related list

Atul Kumar2
Giga Guru

Hi Team,

I am struggling while creating the ACL,s and List control however my goal is not getting fulfilled.

I want to hide the button new/edit on the incident console in problem related list when incident is resolved. I am unable to do it.

Capture5.PNG

Could you please guide me on this. Please look below created ACLs on the problem form.

I have putted the below code in the script section.

if(current.parent.state==6)

{

answer=false;

}

Regards,

Atul Kumar @

3 REPLIES 3

marcguy
ServiceNow Employee
ServiceNow Employee

hi you want to use list control to control the new/edit button on the related list, use the Omit New condition to write a script to check the parent incident.


Configuring Lists - ServiceNow Wiki


list edit ACL is for when you want to restrict whom can edit records when looking at a list of records.


namita_oberoi
Giga Contributor

Hi Atul,


You can write the below script in New Condition and Edit Condition field of List control.


if (parent.state == '6') // Assuming state 6 is resolved.


      {


      answer =   true;


}


else


      {


      answer = false;


}


Wow..... It works.!! the same code i was trying but it was not going through i guess i was not giving a single quote in state value 6.



Thanks Namita Oberoi & mguy for your help.



Regards,


Atul Kumar