Make Assignment Mandatory
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 10:07 AM
I have writtten on submite client script
function onSubmit() {
//Type appropriate comment here, and begin script below
var currentState = g_form.getValue('state');
var assignmentGroup = g_form.getValue('assignment_group');
var assignedTo = g_form.getValue('assigned_to');
if (!assignmentGroup) {
alert('Please fill the Assignment Group.');
return false;
}
if (currentState === '6' || currentState === '3') { // Resolved or On Hold
if (!assignedTo) {
alert('Please fill the Assigned To.');
return false;
}
}
return true;
}
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 10:11 AM
Hi there,
You are sharing some piece of code, though... what's your question?
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field