2016-11-10 1 views

答えて

2

プラグインを登録する必要があります。メッセージ、第1、第2エンティティをnoneに関連付けます。

プラグインでは、条件を確認するには、[「関係」]は(私たちは「systemuserroles_association」を探しています)context.MessageName(「アソシエイト」または「切り離し」)とcontext.InputParametersをチェックするために

コードが必要です

//all usual plugin stuff here 

if (context.InputParameters.Contains("Relationship")) { 
    relationshipName = context.InputParameters["Relationship"].ToString(); 
}         

// Check the “Relationship Name” with your intended one 
if (relationshipName != "systemuserroles_association") { 
    return; 
} 

if (context.MessageName == "Associate") { 
    //logic when role added 
} 
if (context.MessageName == "Disassociate") { 
    //logic when role removed 
} 
else { 
    //not interested 
} 

私はコードをコンパイルしていませんが、どのように進めるかを教えてください。

関連する問題