how to set reference field value using g_form.setValue();

Vasu20
Tera Contributor

In the UI action of sn_hr_core_case table an incident sys_id is recevied ,i need to set the received value to transferred_to field( reference field). I am using g_form.setValue('transferred_to',value) and it is not working.Any help is appreciated.

 

Thanks and Regards,

Vasu

1 ACCEPTED SOLUTION

then unless it's present in workspace view g_form cannot set the value

add that in your view and then verify

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

View solution in original post

10 REPLIES 10

Vasu20
Tera Contributor

result value returns incident sys_id in string format

Hi,

Is that field present in the workspace view?

Regards
Ankur

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

No it is not present in the workspace view. It is present only in the native UI view.

 

Thanks and Regards,

Vasu

then unless it's present in workspace view g_form cannot set the value

add that in your view and then verify

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

Yes, just did that it worked.Thank you so very much again.

 

Regards,

Vasu