how to return sysid in clientscript in ui builder from a reference field
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 06:36 AM
Hi
I am new to UI builder. How can I return sysid in the UI builder client script from the below code.
const data = api.data.cost_centers_table_data.output.data.GlideRecord_Query.cmn_cost_center._results;
let cost_item = data.filter((cost) => {
return cost.sys_id.value == item.id;
});
api.setState("funds", cost_item[0].u_fund);
'funds' is a reference field but cost_item[0].u_fund is not setting sys_id, it is returning displayvalue. How to return sysid of the u_fund.
I tired with cost_item[0].u_fund.sys_id and cost_item[0].u_fund.value but it is not working.
Thank you.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 06:43 AM
Hi @Raviteja Kunal1 ,
Please refer to below thread:
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda