Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : BUFFER-TENANT-ID attribute
 

BUFFER-TENANT-ID attribute

The tenant ID (as an integer) of the tenant that owns the current record in the buffer specified by a buffer handle.
Data type: INTEGER
Access: Read-only
Applies to: Buffer object handle
If the buffer is not populated with a record, this attribute returns the Unknown value (?). If the buffer is for a shared table, a temp-table, or for the default tenant of a multi-tenant table, this attribute returns the value zero (0).
If the buffer contains a record for a tenant group and the user is a super tenant, this attribute returns the tenant ID of one of the members of the group. The tenant ID returned is indeterminate, but is always the tenant ID of a tenant in the group.
For a regular tenant, the record in the buffer always belongs to that tenant. So, this attribute always returns the user's own tenant ID. This is true even if the record belongs to a tenant group.

Notes

*This attribute can be used in a WHERE or TENANT-WHERE option as long as the specified buffer is not the same as the buffer of the query or FOR EACH statement.
*This attribute can be used by database triggers on the buffers passed to the trigger to get the tenant ID of these buffers. This allows the application provider to code tenant-specific database triggers.

See also

BUFFER-TENANT-ID function, BUFFER-TENANT-NAME attribute