locked
Unable to Remove Context Input Parameters from Target in Pre-Operation Event RRS feed

  • Question

  • I have an application that sends an update to a record in CRM. The issue is while it is sending the update of attributes that have changed, it is including a bunch of values that haven't changed. This results in redundancy and confusion in the audit trail, mixing and matching changed and unchanged values. Unfortunately, modifying the app that sends the update to CRM is not an option.

    I've developed a pre-operation plug-in to compare the pre-image values against the target to remove non-changed values from the Target. The plug-in successfully removes the Target attributes and values. I can see the count of the attributes and values being reduced from the Target while debugging, however for some reason, the record gets still gets updated with all the original values.

    I define the target when I start my plug-in, and then using target.Attributes.Remove("attribute") to remove the attribute. 

    I've tried to simplify the process by pushing the update via a Console to a new entity with no other dependencies (plug-ins or workflows), but the same problem persists---the Target always contains attributes that show that they've been removed. 

    Any reasons why this isn't working ?


    • Edited by Yodums Tuesday, April 25, 2017 5:35 PM
    Tuesday, April 25, 2017 5:34 PM

All replies