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

help in trigger

One of my developer create a trigger using this


String userName = UserInfo.getUserName();


so trigger dont fire for this user.

Now i wann to create a trigger. it should not fire when product2 has one field call NPA_NXX__c has some particular value


what should i do in order not to fire the tigger.

Imran MohammedImran Mohammed

Depending on the event type the trigger gets fired for every action, only the logic used in the trigger could bypass the code and not execute certain or entire code within the trigger.


I think you are almost there in what you want.

In your case, you should write the trigger on Product2 object and then access the field to verify if it holds a particular value.



Praveen SappatiPraveen Sappati



for particualr field in products yout should use opportunityline item standard object.






praveen Sappati