The Given key was not present in the dictionary.
Posted by Nitin Dhawan on December 30, 2009
| In one of solution, I was facing problem with one custom entity where I was not unable to retrieve newly created attributes from a custom entity getting error [The Given key was not present in the dictionary]. However, It looks like there are few plug-ins registered on execute message for some of existing attributes. Initially, Was not sure about the logic behind these plug-ins, some where may be they are causing issue of retrieval. | ||||
| To overcome this issue, I have consisder different approaches: | ||||
|
||||
| But, This is a not a right approach. After going some deep dive later i found it’s not a problem with the code. When ever we create a new attributes in a exiting published custom attributes having records. We need to explicitly manually anter one value in a database table. Value can be 0 but should not be null. | ||||
| After inserting one entry in table my code start working. Happy Coding |
||||
Advertisement