Related records customization

monishasp
Tera Contributor

How can we hide the "New" or "Edit" button in a related list for a Problem record that is Closed or Inactive using Out-of-the-Box (OOTB) functionality (without scripts)?

1 ACCEPTED SOLUTION

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @monishasp 

 

2 lines script is required:

 

 right click on the list header for Releases related list

2) Configure list control

AGLearnNGrow_0-1739474010058.png

 

 

3) Use Omit edit condition script and add this script

 

AGLearnNGrow_1-1739474009994.png

 

 

if(parent.state.toString() == '2') // change the state code
    answer = true// omit
else
    answer = false// show
 
Save the form and check.

Bring omit edit condition on form via form layout

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

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

View solution in original post

1 REPLY 1

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @monishasp 

 

2 lines script is required:

 

 right click on the list header for Releases related list

2) Configure list control

AGLearnNGrow_0-1739474010058.png

 

 

3) Use Omit edit condition script and add this script

 

AGLearnNGrow_1-1739474009994.png

 

 

if(parent.state.toString() == '2') // change the state code
    answer = true// omit
else
    answer = false// show
 
Save the form and check.

Bring omit edit condition on form via form layout

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

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