Getting A user object with all his associated objects.
Hi all, I have an issue with getting A user object with all his associated objects. I have many users can sign-in to the application and after signing in he/she will see the dashboard which has all the personal info and related info from a different entity that is associated with it. what I am doing: 1- after signing in a microflow will be triggered which will retrieve the current user via id [id = '[%CurrentUser%]'] from "Admin.Account" then doing a second retrieve from my "User" entity with XPath [$UserAccount/Email= EmailAddress]. 2-then I pass the object to the dashboard page. 3- I use dataView to see the user that I passed earlier and another dataView to see another entity which is associated with the first one. I am able to see all the attributes but no context. any idea what I am missing? much appreciated
Don’t use System/User, but use Account (it inherits from User). So in your example, change the page parameter from User to Account and pass the Account to the page. And do not connect Company to User, but to Account. Finaly, you do not need to retrieve an Account from database, you can just cast the currentUser microflow variable like this: