View User info from the administration module

Hi! I am working on a service request form. In this form I want to automatically display the fullname and email of the logged in user. I have therefore made an association between the entity Service_request and Account (from the module administration). When I open the form now the fields are empty. Anyone an idea how I can solve this? Thank you in advance.
1 answers

An association is empty until it is set. Thus drawing an association in the domain model doesnt mean that the association is set for the objects involved.

What you need to do is when creating a request object, set the reference to the current logged in user. This can be done by replacing the create button with a microflow call. The microflow will first retrieve the account of the loggedin user, then create the request object and set the reference.

// EDIT/// add examples

Assuming you have this domain model (with a bit more attributes ;-) )

You need a microflow which retrieves the account of current logged in user and create a request with reference to the account and show the request in a page.

You can retrieve the account of the current logged in user as follows. Where $currentUser is a variable containing the user object of the current logged in user. Which is everywhere available.

After retrieving the Account you can create the request, and set the reference as follows