Caller`s Location field population while creating through Interaction.

Prashant Kumar6
Giga Guru

Hi Experts , 

 

I have created an Onchange client script on Incident form to auto populate the Caller`s location. Which is working fine when creating the Incident through Incident form.  However it is not working when the Incident is created through Interaction. Any Idea/ Suggestion? Below is the Onchange CS: Thanks in Advance. 

 

PrashantKumar6_0-1709791627019.png

 

1 ACCEPTED SOLUTION

Prashant Kumar6
Giga Guru

Got the reason,   The script was written on "On Change" type. 

Since  I was setting the Caller value through UI action while creating the Incident through Interaction it was treating it as a Onload. After changing the Client script to "On Change to Onload" it is working as expected . 
Also , As suggested by @Harish KM used Script include to get the location. Thanks. 

View solution in original post

2 REPLIES 2

Harish KM
Kilo Patron
Kilo Patron

Hi @Prashant Kumar6 place a alert like below after getReference line and see what value you get.

alert(reqByName);

also getReference is a very old method and no longer needs to be used, you need to use script include and client script with glideAjax call to retrieve answer as per best practice

Regards
Harish

Prashant Kumar6
Giga Guru

Got the reason,   The script was written on "On Change" type. 

Since  I was setting the Caller value through UI action while creating the Incident through Interaction it was treating it as a Onload. After changing the Client script to "On Change to Onload" it is working as expected . 
Also , As suggested by @Harish KM used Script include to get the location. Thanks.