Hi All,

Ashok
Tera Contributor

Please suggest for the below requirement:

 

How to populate caller email id and mobile phone number in single line text field in catalog item.

 

Please suggest:

2 REPLIES 2

Ademir Amaral1
Kilo Sage

Hi @ Ashok Take a look at this video, it’s well explained step by step.

 

https://www.youtube.com/watch?v=IMLdnF7ufOg

 

Technical Consultant Manan Bhatt walks us through how to Auto-populate Variables on Catalog Item in the ServiceNow Utah Release. You can auto-populate the catalog item variables using an onchange client script. Learn more: ...

Sandeep Rajput
Tera Patron
Tera Patron

@ Ashok Here is how you should do it via an onLoad client script

 

function onLoad() {
    g_form.getReference('caller_id', doAlert); // doAlert is our callback function
}
 
function doAlert(caller) { // reference is passed into callback as first arguments
    g_form.setValue('email_id',caller.getValue('email'));
    g_form.setValue('phone_number',caller.getValue('phone'));
}

Hope this helps