Issue with populating Assigned To field on Incident form
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2024 02:29 PM
Need to set Assigned To field in Incident form via REST API/Business rule.
If I use below script,
rec.assigned_to = 'Andrew Och'; // THIS WORKS
but if I use below script,
rec.setValue('assigned_to', 'Andrew Och');// DOES NOT work. Why?
Infact everyone says use sys_id for reference fields. Then why 1st script worked? Why 2nd script failed?
PS - For User table, Diplay is set to FALSE for ALL the fields.
Also in Assigned To dictionary attribute, its all EMPTY.
11 REPLIES 11
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 02:22 PM
Anyone?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 02:58 PM
Below will work instead of setValue because you want to set the display value not the value (which is the sys_id):
rec.setDisplayValue('assigned_to', 'Andrew Och');