Version 3.1 - Unable to delete file from Note and Azure

Jun 9, 2016 at 3:43 PM
Edited Jun 9, 2016 at 3:46 PM

Don't know if I did something wrong, but I'm unable to delete a note (with attachment) from CRM and the attachment from Azure.

The exception:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

My config file:
<Setting key="ConfigurationProviderType" value="PluginStepConfigurationProvider" />
<Setting key="Provider Type" value="AzureBlob" />
<Setting key="annotationContainer" value="crmannotations" />
<Setting key="annotationFolder" value="annotations" />
<Setting key="annotationShare" value="crm" />
<Setting key="activitymimeattachmentContainer" value="crmactivitymimeattachments" />
<Setting key="activitymimeattachmentFolder" value="activitymimeattachments" />
<Setting key="activitymimeattachmentShare" value="crm" />

I'm using CRM 2016 online.

Jun 9, 2016 at 8:20 PM
Hi Rodrigo,

I'm afraid looking at that I can't tell you what's wrong. I'm assuming your "Secure" configuration is set correctly or you'd get a different error.

Can you check and make sure you have the PreDelete images on the delete steps correct? Those are needed to pass the filename to the plugin after the entity has been deleted. Shown here :

Jun 9, 2016 at 8:51 PM

I tried to delete other notes with files and it worked. So now i have 1 note that i cannot delete and doesn't have a file attached (but the file is available on Azure storage).

Strange :)
Jun 9, 2016 at 9:37 PM
If you just want to get rid of the note, you can disable the delete step temporarily, delete the note and re-enable step.

However, this is indeed weird, you can debug the step with the CRM Plugin Registration Tool and profiler. I haven't come across this before though, but if you do come across it again, I'll see if I can somehow replicate it.
Jun 9, 2016 at 9:39 PM
Just after answering, I've been able to replicate this. I'll see about the fix.
Jun 9, 2016 at 9:40 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jun 9, 2016 at 9:52 PM
Fixed in v3.1.2. You can just replace the DLL with the plugin tool if you want. Thanks for letting me know.
Marked as answer by dawidpotgieter on 6/9/2016 at 2:52 PM