on 2022 Jun 28 1:26 PM
Hi I am currently working on a Card in SAP Work Zone that should display the current logged in user. Is there a way to get the logged in user data from SAP Work Zone and add it in the Card?
Yes. If you have the card instance, you can call getHostInstance() on it to obtain context information in Work Zone:
card.getHostInstance().getContextValue("sap.workzone/currentUser")
Note that this returns a Promise. See https://help.sap.com/docs/WZ/7d3b9c7211ca4d7a9630b524205ee836/e69aef3fb6f448d084ce601ebf4555da.html?... for more information. Also the documentation for getContextValue(): https://ui5.sap.com/#/api/sap.ui.integration.Host%23methods/getContextValue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
57 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.