지정된 필드에 의해 참조되는 레코드 유형을 리턴합니다.
지정된 필드에는 다른 레코드에 대한 참조가 포함되어 있어야 합니다. 지정된 필드의 유형은 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());
}
}