I am writing an exe to create opportunity.
I have written below code but is giving error "key not present in the dictionary"
Entity opportunity = new Entity("opportunity");
Guid custid = new Guid("38F17546-DDC7-E411-883E-005056C00008"); opportunity["customerid"] = new EntityReference("account", custid);
//create Opportunity record in crm opportunityId = service.Create(opportunity);
Any help on this will be helpful
Is there any plugin associated with opportunity ?? try to set topic of your opportunity as well,
also it is better to write your code under try and catch block, and catch fault exception to get complete details error information.
Need help in CRM Contact US | Our Blog | Follow US | Like our Facebook Page | Our Book
Make sure to Vote as Helpful and Mark As Answer ,if you get answer of your question.
It was plugin that giving error. have disabled plugin and opportunity record got created.
Now will need to check plugin code.