How to use sysparm_referring_url from incident.do?

juliechen
Kilo Explorer

when I use incident.do with sysparm_referring_url=sys_user.do%3fsys_id..., how can I get location for this user populated on the new incidence?

1 ACCEPTED SOLUTION

Julie, ok I see what you are referring to now.   The out of the box "(BP) Set Location to User" client script on incident that populates the location from the caller is set as an onChange script.   In this script there is the following (best practice):


if (isLoading)


          return;



What this means is when the form is loading, the script stops.   So in the case of CTI, the caller is populated as/before the form loads, thus this script never executes.   My recommendation is:


  1. Clone this out of the box script (deactivate original so you won't impact upgrades) and modify it to check for the existence of a caller and populate
  2. Create a new onLoad script to check for the existence of a caller and set it.

View solution in original post

7 REPLIES 7


Michael,



Yes. When you use CTI with one caller_id, if there is no incident under this caller, it will be directed to new incident page; if there are incidents under this caller, it will be directed to user page (sys_user.do) with incident list under there. If you click New button on this incident list area, the field "location" won't be populated at the new incident page.



I hope I described clear.



Thanks!


Julie, ok I see what you are referring to now.   The out of the box "(BP) Set Location to User" client script on incident that populates the location from the caller is set as an onChange script.   In this script there is the following (best practice):


if (isLoading)


          return;



What this means is when the form is loading, the script stops.   So in the case of CTI, the caller is populated as/before the form loads, thus this script never executes.   My recommendation is:


  1. Clone this out of the box script (deactivate original so you won't impact upgrades) and modify it to check for the existence of a caller and populate
  2. Create a new onLoad script to check for the existence of a caller and set it.

Michael,



Thank you very much!   I took your suggestion, it works well.