Show Project according to UserId

Show Project according to UserId

  

I have an entities which contain Id,UserId,ProjectId and RoleId,i want to show project according to UserId after the user login.how to get current UserId who are login and show the project according to UserId ?


Thankyou 

Solution

Hi Robby,

In P10, you have a built-in function available to you: GetUserId()

This will return the current user's id that is signed in.

You can use this in a filter of your aggregate like:

UserProjectRole.UserId = GetUserId()


If you are using P9, you have a session variable available to you that achieves the same thing:

Session.UserId

You would do that same for your filter but using the Session.UserId, as the GetUserId() function is new to P10:

UserProjectRole.UserId = Session.UserId


Let me know if you have any issues,

Justin

Solution