Dot walking from a reference field

User163016
Tera Contributor

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

4 REPLIES 4

dvp
Mega Sage
Mega Sage

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.


gdd
Giga Expert

hi,



can you put log and see if you are getting proper sys_id while printing the manager value


Kalaiarasan Pus
Giga Sage

If it is a approval related acitvity, use toString() while pushing the approval record in answer array.



current.variables.manager.toString();


User163016
Tera Contributor

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.