- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2023 07:17 PM
Hi All ,
I have a requirement that in Change form in the related list Ui actions button 'new' and 'Edit' should not be visible in Authorize, Scheduled ,implement ,review and closed stage.
Please suggest how to achieve this.
In all below related list the New and Edit shouldnt be visible in these states.
Thank you In advance. @Ankur Bawiskar @Community Alums
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2023 07:57 PM
update as this
var answer;
if (parent.state.toString() == '-5'|| parent.state.toString() == '-4')
{
answer = false;
}
else {
answer = true;
}
answer;
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023 12:54 AM
Hi @ServiceNow10sun ,
Please try with below script, no need to declare answer as variable.
answer = (parent.state==-5 || parent.state==-4)?false:true;
If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.
If it helps please click Accept as Solution/hit the Thumb Icon.
Thanks,
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023 02:58 AM
For e.g. this is used on Incident table. Try to copy this:
if (parent.incident_state == 7)
true;
else
false;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023 12:01 AM
Hi Sunita,
Are you writing omit new/edit conditions as well as omit new/edit checkbox is true. If yes then try just with one. Either checkbox is true or only write conditions for omission.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023 01:22 AM
Omit new button and omit edit button is uncheck :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023 12:54 AM
Hi @ServiceNow10sun ,
Please try with below script, no need to declare answer as variable.
answer = (parent.state==-5 || parent.state==-4)?false:true;
If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.
If it helps please click Accept as Solution/hit the Thumb Icon.
Thanks,
Ratnakar