cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to add custom property to FLP (Cloud Portal Service)

junweitoh
Product and Topic Expert
Product and Topic Expert
0 Kudos
318

We have a use case where the same UI5 apps are to be integrated in various FLPs (each belonging to a different tenant). The app logic is mostly the same for each tenant, but there are some slight custom logic for some tenants.

Is there a way we could get the tenants to add an identifier to their FLP, so that in our UI5 apps, we are able to get this property and use it to run our tenant-specific logic?

Accepted Solutions (0)

Answers (1)

Answers (1)

WouterLemaire
SAP Mentor
SAP Mentor

You have some possibilities:

  • using a parameter in your tile configuration
  • reading out the url
  • a CAP service that provides you the tenant information
  • a CAP service with feature toggles

I would recommend the last two options in case this is a multitenant application. I also recommend to put the tenant specific login in the CAP layer and not the UI.

To get the tenant information through a CAP service: https://cap.cloud.sap/docs/releases/jun24#fixed-req-user-tenant

CAP Feature toggles: https://cap.cloud.sap/docs/guides/extensibility/feature-toggles 

junweitoh
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi WouterLemaire, thanks for the detailed response. I believe the tenant information provided by CAP is not suitable for us as the tenant ids, subdomains, etc may change depending on the landscape. Also, it may be possible for multiple tenants to share the same custom logic. What I was hoping for is some way to inject a string into the FLP that the UI can access via JavaScript.
WouterLemaire
SAP Mentor
SAP Mentor
0 Kudos

Are you using Work Zone? In that case you can create a FLP plugin and share a string using iframe postmessage https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage

Work Zone uses iframes to load applications, iframe communication helps you to pass something from a plugin (on root level) with the applications.