Dot walking from a reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 05:04 AM
Hi All,
I have a request item that is used for on boarding, in that item there is a field to list the employee's manager. The manager field is a reference field that references the sys_user table. I have an activity in my workflow that requires the manager's user name, I tried dot walking but that doesn't seem to pull the ID I need:
var mgrID = current.variables.manager.user_name;
I'm not sure why this isn't working but any help advice would be appreciated.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 05:14 AM
I don't see any issues with the line that you have mentioned above
Can you try to run the code in background script and see if you are getting any errors like
org.mozilla.javascript.EcmaError: "RP" is not defined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 05:19 AM
hi,
can you put log and see if you are getting proper sys_id while printing the manager value

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 05:35 AM
If it is a approval related acitvity, use toString() while pushing the approval record in answer array.
current.variables.manager.toString();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 10:22 AM
Thanks all for your replies.
I put some logging into place and found that the my syntax is correct and pulling the manager's user name, it seems the problem might be within the powershell that is using that info.