3.In change Form - Based on the Service selected , Assigned group has to be poppulate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 01:49 AM
Hi Team ,
we have requirement that , In change request , Based on the Service selected , that Service Support group has to be populate in the Assignment group .
See in the Below screenshot , Service is Firewall NonProd and the Support Group is TCS-Network-SUP >> And the Same support group has to be populate in the assignment group .
How to fulfill this requirment , can any one please provide script for this , Please provide screenshot for better understanding .
Please provide test cases screenshot
please provide configuration screenshots
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 02:04 AM
Answer already provided, both times you asked the exact same thing:
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 03:19 AM - edited 10-03-2024 03:21 AM
Hi @nameisnani
The non code way to do this is Assignment rule .
or by OnChange client script you can achieve the same.
In case of On Change client script; you need to create a script on change of "Service" in the script section add If logic to check if newValue == < the service you are trying to apply the logic for >
{
set value for assignment group field ( get value - service.supportgroup)
}
Kindly mark the reply as a correct answer / helpful if it helped to solve your question.
Thanks,
Anwesha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 03:50 AM
Hi @nameisnani
You can create onChange client script for change request table with field as "service". Below is the code
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if (newValue) {
var ga = new GlideAjax('ajaxUtils');
ga.addParam('sysparm_name', 'getServiceSupportGroup');
ga.addParam('sysparm_serviceId', newValue);
ga.getXMLAnswer(callSupportGrp);
}
function callSupportGrp(answer) {
var supportGroupId = answer;
g_form.setValue('assignment_group', supportGroupId); // set the field name correctly as per your field name
}
}
Script Include(client callable)
var ajaxUtils = Class.create();
ajaxUtils.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getServiceSupportGroup: function(){
var sprtGrp;
var serviceId = this.getParameter('sysparm_serviceId');
var grService = new GlideRecord('cmdb_ci_service'); // service reference field table name
if(grService.get(serviceId)){
sprtGrp = grService.support_group;
}
return sprtGrp.toString();
},
type: 'ajaxUtils'
});
Regards,
P Yaswanthi.
Please mark this response as correct or helpful if it assisted you with your question.