Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

SAPUI5 - how to get loged User ID?

$
0
0

Hi experts,

 

I have problem, when I try to get the ID from the loged user in SAPUI5.

I have tried:

1.

     var oUser = sap.ui2.shell.getUser();

     var userId = oUser.getId();

Here I have error: Uncaught TypeError: Cannot read property 'shell' of undefined

 

2.

     var oUser = new sap.ushell.services.UserInfo();
     var userId = oUser.getId();

Here I have error: Uncaught TypeError: Cannot read property 'services' of undefined

 

I will appreciate if you can show me an example or to guide me, beacause I don't know what I'm doing wrong.

 

BR,

Simona


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>