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
Vishu Sri 6Vishu Sri 6 

How to avoid before trigger to fire on quote Object when any of the related quotelines are getting deleted.

How to avoid before trigger to fire on quote Object when any of the related quotelines are getting deleted.

I have a trigger on quote trigger which has soql to fetch quotelines from db, but I don't want to fire this trigger when quotelines are getting deleted.
Anant KamatAnant Kamat
If the trigger is on Quote object, then it would only if there is an insert/update activity on the Quote object only. However only if there is an update on the Quote object in any field due to deleting the line items, only then this would be possible. Can you please check if there is a trigger on QuoteLineItems which updates the parent Quote object. In that case you need to !isDelete in the trigger for QuoteLineItem to prevent the same.