Hey Guys,
I had created a auto number plugin on create of an new account, when I complied the code, I don't get any errors. When a create an account , I got an business process error like this,
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unexpected exception from plug-in (Execute): CRM2013AutoNumber.Plugins.PreAccountCreate: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220956</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Unexpected exception from plug-in (Execute): CRM2013AutoNumber.Plugins.PreAccountCreate: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.</Message>
<Timestamp>2016-09-26T22:36:56.7478181Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>
[CRM2013AutoNumber.Plugins: CRM2013AutoNumber.Plugins.PreAccountCreate]
[9ccc827e-3884-e611-bb80-d850e6b8b043: PreAccountCreate]
Entered CRM2013AutoNumber.Plugins.PreAccountCreate.Execute(), Correlation Id: 04e9a153-f678-48f5-9426-4ff95a831aee, Initiating User: ddbbe425-f031-e511-b116-d850e6b8b043
CRM2013AutoNumber.Plugins.PreAccountCreate is firing for Entity: account, Message: Create, Correlation Id: 04e9a153-f678-48f5-9426-4ff95a831aee, Initiating User: ddbbe425-f031-e511-b116-d850e6b8b043
Exiting CRM2013AutoNumber.Plugins.PreAccountCreate.Execute(), Correlation Id: 04e9a153-f678-48f5-9426-4ff95a831aee, Initiating User: ddbbe425-f031-e511-b116-d850e6b8b043
</TraceText>
</OrganizationServiceFault>
Thanks in advance.