- 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-17-2023 11:16 PM
I dont want to omit new button. I want to omit add button.
- 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-18-2023 09:04 PM
Thank you @SunilKumar_P . It has worked perfectly fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 02:17 AM
What is the latest on this, where you stuck.
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]
****************************************************************************************************************