I want to implement a case in which incident should not get saved unitl and unless a kb is attached
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
//This should be only when assignment group is service desk.
//Here's the code I have written but when using this , it is throwing the error even after attaching the kb
function onSubmit() {
var kb=g_form.getValue('knowledge_base');
var assignmentGroup = g_form.getDisplayValue('assignment_group');
if (assignmentGroup && assignmentGroup.toLowerCase() ==='service desk'){
if (!kb){
g_form.addErrorMessage('You must attach a <b>Knowledge Base</b> before saving this incident');
return false;
}
}
return true;
}
0 REPLIES 0