- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2016 08:32 AM
I am developing a record producer and form for one of our teams. On the record producer, I'd like to use a reference field for the Contact Name, and I have this code in the Default Value field: javascript:getReqfor(gs.getUserID())
It works great to pull the name of the Requested By from the Catalog into the Record Producer. However, the corresponding field on the form is a String field because when it is created directly by someone on our HR team, the person in the Contact Name field might not be someone in our system (a spouse calling about a benefit or something like that). So, I'd like it to use the reference field on the form when an Employee or Contractor uses the record producer on the CMS portal, but I'd like that field to be a string field on the Form itself.
The Contact Name that is displaying in the reference field on the record producer is populating the corresponding string field on the form with the Sys_ID instead of the Display Value. Any idea on how I can get it to resolve that Sys_ID to the referenced name?
thanks,
Richelle
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2016 09:32 AM
instead of write that code in default value of string field, write the same code in script field of "What it will contain" tab of Record producer. Then it should work.
Like code written above in script field.
Thanks,
Param
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2016 09:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2016 10:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2016 10:37 AM
Your answer was correct. I needed to remove ".string" from the code...this code worked in the script on the record producer:
current.u_contact_name = producer.u_contact_name.getDisplayValue();
I misread your example above.
Thank you so much for your help!
Richelle