The CreatorCon Call for Content is officially open! Get started here.

What's the easiest way to detect if a Risk Assessment has not been filled out?

frappe
Kilo Expert

What's the easiest way to determine if a Risk Assessment and been filled out and completed for a particular Change Request?

My process requires that the Business Rule named Calculate Risk is run by default for each update.   This means I can't use a simple method where say I check if the Risk field is empty since Calculate Risk will be looking for Risk Conditions and updating that field even though the user may not have filled out a Risk Assessment yet.

Ideally when the user clicks a Request Approval button it will check if the assessment has been completed and alert the user if not.  

Thanks

6 REPLIES 6

Hi,



You can modify the BR conditions or create a new BR/Client script to check for the Risk Assessment field.



Thanks,


Akhil



Hit Like/Helpful/Correct, if applicable.


ayman_h
Kilo Sage

From a BR or UI Action, try doing this

 

var riskAssessment = new ChangeRiskAsmt().hasCompletedAssessment(current);

if(riskAssessment){

//Risk assessment completed!

}else{

//Risk assessment not completed

}