Update reference field value to another reference field from same table
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2023 12:28 AM
Hi All,
I'm trying to update the first reported by value to the parent field when the first reported by is not empty. using client script but the below script is not working
var ticket_id = g_form.getReference('first_reported_by_task',doAlert);
function doAlert(ticket_id){
g_form.setValue('parent',ticket_id.number);
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2023 01:01 AM
Why are you using a number, its just a display value, you need to pull the sys_id, since its the reference field.
Try changin it, it will work just fine.
Best Regards
Aman Kumar
Aman Kumar