答案 0 :(得分:1)
您可以使用SetState和SetStateDynamicEntity消息来实现。基于消息 InputParameter将相应更改。以这种方式你必须触发插件。这里的代码供您参考。
if (context.InputParameters.Contains("EntityMoniker") &&
context.InputParameters["EntityMoniker"] is EntityReference)
{
EntityReference myEntity = (EntityReference)context.InputParameters["EntityMoniker"];
}
答案 1 :(得分:0)
你不能这样做,但你可以在statuschange或更新和监视状态代码上注册你的插件。
// statecodes http://mostlymscrm.blogspot.co.at/2012/06/entity-statecodes-and-statuscodes.html
if(targetEntity.Contains(" statecode")&& targetEntity.getAttributeValue(" statecode")。Value == 2){ // mycode的 }