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
Shivani DesaiShivani Desai 

I would like my trigger to execute only if it belongs to a particualr record tye and has a true value for a checkbox field. I am not sure what the exact syntax should be checking both the conditions simultaneously. Can anyone please help?

PrasanntaPrasannta (Salesforce Developers) 
Hi,

I'm not entirely sure if you want the trigger to fire when the RecordTypeId is a specific value or to fire when it is not a specific value.
However to evaluate the checkbox value in apex trigger use this-

(s.Really_Big_Deal__c == true )

where 'Really_Big_Deal__c' is the checkbox field name.

Hope it helps.
Shivani DesaiShivani Desai
Hi Prasannta!

Thanks for replying. I am trying to fire the trigger if it is a specific value of the record type.

Shivani