You need to sign in to do that
Don't have an account?
Ali Husain 3
OpportunityLineItem trigger
I need to write a trigger on the OpportunityLineItem. Part of the funtionality will involve me getting to the User object. Can someone help me if figuring out how to map these objects?
Here is what it would look like in SQL:
SELECT UserID, Name, Business__c
FROM AccountTeamMember atm
INNER JOIN Account a ON a.ID = atm.AccountID
INNER JOIN Opportunity o ON o.AccountID = a.ID
INNER JOIN OpportunityLineItem oli ON oli.OpportunityID = o.ID
Here is what it would look like in SQL:
SELECT UserID, Name, Business__c
FROM AccountTeamMember atm
INNER JOIN Account a ON a.ID = atm.AccountID
INNER JOIN Opportunity o ON o.AccountID = a.ID
INNER JOIN OpportunityLineItem oli ON oli.OpportunityID = o.ID
If the Business = "XYZ", the Account Owner listed on the Account should receive 100% split.
If the Business = "XYZ" and ABC Products are added to the Opportunity, the ABC Account Owner listed on the Account should receive 100% split. If there is no ABC Account Owner, no user should receive a split.
What i'm taking from that is we need to check all account team members and verify.