Access extended User in a microflow

0
Just as we can easily access System.User in a microflow, how can I access its extension (e.g. employee) in a microflow? My form deals with other entity (e.g. book), so I'm not able to pass anything other than book records to the micro-flow. However, I can easily access System.User in "Change object" activity. How do I access employee, in a similar way?
asked
3 answers
0

If your Employee entity is a specialization of System.User, you can retrieve the employee from the database with the XPath [id = $currentUser]

answered
0

Assuming that Employee is a specialization of System.User (and Administration.Account), you can create a retrieve action from database for entity Employee with the following XPath:

[Name = $currentUser/Name]

In Range - select First to get only one record.

This will return the object in the Employee entity for the current user.

If you need to check what type of user the current user is, use an inheritance split (green diamond) and pass in the current user. Them you can branch to different actions based on what type of user it is.

answered
0

Thanks.. The problem is solved now. I know I'm changing the topic, but I'm facing trouble when creating employee record when I create a new user. Basically, I am creating new employee record in the Administration --> SaveNewAccount microflow. Is that the right way?

The error is - lg: requirement failed: Change object 'Account' should not be null at Administration.SaveNewAccount (Change : 'Set password and save account')

answered