IsEditable

説明

この時点で Entity オブジェクトを変更できる場合は、True を戻します。

Entity オブジェクトを編集するには、BuildEntity を使用して新規オブジェクトを作成するか、または既存のオブジェクトを開いて EditEntity で編集する必要があります。 Entity オブジェクトは、Commit メソッドで変更をコミットするか、または Revert メソッドで Entity オブジェクトを元に戻すまで、編集可能状態のままです。

構文

VBScript

entity.IsEditable 

Perl

$entity->IsEditable(); 
識別子
説明
entity
Entity オブジェクトは、ユーザー データ レコードを表します。構文のこの部分を省略すると、フック内では、現在のデータ レコードに対応する Entity オブジェクトが想定されます (VBScript のみ)。
戻り値
Entity が現在、編集可能である場合は True、そうでない場合は False の Boolean。

VBScript

set sessionObj = GetSession

set entityToEdit = sessionObj.GetEntity("defect", "BUGID00000042")

sessionObj.EditEntity entityToEdit, "modify"

' Verify that the entity object was opened for editing. 
If Not entityToEdit.IsEditable Then 
   OutputDebugString "Error - the entity object could not be
       edited." 
End If 

Perl

$sessionObj = $entity->GetSession();



$entityToEdit = $sessionObj->GetEntity("defect", "BUGID00000042");

$sessionObj->EditEntity($entityToEdit, "modify");



# Verify that the entity object was opened for editing. 

if (!$entityToEdit->IsEditable())

 {

 $session->OutputDebugString("Error - the entity object could not be 
edited.");

 } 

フィードバック