Issue with redirection on case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I have created one business rule so when i am testing that on case form sometimes that is redirecting to another page so how to stop redirection
Before/Inser, update
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hey @mania
add client script also
function onSubmit() {
var workNoteType = g_form.getValue('u_work_note_type');
var emailNotification = g_form.getValue('u_email_noti_type');
if (workNoteType === 'Customer Communication' && emailNotification === 'internal') {
g_form.addErrorMessage(
'Internal email notification is not allowed for Customer Communication.'
);
return false; // Stops save — NO redirect
}
return true;
}
*************************************************************************************************************
If this response helps, please mark it as Accept as Solution and Helpful.
Doing so helps others in the community and encourages me to keep contributing.
Regards
Vaishali Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hey @mania
try this business rule
(function executeRule(current, previous) {
if (!gs.isInteractive()) {
return;
}
var workNoteType = current.u_work_note_type + '';
var emailNotification = current.u_email_noti_type + '';
if (workNoteType == 'Customer Communication' && emailNotification == 'internal') {
gs.addErrorMessage(gs.getProperty('case.worknote.customer.internal.error'));
current.setAbortAction(true);
}
})(current, previous);
*************************************************************************************************************
If this response helps, please mark it as Accept as Solution and Helpful.
Doing so helps others in the community and encourages me to keep contributing.
Regards
Vaishali Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hey @mania
Hope you are doing well.
Did my previous reply answer your question?
If it was helpful, please mark it as correct ✓ and close the thread 🔒. This will help other readers find the solution more easily.
Regards,
Vaishali Singh
