Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Debasis Sahoo
28
Views
6
Comments
Solved
calling webservice in multitenant application
Question
Hello,
i have a multi-tenant application (Tenant 1 and Tenant 2) which requires webservice call.
I created an espace having webservice which is multitenant. When i use to call it from tenant 2 then by default it switches to tenant1(which is the default tenant - Users) after calling that webservice resulting no data.
Please let me know if i am missing something in the call so that my queries in the webservice will result data from respective tenants.
PS : i am not passing tenant Id in the call.
Nuno Rolo
MVP
Solution
You have an action that make the switch of the tenant, so in fact is the same query, or you can have the tenant exposed and that id is used in the query filter.
See solution in context
Nuno Rolo
MVP
Hi leo,
You have to pass a way to know wich tenant to use.
1 reply
30 May 2016
Show thread
Hide thread
Debasis Sahoo
Nuno Rolo
wrote:
Hi leo,
You have to pass a way to know wich tenant to use.
Yes i can pass the tenant Identifier to use in the espace having code of webservice. But i guess every query in it needs to be altered to exclude the curly braces to eradicate the use of any views. But again that will have impact on exposing tenant identifier and change in all structures that use the query output.
Nuno Rolo
MVP
Solution
You have an action that make the switch of the tenant, so in fact is the same query, or you can have the tenant exposed and that id is used in the query filter.
Pramod Jain
MVP
Hi Nuno,
i am using query without
curly braces and passing tenant id and it is working fine , recently i came in a situtaion where i have a webservice exposed and it is recieving userid and tenantid and based on these parameter i am running a query and returning the result but now i also need to return the username with the result and for that when i am trying to use ossys_user entity in my query without
curly braces i am getting error that ossys is a reserver key word and cant be used.
Regards
-PJ-
Pramod Jain
MVP
Hi Nuno,
I tried that SwitchTenant action and it jsut work fine ...no need to remove braces or changing queries.
Regards
-PJ-
Nuno Rolo
MVP
Hi Pramod,
You can use one of the two ways, probably using the Tenant Switch is better because you don't need to change the query and expose the tenant of the entities.
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...