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