Hello,
I have had issue with the SDK in setting certain attributes for the contact entity using C#.
I am able to connect to the CRM and create contacts no problem with the Microsoft.Xrm.Tooling.Connector.
However when creating the contact certain attributes are not available to be set, where as others are.
For example,
eg I can set :
Entity newContact= new Entity("contact");
newContact["emailaddress1"] = 'test@test.com'
newContact["vin_salutation"] = new OptionSetValue(10000000)
and save the entity
However if I set some of the other entities
eg.
newContact["vin_primarylanguage"] = new OptionSetValue(200000000)
It will error when saving to the crm and I notice that when debugging that 'vin_primarylanguage' isn't in the list of attributes.
Strangely when editing the contact in the D365 interface I can set the value of this field and if I then edit the contact programatically using the Microsoft.Xrm.Tooling.Connector I can now edit and save the attribute.
It seems that when the SDK is initially creating a contact entity it does not map all the attributes. I have looked in D365 and I can't see a reason why certain attributes are not mapped when others are.
I could provide more details with the code but was wondering if anybody had similar issues or could point me in the right direction of what the issue may be?
Thank you
*This post is locked for comments