BUFFER-TENANT-ID function

Returns the tenant ID (as an integer) of the tenant that owns the current record in a specified buffer.

Syntax

BUFFER-TENANT-ID ( buffer-name )
buffer-name
An identifier that specifies the name of a record buffer.

If the buffer is not populated with a record, this function 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, the function returns the value zero (0).

If the buffer contains a record for a tenant group and the user is a super tenant, the function 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, the function always returns the user's own tenant ID. This is true even if the record belongs to a tenant group.

Notes

See also

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