Returns the requested record (Entity) using the record's unique id.
Use this method to get a record whose database ID you know. You can get the database ID of a record by calling the GetDbId method of the corresponding Entity object.
To request the record using its visible ID instead of its database ID, use the GetEntity method.
VBScript
session.GetEntityByDbId(entitydef_name, db_id)
Perl
$session->GetEntityByDbId(entitydef_name, db_id);
VBScript
' Save this record's ID for later use. set sessionObj = GetSession set record1 = sessionObj.GetEntity("defect", "DEF00013323") id = record1.GetDbId ' ... ' Get the record again set record1 = sessionObj.GetEntityByDbId("defect", id)
Perl
#Assume you have $entityObj, an Entity Object #Save the session and record id for later use: $sessionObj = $entityObj->GetSession(); $dbid = $entityObj->GetDbId(); # ... #Later, to get the record again: $entityObj = $sessionObj->GetEntityByDbId("defect",$dbid);