Multi-tenant users in Traditional Web Application
Application Type
Traditional Web

Hi Everyone,

I have a web app that is not multi-tenant but it uses multitenant users.

This app uses a function to send Emails and it can be launched both manually and automatically.

If I am logged in and I launch the function, the system finds all the recipients and it works fine; otherwise, if the function is launched automatically, the system finds only the Default Tenant Users (see if the image attached is of any help).

A workaround to solve the problem while the function works automatically could be, I guess, to create 'fake' users for Default Tenant but actually, it seems to me not a solid and nice solution.

Do you have any suggestions? 

Cheers,

Gianmaria


mvp_badge
MVP
Solution

Hi Gianmaria,

For the mentioned use case, I would suggest you follow the below-mentioned steps:

  1. In the non-multi-tenant application, select the Users Entity.
  2. Edit the Users Entity property and checkmark the Show Tenant Identifier checkbox as shown below
  3. On automatic execution of the function, filter the respective Users Entity by Tenant_Id attribute to get the respective Tenant Users.

Note:

  • When you get logged in to the application, the Tenant switch happens under the hood, and you get access to the respective List of Tenant users.
  • But in the automatic execution of the action, it runs on the Default tenant, i.e. Users Tenant.


I hope this helps you!


Kind regards,

Benjith Sam

Hi Benjith,

sorry for the late reply and thank you so much for the suggestion, it worked great!

Cheers,

Gianmaria

mvp_badge
MVP

No problem!

You're most welcome, Gianmaria.

Glad to help you :)


Kind regards,

Benjith Sam

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.