locked
PostEntityImage in update message post-operartion has no key at all RRS feed

  • Question

  • Hi

    I have registered a plug in for update message of some entity (in post-operation) via CRM tool in visual studio and also registered post-image for that plug in like below:

    and here is my code :

     protected void ExecutePostOpportunityUpdate(LocalPluginContext localContext)
            {
                if (localContext == null)
                {
                    throw new ArgumentNullException("localContext");
                }
    
    
             
    
                // TODO: Implement your custom Plug-in business logic.
                IPluginExecutionContext context = localContext.PluginExecutionContext;
    
                Entity postImage = (Entity)context.PostEntityImages["PostImage"];
    
    
    ....
    
    }

    But it throws error and says that there is not key in PostEntityImages at all. I debuged the plug-in and saw that there ios not key int that at all.

    Would you help me please ?

    Thursday, February 27, 2014 1:19 PM