+ Start a Discussion
Linda 98Linda 98 

Trigger on opportunity-For Instance

For instance,
I have a trigger on opportunity and i would like to fire it only when certain named line items are added.
Example:i wantt to fire this trigger when product named-'ABCD' is added to that opportunity.
(I also have other conditions to be considered along with this,But this is major condition)
please help 
Ansh CoderAnsh Coder
Hi,
When you add a new product to your opportunity, it stores as a record in object named 'OpportunityLineItem'.
For this to work, you have to create the trigger on object 'OpportunityLineItem' not opportunity.

Hoope this help.

Thanks,
Anand Sharma