Lookup field name same as relationship name RRS feed

  • Question

  • Hi!

    I have started working on a CRM 2016 online system already in production and immediately ran into problems. I used the CRM Explorer - Generate Wrappers functionality to create the wrappers. But they do not compile. I get 4 errors of type:

    The type 'Company.Crm.bas_materialcode' already contains a definition for 'bas_offerproductid'    

    Which seems to be caused by there being a lookup field with that name, but also the N:1 relationship has the same schema name, instead of a typical bas_bas_materialcode_bas_offerproduct_bas_offerproductid

    What are the ways to solve this?

    Thursday, March 31, 2016 9:53 AM

All replies

  • Hello,

    You can't change the schema names once the objects are created. You got 2 ways of solving it:

    1) recreating the relationships (N:1) OR lookups

    2) manually rename the relationship property in code (and leave the EntityReference / lookup unaltered, since you'll use it the most) and recompile / fix further

    Cornel Croitoriu - Senior Software Developer

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"


    Thursday, April 14, 2016 4:04 PM