How to customize OOB copy Incident UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2022 08:29 AM
Hi all,
When we click on OOB Copy incident UI action it will create new incident by copying some field value from old incident form. In our case the assignment group field value also got copied from old incident to new incident from, but the assignment group is not active now and there is no member in that group,
Is there any way to restrict the inactive assignment group getting copy into new incident from old incident while clicking on COPY Incident UI action.
Is there any possible ways to do that?
we are using OOB UI action we have not yet customized that.
Anyone can help me on this,
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2022 09:03 AM
@Community Alums You can create the exact duplicate of the ui action and keep order less than the OOTB one. Then UI action you created will override the OOTB.
Your ui action will be visible on the form.
Do required changes in your UI action.
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2022 09:05 AM
@Community Alums
You control this feature through the "incident properties"
If I helped you with your case, please click the Thumb Icon and mark as Correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2022 09:11 AM - edited ‎12-21-2022 08:20 AM
@Community Alums
I think you should opt to leave the out of the box UI action intact and, as a good measure, have a business rule that checks if the assignment_group is active (or empty, or no itil type, etc.) BEFORE saving the record. If not, then abort the saving.
If I helped you with your case, please click the Thumb Icon and mark as Correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2022 05:08 AM
I have tried the below on Submit client script but it is not working for ITIL users
function onSubmit() {
var a = g_form.getReference('assignment_group');
var cal = g_form.getValue('caller_id')
if(g_user.hasRole("itil") || g_user.hasRole("sn_incident_write") || cal == g_user.getUserID ){
if (a.active == 'false'){
g_form.showFieldMsg('assignment_group', 'Invalid assignment group', 'error');
return false;
}
}
Can you please help me on this or provide Business Rule