- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2020 06:54 AM
Hi, I have a table with a column which is of a Reference type to another table. I can easily set the value in the GUI for the column fields by typing in a value or using the magnifying glass to search for it. But I am unable to set the value for this reference field via a script with setValue() method. The field basically remains blank and nothing happens. Is there a trick to set the value for a reference field with a script?
Of course, if I create another column with a type "String", then I can easily set its value with a script with setValue() method without any issues. Is there a difference between setting value for String fields vs Reference fields?
Thank you.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2020 06:59 AM
can you paste the script which you have used ?
to set the value in reference field
g_form.setValue('<reference field>','sysid of the record');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2020 06:59 AM
can you paste the script which you have used ?
to set the value in reference field
g_form.setValue('<reference field>','sysid of the record');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2020 06:59 AM
Please post your script.
Vinod Kumar Kachineni
Community Rising Star 2022

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2020 07:32 AM
Hi,
check this blog (point no. 2), you will get idea how to set value to reference field.
Thanks,
Dhananjay.