- My View
im working on the risk calculation i know that when you click the calculate risk link UI action , the new risk is calculated and displayed as a message. i want to do exctly the same but do it immediately recalculates the risk if any field (Change Environment, Impact, or Affected CIs) are changed. i was thinking of doing an onchange client script for those 3 fields and call the UI action to recalculate the risk. any help please
I would do a Business Rule that checks for those conditions, then use the same code that the UI Action uses to calculate the risk.
Anytime you can offload processing to the server, instead of the client, that is preferred.
Thank Jusitn, do you mind goving me an example to get started. I am kind of new to this so i still struggle.
Custom business rule idea:
CONDITION: Change Environment changes OR Impact changes OR Affected CI changes
var scr = new SetChangeRisk(); scr.setRisk(current);
OR, you could modify the glide.ui.risk_calculate_rule property to use 'business_rule' instead. To do this...
1) Type sys_properties.list in the left-side navigation filter.
2) Search for the glide.ui.risk_calculate_rule property.
3) Change the value to business_rule
4) Save the property.
Hope that helps.