CRM Entity name same as CRM attribute name issue

Jul 1, 2009 at 6:36 PM

I have a crm picklist attribute that has the same name as the entity. Intellisense seems to correct for this my adding a '1' after the name.

for example:

entity name = new_caps

attribute name = new_caps

so in VS 2008:

new_caps cp = new new_caps();

string val =; //the '1' gets appended to the attribute name even though the attribute name in CRM is just new_caps.

When I try to use LinqtoCrm for getting the entity back, I get a "Server was unable to process request" with a detail of "new_caps entity doesn't contain attribute with Name = new_caps1.\n  Platform\n""

I have updated the crm reference to the latest and greatest so know there is no disconnect there.

Any help would appreciated!!


Jul 1, 2009 at 8:06 PM

I know this is an insanely lame answer, but your best bet would probably be to just change the name of the attribute.  Presumably, the web service generated code has a "display name" (with the "1") and a "real name" (without) attribute that one is supposed to use when actually talking to the web service. Only in situations like yours do these differ. You could try and get LinqtoCRM to use the "real name" when generating FetchXML.