in client script>> Onchange
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 05:16 AM
Hi to all,
I need answer, here my question is
in client script>> Onchange on incident form
Q). if category is 'network' then assignment group has to auto populate as network group?
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 09:50 PM
Hi @nagarjunadn ,
Can you try by using Assignment lookup rule to populate group based on category?
Navigate to-> Assignment lookup rules under System policy.Table: dl_u_assignment
Sample OnChange script:
- Type: onChange
- Table: Incident
- Field: category
function onChange(control, oldValue, newValue, isLoading) {
// Ensure this runs only when the category is changed and not during form loading
if (isLoading) return;
// Check if the category is "Network"
if (newValue == 'Network') {
// Set the assignment group to the network group
g_form.setValue('assignment_group', 'Network Group Sys ID');
}
}
Thanks,
Pradeep
"If this response was useful, please select 'Accept as Solution' and mark it as 'Helpful.' This helps me provide better answers and assists the community ".
Regards,
Pradeep
Regards,
Pradeep
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 10:47 PM
Hi @nagarjunadn
Please Use Assignment Lookup rules to set assignment group based on category.
********************************************************************************************************
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.
********************************************************************************************************
Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.
********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect
Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************