指定されたフィールドによって参照されるレコードのタイプを戻します。
指定されたフィールドには、他のレコードへの参照が含まれている必要があります。指定されたフィールドのタイプは、REFERENCE、REFERENCE_LIST、JOURNAL、ATTACHMENT_LIST のいずれかでなければなりません。
VBScript
entitydef.GetFieldReferenceEntityDef field_name
Perl
$entitydef->GetFieldReferenceEntityDef(field_name);
VBScript
set sessionObj = GetSession set entityDefObj = sessionObj.GetEntityDef(GetEntityDefName()) ' List the type of reference fields nameList = entityDefObj.GetFieldDefNames() For Each fieldName in nameList fieldType = entityDefObj.GetFieldDefType(fieldName) if fieldType = AD_REFERENCE Then set refEDefObj = entityDefObj.GetFieldReferenceEntityDef(fieldName) sessionObj.OutputDebugString refEDefObj.GetName() End If Next
Perl
$sessionObj = $entity->GetSession(); $entityDefObj = $sessionObj->GetEntityDef($entity->GetEntityDefName()); # List the type of reference fields $nameList = $entityDefObj->GetFieldDefNames(); foreach $fieldName (@$nameList) { $fieldType = $entityDefObj->GetFieldDefType($fieldName); if ($fieldType eq $CQPerlExt::CQ_REFERENCE) { $refEDefObj = $entityDefObj->GetFieldReferenceEntityDef($fieldName); $sessionObj->OutputDebugString($refEDefObj->GetName()); } }