EntityVisibleByDbId

Description

Returns the visibility type of a record. This method returns an indication of whether the entity exists or not and is able to distinguish between an entity that exists and an entity that exists but is hidden.

The method provides support for references and reference lists if you use record hiding. With record hiding, a user may be able to see a record, but not see a record that is referenced by one of its fields.

With the EntityVisible method, an integration can decide not to load a referenced record in the cases where it is not visible and would otherwise result in an error of it attempted to do so. (The EntityExists method indicates a record exists even when it is hidden and cannot be loaded.)

Note: For more information on DBIDs, see Working with records

Syntax

VBScript


session.EntityVisibleByDbId entity_def_name, db_id 

Perl


$session->EntityVisibleByDbId(entity_def_name, db_id); 
Identifier
Description
session
The Session object that represents the current database-access session.
entity_def_name
A String containing the record type (EntityDef) name.
db_id
A Long containing the record's unique ID number.
Return value
Returns a Long containing an EntityStatus enum value.

Examples

VBScript


set sessionObj = GetSession

set entityObj = session.GetEntity("defect", "test00000001")

dbid = entity.GetDbId

ResultFromEntityVisibleDbid = sessionObj.EntityVisibleByDbId("defect", dbid) 

Perl


$sessionObj = $entityObj->GetSession();

$entityObj = $sessionObj->GetEntity("defect", "test00000001");

$dbid = $entityObj->GetDbId();

$ResultFromEntityVisibleDbid = $sessionObj->EntityVisibleByDbId("defect", dbid);