How to get value of dot walking field in client script?

Shivam7
Tera Contributor

How to get value of dot walking field in client script?

14 REPLIES 14

You sure can use it but what Paul is saying is that calling data from server on client script is considered bad practice as it causes slowness on the instance on the long run.

Doesnot work!- I have never seen anything like this before.

Harsh Vardhan
Giga Patron

try 

 

alert(g_form.getValue('caller_id.email'));

Tanushree Doiph
Mega Guru

Hey Shivam,

Let's understand below scenario,

If you want to set a caller's mobile number through dot walking then you can do this,

g_form.setValue('u_user_manager', caller.mobile_number);

 

Please mark correct and helpful.

Thanks

Tanushree

asifnoor
Kilo Patron

Hello Shivam,

In general, dot walking is not available in client script, unless you used g_form.getReference. Even in this case, you can do dot walking only till level1.

So best is to use Script Include and GlideAjax.

So what exactly is your requirement here?

Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.

Regards,
Asif
2020 ServiceNow Community MVP