You need to sign in to do that
Don't have an account?
Ab
Execute trigger for particular record type
Hello,
I have a trigger like below, how can i make it execute only for one record type.Name
Thank you for suggestion
I have a trigger like below, how can i make it execute only for one record type.Name
trigger XTrigger on Order (after update) { if (Trigger.isAfter && Trigger.IsUpdate) { Class_Name.functionName(Trigger.new); }
Thank you for suggestion
All Answers
You can query the recordx type and use that in your if condition.
select Id,Name from RecordType where sObjectType='Account' and Name ="Your record type";
Update the if condition to check for the recordType.
Regards,
Krishna Avva
Try this code below Hope this helps !
Thanks,
Sarvani