Calling the TenantSwitch System action changes the context of the application from the current tenant to the specified tenant. When using the TenantSwitch System action, the session is cleared, the OnSessionStart action of the specified tenant is executed, and the transaction in the current tenant is committed. Learn more about Handling Transactions.

This action can be used when creating a tenant provisioning application. When the end-user fills in the necessary information, a new tenant is created, and the TenantSwitch action is used to change the context of the application, making the end-user constrained to the newly created tenant. Learn more about using the TenantSwitch in the How to Build a Multi-tenant Application Technical Note.

Notice that the new tenant must have the same User Provider of the previous tenant.

Input parameters

Entity Reference Type. Mandatory.

Output parameters


See Also

Overview of System Actions and Functions | Using Web Services in Multi-Tenant Applications