script not working to assigned incident in sow creating by servicedesk
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
i created this script i want the assignment group to be the servicenow group is a person is a member of the servicenow group this is in SOW. but this wont work
function onLoad() {
// Check if the form is new (insert mode)
if (g_form.isNewRecord()) {
// Check if the user has the 'servicedesk' role
if (g_user.hasRole('service_desk')) {
// Set Assignment Group to sd_servicedesk (use sys_id)
g_form.setValue('assignment_group', '0963cdc8d09d0d80f9f07225f7aca5ce'); // Replace with actual sys_id
}
}
}
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Ensure the UI Type = All
and the View includes 'sow'