Data Certification-Make "Optional comment for checked elements" mandatory for failed elements

Mahesh120
Tera Expert

Hi,

 

I know it may not be a good idea to play around with OOTB functionality.However , would to know if there is a way where I can alert user to fill in "comments" without fail for the failed certification elements.Looked at the different UI Macros and UI Pages but not able to see from it gets controlled.

 

Any thoughts or other means of implementation?

 

--Mahesh.

16 REPLIES 16

Hi Mahesh,


Could you please share if you were able to accomplish this requirement?



Thanks,


Raghu


Hi Raghu,


I have used onLoad Client by checking the document.getElementById('fail_checked_elements') onclick function.


If no comments entered then alert user else continue to excecute the fucntion failCheckedElements().



Regards,


mahesh.


Thanks Mahesh for the input!   I appreciate it!


Hi Mahesh,

Could you please give more details, what you are getting by this  and how .document.getElementById('fail_checked_elements') 

Arpan6
Giga Guru

I have now found out a way to do it by directly amending the function failCheckedElements() in the UI script 'CertificationTaskScript' with the following script:

 

function failCheckedElements() {

var e = $("cert_comment");
if(e.value == 'Optional comment for checked elements'){
g_form.addErrorMessage(getMessage('Comment is required for failing certification elements'));
return false;
}
else{
g_form.clearMessages();
processCheckedElements(getCheckedElements(), "failElements");
}
}