AgileApps Support Wiki Pre Release

tenantContext Object

From AgileApps Support Wiki


The tenantContext object is used to access and manage data that has been shared by another tenant, using Tenant Data Sharing Policies.

Once a data sharing policy has been set up, you specify the sharing tenant's ID to get a tenantContext. You then use that object as a parameter in one of the Java APIs for Tenant Data Sharing.

Learn more: TenantContext javadocs

Syntax
<syntaxhighlight lang="java" enclose="div">

try {

   TenantContext tenantContext = new TenantContext(String tenantId);

} catch Exception(e) {

   // An exception is thrown if the specified tenant has not defined
   // a tenant data sharing policy that gives you access.

} </syntaxhighlight>