How to create a popup message when a change request is HIGH RISK?

Shirley Bribon
Tera Contributor
 
4 REPLIES 4

Tony Chatfield1
Kilo Patron

Hi, I would use an onload() client script hat checks the content of the 'risk' field and adds popup or message when conditions are met, and also an onchange() client script that checks the new value of the risk field and adds similar popup\message.

this is the sample script on Client Script for Risk assessment

 

function onLoad() {
if (g_user.getClientData("run_risk_asmt") === "true")
new ChangeRiskUiActionControl().invokeAssessment();
}

 

 

can you help and give me sample on how to execute a popup message if Risk= HIGH?

 

Thank you!

Hi, something like this

function onLoad() {
   var myRisk = g_form.getValue('risk');
   g_form.addInfoMessage('Risk value ' + myRisk);

   if(myRisk == '2') {
   g_form.addInfoMessage('Current risk = high | ' + myRisk);
   }   
}

Thank you will try this in non prod and let you know! 🙂