I have created a onChange client Script auto populate the user's mobile number

kranthi2
Tera Expert

Hi,

I have created a onChange client Script auto populate the user's mobile number, but it is not working as per the expectation.

please find the below mentioned SS

 

 

kranthi2_0-1706188251386.png

 

onLoad:

 

kranthi2_1-1706188314241.png

 

onload is working fine but onchange is not working.

 

Thanks,

 

 

 

Thanks,

 

 

 

12 REPLIES 12

@kranthi2  try to use Opened For field backend name in your script . when you map any variable with table field there backend name auto populate in name field . "Opened For" on incident form is custom field or ootb field ? or have you renamed the label ? 

Not understood exactly what you are trying to explain here.

 

Once i submit the form incident will be generating 

 

kranthi2_0-1706190736456.png

 

kranthi2_1-1706190914400.png

 

Please help me out the script if i want to modify anything or

please provide us the exact script for onchange.

 

Thanks

 

 

@kranthi2  Can you add alert inside callback function in your catalog client script to test the result. 

 

eg:  You can refer my above screenshot as an example. 

alert('Phone is ' + r.phone); 

 

@kranthi2  This is what i tried on my personal instance and you can see the alert result. its giving me the result.

 

csres.pngcs.PNGcaller id.PNG

 

I would suggest add some alert in your client script inside callback function to check the result.

eg: alert('Phone is ' + r.phone); 

 

Hope it will help you.

 

Thanks,

Harsh

Hi @Harsh Vardhan 

I have tried this but it is not working.

 

please provide sample script to auto populate only mobile number.

 

Thanks,