Getting Undifened in a field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 11:32 PM
Hello community i have written a client script to set value of field from a reference field but i am getting undefined in that field . Here is the script
ar getOEM = g_form.getReference('vendor', setTeamandCategory);
function setTeamandCategory(getOEM) {
if (getOEM)
g_form.setValue('u_team_category', getOEM.u_team_category);
g_form.setValue('contract_administrator', getOEM.contact);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 11:44 PM
Hi,
Have you selected vendor on contract form?
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 12:28 AM
No , "vendor" is the backend value of a OEM field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 12:16 AM
I assume this is on 'On Change' client script and also You are changing the vendor .If these are taken care of then I see that first Line of your code should be var and not ar
"var getOEM = g_form.getReference('vendor', setTeamandCategory);"
Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 12:42 AM
Hi @hema sundar, I see OEM field is empty and that need to be populated as you are dotwalking that field.
Regards,
Sunil