when ever the assignment group changes we need to update the caller id filed using business how we can achieve this

Sandeep74
Tera Expert

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

1 ACCEPTED SOLUTION

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

View solution in original post

6 REPLIES 6

Annay Das
Tera Contributor

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.

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

 

Sai Kumar B
Mega Sage
Mega Sage

@Sandeep 

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>');

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 .