- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Not sure if this got posted or not, so sorry if I'm repeating myself.
I'm attempting to remove the New Button from the Change Request's related list Change Tasks when the change ticket has been approved.
I've read many of the posts about updating the "List Control" item, and have done this.
if (parent.state.toString() == '-5' || parent.state.toString() == '-4' || change_request.state.toString() == '-3' )
answer = true;
else
answer = false;
gs.info("The answer is "+answer+" for parent state of "+parent.state)I've checked the logs to validate that the script is catching the right values and have validated that when the change request is in New, Assess, or Authorize the value being returned is True.
Conversely, if the state is Implement, Scheduled or Closed, the value logged is false.
But still the banner NEW button appears on the related list no matter the Change's state.
I've also attempted to update the Create ACL
This ends up preventing any user from creating a Change Task at any state.
I need help understanding why the New button remains available.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
46m ago - last edited 32m ago
I found my issue.
Someone had removed the Conditions on the GLOBAL New UI Action for Related Lists.
Once I added this back to the UI Action, the suggested List Control script worked.
Thank You all for you pointers and process suggestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
answer = true -> means omit the button
answer = false -> means don't omit the button
you need to use parent object to access the CHG state value
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @EricG2
From a process perspective, I don’t think it’s an valid ask. The reason is that a task can be needed until the change is closed. If the change fails, it might be necessary to involve another team or record some action. There is no option to create a new task.
So use OOTB way and avoid technical debt.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
48m ago
Thank you for the suggestion and I can see your point.
But in this case, we have users adding task after they have been discussed in 2 Change Review meetings and they are getting missed by the affected teams.
Also, we are a highly audited company and it has been a "Ding" on our audit reports.
