Best Method to make sc task state read only for 3 values(closed complete,closed skipped and incompl)

Dileep Raju
Giga Guru

Hi Team,

Best Method to make sc task state read only for 3 values(closed complete,closed skipped and colsed incomplete).

10 REPLIES 10

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Dileep Raju 

 

UI policy is OOTB and best one, but also depend the trigger condition.

*************************************************************************************************************
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 
Thank you for quick reply

It is not working in the list view. Please help me

For this you need to write the oncell edit client script.

 

Like this

 

function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
var saveAndClose = true;
if (newValue == 1) {
alert('High Impact cannot be set on a list view.');
saveAndClose = false;
}
callback(saveAndClose);
}

*************************************************************************************************************
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 
state should be read only for all three closed complete, closed skipped and incomplete..
Please help me