How to hide new/edit button on the related list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2015 05:47 AM
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.
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 @
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2015 05:56 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2015 06:11 AM
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2015 07:50 AM
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