- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 01:03 AM - edited 12-17-2023 11:26 PM
Hi Community,
I want to remove add button from one of the related list under that when change is requested for approval i.e. when state changes to assess, add button in this related list shouldn't be visible at all or when change is submitted for approval after that add button shouldn't be visible on this related list.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 12:18 AM - edited 12-18-2023 04:39 AM
Hi @Poorva Bhawsar ,
If you want to hide the "Add" button, then you need to modify the "Add" UI action on task_cmdb_ci_service table as per your conditions. If you want to modify this only for change_request, then remove 'change_request' from the 'com.snc.task.associate_ci' system property and add the UI action condition as below:
current.canCreate() && RP.isManyToMany() && parent.active == true && (gs.getProperty('com.snc.task.associate_ci').indexOf(parent.getTableName()) > -1 || (parent.getTableName() == 'change_request' && parent.state != '-4'))
//Assuming Asses state choice as -4
Regards,
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 02:41 AM
Please share screen shot for reference please. Seems some miscommunication.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
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/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2023 11:19 PM - edited 12-17-2023 11:25 PM
After change request is submitted for approval. Add button shouldn't be visible for impacted services/cis related list on change form.
I want to remove/hide add button once change request is submitted for approval.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 01:48 AM
Hello @Poorva Bhawsar ,
Please refer to the below article which might can help you to resolve you query.
- How to remove the "Add" button from a related list
- How to remove the "Add" button from a related list
Let me know your views on this or if you have any further queries.
Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Regards,
Aniket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 02:07 AM - edited 12-17-2023 11:26 PM
I have already checked this. I only want to remove this button once change request submitted for approval.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 02:51 AM
Hi @Poorva , Can you try the below script in Omit new condition script box? This is to omit the new button based on the Parent state.
Omit new button is TRUE and below script