Alert message for Risk Assessment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 03:53 AM
Hi All,
When am creating the change request i need to fill the Risk Assessment to calculate Risk which is shown under related list, so some users are not aware of this ,so i need some alert saying the users should complete the risk assessment which is mandatory which should prompt the users to the risk assessment related link, once completed and only then user can submit the change.
how can we implement this in the change form.
please suggest.
thanks
sid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 04:29 AM
Hi @siddharth26
You need to create OnSubmit Client Script for Change table.
function onSubmit() {
// Get the value of the risk assessment field
var riskAssessment = g_form.getValue('u_risk_assessment');
// Check if the risk assessment field is empty
if (!riskAssessment) {
// Show an error message
g_form.addErrorMessage('Please fill out the Risk Assessment before submitting the change.');
// Prevent the form from being submitted
return false;
}
// Allow the form to be submitted
return true;
}
This script will prevent the form from being submitted if the "Risk Assessment" field is empty and show an error message to the user. Please replace 'u_risk_assessment' with your actual field name.
Mark Helpful/Solution 🙂
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel