unable to use getuserid() function

unable to use getuserid() function


Hi all,

when i try to use getuserid() in aggregate it throws a value 0.

the user have data in user aggregate, but when i use that function in aggregate, test values are working fine it displays the correct record. not able use in forms and lists

 see the image, 

Hi navaneethan,

Just asking, but... Are your user, in run time, "logged"?
If you use GetUserId() in an anonymous page and the user gets there without login, it will return 0.

Also, check if your module is using the Users User provider, or if it is using something else (could be the problem).


Hi Eduarrdo,

Thanks for reply

Yes, in run time user get through login only, 

pls check the user provider.....

an i'm asking in MOBILE application

Hello Navaneethan

You were not asking for MOBILE in your initial post.
You have to specify if you are asking something for mobile, as we don't have a way to find this by magic, right? ;)

In any case, this will not make any difference (at least for now).

My mobile applciations work correctly (did not tested offline).
GetUserId() (in an expression), returns the logged user id, or 0 if no user is logged.

So, I'll ask again.

Are you sure you are logged with a valid user in your application?

If you are 100% sure you are, than later on I can try to see if there is any kind of bug or behaviour that I don't know about that will cause a logged user to get a 0 from GetUserId() inside an Aggregate.


P.S. Please, be sure that you are really logged in with a user in the mobile app. My tests worked both in the mobile as well as in chrome.