- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2023 10:52 PM
Hi All,
Can anyone please help me with a client script ?
Requirement :
If user select assignment group in incident then show alert message, alert message should have the name of the assignment group manager and assignment group name.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 10:58 AM
@jayaprakash1998 Here is how you should configure an onChange client script on your incident form.
Here is the script.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
var assignment_group = g_form.getReference('assignment_group',callback);
function callback(group){
g_form.setValue('assigned_to',group.manager);
var manager = g_form.getReference('assigned_to',anotherFunc);
function anotherFunc(caller){
alert('Group Name: '+group.name + ' Group Manager: '+caller.name);
g_form.clearValue('assigned_to');
}
}
}
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 08:00 AM
Hi @Utpal Dutta thankyou this is very helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 10:42 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 10:58 AM
@jayaprakash1998 Here is how you should configure an onChange client script on your incident form.
Here is the script.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
var assignment_group = g_form.getReference('assignment_group',callback);
function callback(group){
g_form.setValue('assigned_to',group.manager);
var manager = g_form.getReference('assigned_to',anotherFunc);
function anotherFunc(caller){
alert('Group Name: '+group.name + ' Group Manager: '+caller.name);
g_form.clearValue('assigned_to');
}
}
}
Hope this helps.