Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

getValue of reference field and email field

Community Alums
Not applicable

Hi,

How do I get the Configuration Item and Email values from the incident table?

 

6.png

 

  alert(g_form.getDisplayValue('cmdb_ci'));
   alert(g_form.getValue('email'));

 

Regards

Suman P.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Community Alums 

try this

I assume the email field is a dot walked field from caller_id field

  alert(g_form.getDisplayBox('cmdb_ci').value);
   alert(g_form.getValue('caller_id.email'));

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Community Alums 

try this

I assume the email field is a dot walked field from caller_id field

  alert(g_form.getDisplayBox('cmdb_ci').value);
   alert(g_form.getValue('caller_id.email'));

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Musab Rasheed
Tera Sage

You can use below code to see display value of reference field and also email value as follows

alert(g_form.getDisplayBox('cmdb_ci').value);

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

Please hit like and mark my response as correct if that helps
Regards,
Musab

@Community Alums You can accept multiple answers, Please accept my answer as well.

Please hit like and mark my response as correct if that helps
Regards,
Musab