Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

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

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

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

View solution in original post

1 REPLY 1

Dr Atul G- LNG
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

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