google-code-export / npsp

Automatically exported from code.google.com/p/npsp
1 stars 0 forks source link

Contact Id for Role field trigger fails in certain circumstances #313

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Find a salesforce organisation where the Household_Opportunity trigger fires 
before the OpportunityContactRoles trigger.
2. Enable Opportunity Contact Role Trigger and Household Contact Role trigger.
3. Create two contacts. Associate one to a household and leave one without a 
household.
4. Do a bulk insert with 2 opportunities, one for each contact.

What is the expected output? What do you see instead?
Expected: Each opportunity has the appropriate OpportunityContactRole records 
associated.
Actual: The opportunity for the contact with a household has OCR records, the 
other opportunity does not.

What version of the packages are you using?
C&O 2.1.2
HH 2.3.7

Please provide any additional information below.
I suspect lines 21-33 of the class OpportunityContactRoles are to blame.

Original issue reported on code.google.com by jamesmel...@gmail.com on 6 Dec 2011 at 8:29

GoogleCodeExporter commented 9 years ago
Interesting... thanks James, I think its seeing a primary and just punting when 
the secondary gets there. I'll take a closer look for the next C&O patch.

Original comment by kbro...@gmail.com on 7 Dec 2011 at 8:49