Record producer submit action restriction.

dhineshkumar
Tera Guru

Hi Team

 

I had created the record producer form with priority and urgency etc. When ever priority of the record producer selected high I don't want to submit the record. As when I click on the submit the button it should restrict the submit action.

Thank you.

1 ACCEPTED SOLUTION

AshishKM
Kilo Patron
Kilo Patron

Hi @dhineshkumar ,

Write catalog client script [ onSubmit] and check the priority value, if its high then return false.

 

You have to consider the priority lookup rule which is based on impact & urgency, so what ever priority you choose on record producer, when the record created in incident table, the lookup rule will apply. So better not to give this priority selection on RP form.

 

Example with urgency field as its available on create incident RP ootb.

 

 

if(g_form.getValue("urgency") == "1"){
return false;
}

 

 

 

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

View solution in original post

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @dhineshkumar 

 

You can use the UI policy / client script where priority is 1 , show error message and ask user to reduce the priority. but it is not recommended to add priority on record producer as for user every issue is P1. So ask only Urgency or Impact.   

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

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

Laszlo Balla
Mega Sage
Mega Sage

You can do this with an onSubmit client-script, in which you check the value of the priority variable, and abort the submission if it's high.

I am sure you can find several examples online to help construct the script.

Did you try this already? Did you run into any specific issues that you need assistance with?

AshishKM
Kilo Patron
Kilo Patron

Hi @dhineshkumar ,

Write catalog client script [ onSubmit] and check the priority value, if its high then return false.

 

You have to consider the priority lookup rule which is based on impact & urgency, so what ever priority you choose on record producer, when the record created in incident table, the lookup rule will apply. So better not to give this priority selection on RP form.

 

Example with urgency field as its available on create incident RP ootb.

 

 

if(g_form.getValue("urgency") == "1"){
return false;
}

 

 

 

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution