How to make the field 'Optional comment for checked elements' mandatory when failing the checked certification elements?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2018 04:11 AM
On Certification task form there is a ui macro(cert_task_data_button_row) field 'Optional comment for checked elements' above the certification elements list. We have requirements to make that field mandatory when someone clicks on the red '!' icon to fail the checked cert elements.
Does anyone know an way to do that?
I checked the following article with the same requirement, but no solution provided there-
https://community.servicenow.com/community?id=community_question&sys_id=624f3e69db58dbc01dcaf3231f961955
- Labels:
-
Instance Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2018 04:34 AM
Hi Arpan,
CHECK this link it will take you nearer to your answer
https://community.servicenow.com/community?id=community_question&sys_id=dd4dcba9db9cdbc01dcaf3231f961927
PLEASE mark my Answer as COrrect if it served your puprose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2018 05:08 AM
I have now found out a way to do it by 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");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2022 02:42 PM
Hi,
I have tried the mentioned function. it is not working.
Is there any other solution for it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 11:51 PM
Hi Arpan,
I need to implement same requirement. can you help me with the exact steps to configure this?
Thank you in Advance!!