0
votes

Can you please help me out of this, i am getting below error while creating case in crm. Please find the attached file of input signature and c# code.

"Message": "An error occurred in the Create TAT plug-in.An error occurred in the Create TAT Escalation plug-in.The given key was not present in the dictionary.\r\n at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n at Microsoft.Crm.Sdk.CreateTAT.IFL_CreateTAT.CreateTATTracking(Guid id, IOrganizationService service, IPluginExecutionContext context, Entity entity, Int32 SRStatus, EntityReference businessunit)\r\n at Microsoft.Crm.Sdk.CreateTAT.IFL_CreateTAT.CreateTATTracking(Guid id, IOrganizationService service, IPluginExecutionContext context, Entity entity, Int32 SRStatus, EntityReference businessunit)\r\n at Microsoft.Crm.Sdk.CreateTAT.IFL_CreateTAT.Execute(IServiceProvider serviceProvider)\r\n

Server stack trace: \r\n at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)\r\n at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)\r\n at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)\r\n at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)\r\n\r\nException rethrown at [0]: \r\n at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)\r\n at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)\r\n at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)\r\n at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)\r\n at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Create(Entity entity)\r\n at CRMService.Controllers.CRMController.PostCase(ClsCase caseDetails) in e:\CRMService\CRMService\Controllers\CRMController.cs:line 410

1
code or never happenedGuido Preite

1 Answers

0
votes

An error occurred in the Create TAT plug-in.An error occurred in the Create TAT Escalation plug-in. The given key was not present in the dictionary.

You've tried to reference a value that isn't present in a collection. Do you have some code we could look at?

I'd assume that you've tried to grab the value of an attribute out of an entity but one of the following has happened;

a) You've retrieved the record from CRM but haven't defined the attribute in the ColumnSet so it isn't returned

b) You've retrieved the record from CRM but it contains no data and therefore isn't present in the entity attributes collection