03-04-2013 09:48 AM
I am experiencing an issue when creating an extension for the Opportunity competitor entiy.
OpportunityCompetitor has one key OpportunityId Opportunity Competitor has two keys OpportunityID and CompetitorId.
When I set the isextension in my new enitity and I select opportunity competitor from the drop down and build I get:
D:\Users\mvolpe\BuildPath\implementation\COppCompetitorExt.cs(329,17):The name '_Id' does not exist in the current context
ERROR - D:\Users\mvolpe\BuildPath\implementation\COppCompetitorExt.cs(331,24):The name '_Id' does not exist in the current context
I think something is wrong with my keys.
Any idea ?
03-04-2013 10:29 AM
IsExtension is meant for One to One relationships, not for One to Many.
You should leave the IsExtension off, and instead add Relationships to the Opportunity and to the Competitor objects.
03-04-2013 10:46 AM
Thanks for your quick response, I do want to create an OpportunityCompetitor extension and it is not working throwing the errors in my previous post. I don not want to create a 1:M, just an extension for opportunitycompetitor.
03-04-2013 10:55 AM
In that case, you need to add an ID field to the Opportunity Table (e.g. CompetitorID).
Next, in App Architect, Update the Opportunity Entity to select the New Field, and make sure it is set as a Standard ID.
Finally, create a Relationship from the Opportunity to the Competitor table via the newly created field.
03-04-2013 11:05 AM
I want to create an OpportunityCompetitor extension, not an Opportunity extension, so:
Thanks a lot,
03-04-2013 01:28 PM
Why bother extending it.. just:
a - add the new (custom) fields to the core table via the DB manager in the Architect (NOT AA).
b - In the AA just "update" the entity w/the new fields/properties
c - rebuild interfaces and go..
This way gets rid of all the issues in doing 1:1 junk..