GetDisplayName

Description

Returns the display name (a unique key) associated with the Entity.

For state-based record types, the unique key is the record's visible ID, which has the format DBnnnnnn (for example, PASNY00012332), where DB is the database name and nnnnnn is the record number.

For stateless record types, the unique key is formed from the values of the unique key fields defined by the administrator. If there is just a single unique key field, its value will be the unique key. If there are multiple fields forming the unique key, their values will be concatenated in the order specified by the administrator. For state-based record types, calling this method is equivalent to getting the value of the "id" system field using a FieldInfo Object.

The unique key should not be confused with the database ID, which is not visible to the user. The database ID is retrieved by the GetDbId method.

Syntax

VBScript


entity.GetDisplayName 

Perl


$entity->GetDisplayName(); 
Identifier
Description
entity
An Entity object representing a user data record. Inside a hook, if you omit this part of the syntax, the Entity object corresponding to the current data record is assumed (VBScript only).
Return value
A String containing the record type's unique key.

Examples

VBScript


' Get the record ID using 2 different techniques and compare the
' results
displayName = GetDisplayName 
idName = GetFieldValue("id").GetValue 
If idName <> displayName Then 
  ' Error, these id numbers should match 
End If 

Perl


# Get the record ID using 2 different techniques and compare the 
# results
$displayname = $entity->GetDisplayName();
$idname = $entity->GetFieldValue("id")->GetValue();
if ($idname ne $displayname)
 {
 # error, these id numbers should match
 }