‘New’ button hide for change task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 07:06 AM
Hallo,
I want to be able to create a change task with the ‘New’ button, but only if the (parent) change has the status ‘New’, ‘Assess’, ‘Authorise’, ‘Scheduled’ and ‘Implement’.
Displaying it worked via List Control.
Do you have any idea how I can hide the ‘New’ button on the change task? So if the (Parent)Change has the status ‘Review’, ‘Closed’ or ‘Canceled’ the ‘New’ button has to be hidden in the change task
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 07:13 AM
Steps
1) right click on related list Configure -> List Control
2) Use Omit new condition script field (if this field is not on form then add it on form)
3) script to be added in that script field
if (parent.state.toString() == '0' || parent.state.toString() == '3' || parent.state.toString() == '4')
answer = true; // omit when closed, cancelled or review
else
answer = !parent.active; // show only if CHG is active
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader