Set Category and Subcategory for MIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 07:28 AM
Hello Team,
Need Help.
Whenever Proposed Major Incident is created by "ABC" group member then set Category as Remote and Subcategory as "Unknown" and Assignment group as "XYZ" group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 07:48 AM
Hi @rmishra4395 ,
You can create before business rule like below.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 08:00 AM
But assignment group is mandatory field i cannot save the form without selecting assignment group, so whenever "ABC " agent will create candidate manually at that time assignment group should get autopopulated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 08:09 AM
This will be taken in in BR. If ABC person create ticket then it will set the value although if user set different cat and sub cat.
If you want the same to be work on client side then do the below.
- Create on change client script and call script include to check whether user belongs to ABC group or not. If belongs then return true else return false.
- In client script set the filed value using g_form.setValue(); if it come true from backend.
Check this link to make ajaxcall from client side: https://servicenowwithrunjay.com/glideajax-in-servicenow/
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 08:17 AM
I have written Script Include
var CheckUserInSMC_NOC = Class.create();
CheckUserInSMC_NOC.prototype = {
initialize: function () {},
isUserInGroup: function (userID) {
// Define the sys_id of the SMC_NOC group
var smcNocGroupSysID = '1412ba851b18b9100f9d43f8ab4bcb41'; // Replace with your SMC_NOC group sys_id
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('group', smcNocGroupSysID);
gr.addQuery('user', userID);
gr.query();
return gr.hasNext(); // Return true if the user is in the group
},
type: 'CheckUserInSMC_NOC',
};
On load client script
but it's not working