Try OpenEdge Now
skip to main content
Programming Interfaces
Database Administration Entity Interface Reference : ITenantGroup interface : ITenantGroup examples : Adding tenants to a tenant group
 
Adding tenants to a tenant group
You can assign one or more tenants to a tenant group. The following code shows how you can use the Tenants property to add tenants to a group:
define variable tenantgroup as ITenantGroup no-undo.

assign
  tenantgroup = service:GetTenantGroup("AcmeCustomer")
  tenantgroup:Tenants:Add(service:GetTenant("ACME-1"))
  tenantgroup:Tenants:Add(service:GetTenant("ACME-2)).

service:UpdateTenantGroup(tenantgroup).