GetDisplayName

説明

Entity に関連した表示名 (一意のキー) を戻します。

状態ありレコード タイプの場合、一意のキーはレコードの表示 ID です。表示 ID のフォーマットは DBnnnnnn (例えば、PASNY00012332) で、DB はデータベース名で、nnnnnn はレコード番号です。

状態なしレコード タイプの場合、一意のキーは、管理者によって定義された一意のキー フィールドの値から形成されます。単一の一意のキー フィールドのみの場合は、その値が一意のキーになります。複数のフィールドで一意のキーを形成する場合、その値は、管理者によって指定された順序で連結されます。状態ありレコード タイプの場合、このメソッドを呼び出すことは、FieldInfo オブジェクトを使用して「ID」システム フィールドの値を取得することと同じです。

一意のキーと、データベース ID (ユーザーには表示されない) を混同しないでください。データベース ID は GetDbId メソッドで取得できます。

構文

VBScript

entity.GetDisplayName 

Perl

$entity->GetDisplayName(); 
識別子
説明
entity
Entity オブジェクトは、ユーザー データ レコードを表します。構文のこの部分を省略すると、フック内では、現在のデータ レコードに対応する Entity オブジェクトが想定されます (VBScript のみ)。
戻り値
レコード タイプの一意のキーを含む String。

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
 } 

フィードバック