- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 10:07 PM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 12:00 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 10:21 PM
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
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 12:00 AM
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.