Copy a reference field value from one table to reference field in another table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2023 11:08 AM
I have a reference field called Requested for in my Accounting table and a reference field called Caller in Incident.
I am using a ui action script to copy values of fields from the Accounting table to Incident. The field that did not copy over was the Requested for field. Both of these reference fields are using the sys_user table. How do I copy the reference field value from Accounting table to reference field value within Incident table so the user that receives this Incident table doesn't have to go add a user after the ticket has been transferred?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2023 07:37 AM
Hi @Pat Surtan Kindly check below UI action.
Try current.request.requested_for.toString();
var inci = new GlideRecord('incident');
inci.initialize();
inci.short_description = current.getValue('short_description');
inci.caller_id = current.request.requested_for.toString();
inci.insert();
action.setRedirectURL(inci);
If my answer helped you in any way, please then mark it as helpful.
Thank you