Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Plugin Key has a null value

$
0
0

As always I apologize if this has been answered before, please feel free to point me in another thread. I have looked, but haven't seen a solution to my issues yet.

I have a plugin I wrote that is triggered on an Update to the contact entity.

It is a post update with a postimage so that I can grab the updated Field data.

There are three fields in here, and all three of them could end up with a null value.

The plugin works great if the data is there, but if the value has been updated to NULL, I get the "the given key was not present in the dictionary" error.

---

I could probably do this on a pre-update as well with a pre image... but I feel like I would end up with the same problem.
I have to use images, because the data isn't always updated, but I need to reference those values.

I use them to create another record on a custom entity.

So I guess my real question, and something I'm not very familiar with is...

How does one set up the plugin so that if one of the fields is null, it doesn't try the rest of the code and I can avoid this error?


Daniel


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>