Hello,
I could not find a D365 Customer Engagement forum, please let me know if there is a better place for me to post this. Thank you.
We are new to Dynamics CRM, have been handed a large amount of existing code and a project that seems to be partially finished.
First, we were getting errors that 'invoice' entity doesn't contain attribute with Name = 'abcname'.
So in the CRM solution we added 'abcname' as a Single Line of Text field.
Now we are getting the EntityReference exception in the subject. line of this post. If we comment out the following line prior to our Create:
crmItem[crmRelationship.EntityReferenceColumn] = new EntityReference(relatedItem.LogicalName, relatedItem.Id);
Then we do not see the exception, and the Invoice creates but does not have data in 'abcname' or the customerid column. They are both blank.
We have tried adding a relationship, changing the column type, and backing those out, but are still not getting data into the two fields.
(We now have a few CRM sites, since we didn't realize at first you cannot successfully change a data type.)
My question is: Where can I look in the Docs for the right way to use the EntityReference? Is there sample code I should look at?
Any suggestions for troubleshooting this? We are fairly certain it is our new field causing the current problem but the error seems a bit generic and I'm not sure what it is trying to say. In one and two syllable words, please; due to our newbie-ness.
Thanks!
Emily H
*This post is locked for comments