How to remove "Add" button in the Related list once the change request is approved

gPadmavathi_04
Tera Contributor

Hello Guys,

I want to remove the 'Add' button in the Affected list once the change request is approved. but for me this button is displayed in the New State only, Can anyone please me with this?  

gPadmavathi_04_0-1706277746046.png

 

Regards,

Padma

5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @gPadmavathi_04 

 

In this case you need to update the condition on this add button.

 

LearnNGrowAtul_0-1706292579817.png

 

LearnNGrowAtul_1-1706292609633.png

 

Here you add condition

change.state!New  --> Sytnax need to update

LearnNGrowAtul_2-1706292664297.png

 

*************************************************************************************************************
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]

****************************************************************************************************************

Hi @Dr Atul G- LNG 

Added the above condition in condition yet it isn't working out 

Also, added my condition  ''current.state == -4 && current.state == -3 '' in the condition yet the button isn't showing up in the assess & authorize state.

 

Add button should be come up in New, Assess, Authorize

kindly help me with it

gPadmavathi_04_0-1706510391011.png

 

kindly help me with it

Hi @gPadmavathi_04 ,

 

Use parent instead current and also check other condition i.e  ChangeProposed(parent)).canAddCI() and also make sure this wouldn't affect options on the incident/Problem

i.e  gs.getProperty('com.snc.task.associate_ci').indexOf(parent.sys_class_name) > -1

 

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @gPadmavathi_04 

Seems the condition / state value come in single quotes. I am not a dev so can't help much.

@Sandeep Rajput  @Hemanth M1  can you provide your expertise here. 

*************************************************************************************************************
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]

****************************************************************************************************************