- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 11:08 PM
we need to update the caller id field when ever user change the assignment group filed using business rule how we can achieve this
any code plz provide
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 11:33 PM
Yes you can do that
In client script
g_form.setValue('caller_id', g_user.userID); //sets the current logged-in user
In server script
current.setValue('caller_id', gs.getUserID()); //sets the current logged-in user

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 11:18 PM
Hello Sandeep,
Could you share more information on the requirement please? Caller ID identifies the user who created the incident and should ideally remain the same throughout the incident's lifecycle.
Keeping that aside you can use a before insert/update business rule to achieve this requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 11:23 PM
yes we need to populate the user who changes the assignment group field those user name should populate over there instead of who created the record in incident and assigned to the caller id field and how we can achieve this. using bsiness rule
need code for that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 11:20 PM
You can do it in multiple ways
1.) Write onChange() client script on Assignment group, upon each change set the caller_id value in script
if(newValue) { //If assignment_group newValue is not empty
g_form.setValue('caller_id', '<value>');
}
2.) Write a before business rule with the condition as assignment_group changes, and set the caller_id accordingly in the script
if(current.getValue('assignment_group') != ''){
current.setValue('caller_id', '<value>');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 11:27 PM
thanks for the information and in need one more on this .
when any user come and change the assignment group then we need to populate that user name in caller id field instead of who created that record .