locked
Multiple Attributes Getting Updated by PostUpdate step in Plugin RRS feed

  • Question

  • We have a postupdate step registered for all attributes on an entity.  Though it fires for any attribute, the post update code looks only for a select few attributes that have changed , performs some string concatenation regarding those fields and updates the name value of the entity, and then saves.  The issue is if one of these fields in question is updated it also appears to CRM that all attributes have been changed, which then causes some of our workflows to fire erroneously.

    code example of the function that is doing this:

    if(serviceProviderHelper.TargetInput.Attributes.Contains(

    ProjectFieldsConstants.attributename)

    peform some logic and update name

    svcContext.UpdateObject(PA);

    SvcContext.SaveChanges();

    For some reason if we update any other field on the entity , the plugin fires but doesn't have this problem. But if one or more of the attributes in question are updated, this part fires and CRM acts like all attributes were updated.  I can see in audit history fields showing updates that were not updated at all.  Any assistance would be appreciated.


    Robert

    Thursday, July 31, 2014 9:08 PM