Auditing Delete messages causes XML error


...but no audit records are captured. This happens for accounts, contacts and addresses. The delete still occurs in the crm user database but for some reason the XML needed by the plugin is generating an error and therefore no audit records are stored.
So I have disabled the delete steps in the plug-in to avoid the error message until this gets resolved.
Has it happened to anyone else? Do you have a resolution?
Note I tried both ways, run as "Calling User" and as the Systems Admin user. The calling user has full security privileges on accounts and contacts in the security roles. everything is set to global, same as systems admin. For the plugin step image, I am using Pre-Image only, presuming there is no post image on a delete. The image alias is named Target like all the others.


ddevine wrote Jan 26, 2011 at 11:05 PM

The issue is a code bug in CustomTargetImage.cs. The switch statement in the GetValue method has an inappropriate case statement for "delete". The syntax results in a given key is not in the dictionary exception that is swallowed. The code needs to be updated with the minor change below.
             case "delete":
                    if (context.PreEntityImages.Contains("AsynchronousStepPrimaryName")) 

wrote Jan 26, 2011 at 11:05 PM

wrote Feb 14, 2013 at 1:59 AM