Risk Assessment Ui action

ryadavalli
Tera Expert

Hi,

We have Risk Assessment UI action, when I change   the values on the questionnaire, and submit, it gives me 'leave page or stay' message. Not sure why?

7 REPLIES 7

pvet
Giga Guru

Hi Ravali



I've had this same issue. After the Geneva upgrade the Risk Assessment gave a 'leave page or stay' message. The cause was that we've modified the out-of-the-box UI action 'Fill Out Risk Assessment'. Due to those changes, this script wasn't updated when Geneva was installed, and Geneva has some changes.



I've fixed this issue by copying a (new) 'Fill Out Risk Assessment' UI action from a fresh Geneva instance, and modified it to our changes again. That fixed my issues.



Kind regards,



Pim


Helsinki/Genea version of code did not work for us and it introduced other issues. I have updated the onsubmit function of UI page survey_take.do as below to resolve this issue.



function onSubmit() {


  g_form.modified=false;


  this.mandatoryResult = g_form.mandatoryCheck();


  return this.mandatoryResult;


}




Mark it as answered, if this solution works for you.


shloke04
Kilo Patron

Hi,



From Geneva onwards, OOB UI action "Fill out Risk assessment' has been changed. Below modification in the code can help:



Change the function name from "invokeAssessment" to say "invokeAssessment_custom();" and comment out the below lines defined in the function "invokeAssessment_custom();" .



var d = new GlideOverlay({


  title: 'Risk Assessment',


  form: 'survey_take'


      });


      d.setPreference("sysparm_task_assessment", taskAsmtID);


      d.setPreference("sysparm_survey", assessmentName);


      d.setPreference("sysparm_survey_update", "false");



Hope this help. Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke