function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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