on 04-03-2019 1:34 PM
I have a SAPUI5 / Fiori app deployed in SAP Cloud Platform which we push to 3 subaccounts for Dev, Test and Production.. I need to be able to have the app at runtime determine the subaccount it's in thus need to get this from the app's Controller (Javascript). Any chance how to do this? Thanks!
I just used the Javascript code window.location.href to get the URL and from there was able to extract the subaccount technical name using String includes() method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Michael, hope you're well.
To get current logged user, you might want to use class sap.ushell.services. It allows you to retrieve information about the current logged-in user. Here's an example:
new sap.ushell.services.UserInfo().getId()
Also, more detailed information might be found on new sap.ushell.services.UserInfo(). I tried once, and it worked properly.
KR
Arthur Silva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.