Dynamics CRM: "The given key is not present in the dictionary"

Source: Internet
Author: User

Inadvertently hitting the problem in the plugin, it is very simple to call the external Web service, and then update the field in the record based on the callback results.

Online suggestions are to check whether this key exists, at the beginning of the very understanding, this field must exist Ah, how to check it?

Then add trace, try to use Attribute.contains check, the original really does not exist

Remember to note that for entity records, if the field value is empty, do not return this field

This can only be added, not directly assigned

The standard code is as follows

if (E.attributes.contains ("New_expressstatus"))
{
e["new_expressstatus"] = result;
}
Else
{
E.attributes.add ("new_expressstatus", result);
}

Dynamics CRM: "The given key is not present in the dictionary"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.