The given key was not present in the dictionary Xrm.Page.Entity.Save RRS feed

  • Question

  • Very specific error. I have a button that calls a function on the opportunity entity. It calls Xrm.Page.Entity.Save and I get the famous "The given key was not present in the dictionary." However if I change the fields manually and clicked the save button on the ribbon bar I get no errors.

    I have spent an entire day on Google and have not found anything specific to my situation. 

    I use the same code on a custom entity and it works without issue.

    Any insight would be appreciated. 


    Friday, October 24, 2014 9:10 PM

All replies

  • hi Mate,

    this may be an exception from your plugin.

    when you manually change fields and submit, those fields will become dirty and will be submitted to the server.

    if missing attribute is the issue, you could force submit the field



    Friday, October 24, 2014 11:36 PM
  • The error 'The given key was not present in the dictionary' is a server-side error, which would originate in a plugin (or synchronous workflow). However, it may occur because the plugin does not cope gracefully with a missing attribute (as per the previous post)

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, October 27, 2014 10:00 AM