Hi Expert,


I have registered my user in the user entity but still, it gives me invalid permission when I'm trying to navigate on the web screen without the anonymous being tick.

I have set my module user provider to Users and it gives me a getuserid()=0

How can i correct this problem?


Thanks and best regards.

Hi JA,

Make sure that you have registered role checked on your screen and you are logged in after user is registered.

Otherwise there is no reason of getting this permission screen.

Nikhil Gaur wrote:

Hi JA,

Make sure that you have registered role checked on your screen and you are logged in after user is registered.

Otherwise there is no reason of getting this permission screen.

Hi Nik, 

Yes, the registered is ticked/enable, but when I tried to log in with the anonymous is being ticked/enable I am redirected on the said screen and I'm not using SSO as login.






Solution

Hello JA,

Your problem is that you are not logged in with that user. You need to perform the login action.

 In order to do this, you need to use the Login system server action.


Just place this action in your logic (when you enter in the application) and before you navigate to a screen with the registered role. As soon as you execute the Login action, you will be available to navigate to the screen and the function GetUserId() will return the Id of the logged User (according to the Users entity).


Kind regards,

Rui Barradas

Solution

Rui Barradas wrote:

Hello JA,

Your problem is that you are not logged in with that user. You need to perform the login action.

 In order to do this, you need to use the Login system server action.


Just place this action in your logic (when you enter in the application) and before you navigate to a screen with the registered role. As soon as you execute the Login action, you will be available to navigate to the screen and the function GetUserId() will return the Id of the logged User (according to the Users entity).


Kind regards,

Rui Barradas

Hi Rui,


Thanks for your response it is working now. but i have another problem will post a new inquiry.

Thanks.


No problem, we're glad to help.

Sure thing, let us know about the new post so we can check it out after.


Kind regards,

Rui Barradas