- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2022 03:50 AM
Hello Team,
I have few related lists on few Ticketing Modules. .and I want to remove "Edit" button on one of the related list on HR Form, based on some condition. For EX: if the ticket state is transferred, The below related list should not have "Edit" button available.
I tried to update the List control record directly by giving the "omit Edit condition" .however due to Application scopes vs Record scope mismatches , I could not save the record with my changes.
Hence , I wanted to remove the "Edit" button using a background script. Can someone please help me how can I write a background script to remove "Edit" button based on the below condition.
var answer;
if(parent.state == 9)
{
answer =true;
}
else{
answer = false;
}
Hi
Could you please check and assist on this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2022 05:25 AM
Hi,
you can try to check that as well in condition by getting the parent class name
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2022 04:13 AM
Hi
This should be applied to only HR Ticketing forms/table .What will happen if we change the table name to "m2m_kb_task".I am just thinking if this applies to all other modules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2022 05:25 AM
Hi,
you can try to check that as well in condition by getting the parent class name
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader