The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Service Desk Call "Caller" overwrites user record

shane_davis
Tera Expert

Hi,

        We are looking into using the Service Desk Call application so we have activated the plugin in Sandbox and added the caller's location and phone number fields to the form.   One thing that we've noticed is that when we change the location and phone number (user not at normal location), it overwrites the actual user record.   Since our user records are imported/updated daily, that information is overwritten the next day.

        I looked at the dictionary on the Service Desk Call's Caller field and it is a reference to Caller which makes sense.   Our goal is to be able to put the current information for our users and NOT update the main user record.

Thanks,
Shane

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Shane,



If I understand your question correctly, You have pull the reference field(caller) table fields on the form. In this case if you make any update then it will update the sys_user table also. Hence you have to create the custom field on the form and have a client script which will populate the info on the form. In this case even if you change the value on the form it will not update the user record. Make sense?



Please let me know if you have any questions.


View solution in original post

8 REPLIES 8

Victor,



        Thank you.   I was wondering about that, but wasn't sure.   My new field is u_caller, but I can't seem to get it to populate department, location, and phone which I've added to the form.   Any ideas?   Thank you!



Shane


make a copy of the OOB and edit your new copy....here's a sample of mine populating an incident:




if (ctype == 'incident'){


  gr.caller_id = current.caller;


  gr.location = current.caller.location;


  gr.u_alternate_contact = current.u_alternate_contact;


  gr.u_notified_via = "Phone"


  gr.comments = current.description.getHTMLValue();


Victor,



        I must be missing something because I don't see how the CallTypeChanged BR populates the Caller information such as department and phone since there isn't anything in the BR about those fields.   Also, the BR doesn't run onChange for the Caller field.



        I updated the Populate company client script to the below.   It seems like it should work, but is only populating the company.



function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading)
  return;

if (newValue == '') {
  g_form.setValue('company', '');
  g_form.setValue('department', '');
  g_form.setValue('location', '');
  g_form.setValue('phone', '');
  return;
}

if (!g_form.getControl('company'))
  return;

var caller = g_form.getReference('u_caller', setCompany);
}


function setCompany(caller) {
if (caller)
  g_form.setValue('company', caller.company);
  g_form.setValue('location', caller.location);
  g_form.setValue('department', caller.department);
  g_form.setValue('phone', caller.phone);
}


I dont use dept but as you can see by this sample I am using phone#



caller.jpg