define variable tenantSet as ITenantSet no-undo.
define variable tenant as ITenant no-undo. define variable iterator as IIterator no-undo. tenantSet = service:GetTenants(). iterator = tenantSet:Iterator(). do while iterator:HasNext(): tenant = cast(iterator:Next(), ITenant). If tenant:IsAllocated = false and tenant:Type = "Regular" then tenant:Allocate(). end. service:UpdateTenants(TenantSet). |
define variable tenantSet as ITenantSet no-undo.
define variable tenant as ITenant no-undo. define variable iterator as IIterator no-undo. tenantSet = service:GetTenants(). iterator = tenantSet:Iterator("IsAllocated = 'false' and type = 'Regular'"). do while iterator:HasNext(): tenant = cast(iterator:Next(), ITenant). tenant:Allocate(). end. service:UpdateTenants(TenantSet). |