Update reference of current user when creating new entity

Hi team, I am trying to create small task similar to forum. Where user can ask question and for the same I am having 2 entities. User and Problems I want that, when user create New Problem, then reference of $currentUser (loggedin user) is set to problem object.   Now for the same, I have Problem list as home page, where there is 1 button "New Problem". On that I am calling 1 Microflow. In that microflow, actually I want reference of currentuser who is opening that page, but it is not working.     And here is microflow:   Please suggest, what I am doing wrong here.
1 answers

Hi Ankit,


You are using an entity in your MyFirstModule that you have named User, however the thing you want to use is the User entity from the system module. So currently you are trying to set a value of a different entity.

If you associate your problem with the user from the system module, you can use the token $currentUser in your creation of the problem and that will associate it to the user of the application.