Search code examples
dynamics-crmmicrosoft-dynamics

Add New Opportunity from Account subgrid auto-fills every single Account lookup on Opportunity


Title basically sums it up.

I have an Account screen, with a sub-grid of Opportunities (by the "parentaccountid" field of Opportunity). When I click + Add New on that Opportunity grid, it autofills parentaccountid on the new record form. That's normal.

BUT I also have 5 other Lookups to Account on Opportunity, with different/specific meanings. What's weird is that it's setting ALL of those Lookups to the Account record I started at (Account record that had the Opportunity subgrid where I clicked +).

Is this expected behavior? Anyway to change this?

I'd expect CRM to only autofill the field that defines the association for that subgrid (i.e. only auto-fill parentaccountid in this case, leave the other 5 Account lookups blank)


Solution

  • I never experienced this, but I believe this is due to some OOB relationship mapping according to a community thread. Read more

    Try to find the mapping under N:1 relationships, and if possible remove the mappings. Otherwise you may need to use the Business rule, script or plugin to remove the auto-mapped values.

    Edit:

    This explanation makes sense and it is expected behavior as per product deisgn.

    Since there is an out of the box parental relationship (opportunity_customer_accounts), all those additional account lookups are automatically mapped to that same "parent" (accountid field), and, since they have already been mapped automatically, you can't map them to another field