Activity › Forums › Salesforce® Discussions › How to call a class and its methods using a trigger in Salesforce? Salesforce® Discussions How to call a class and its methods using a trigger in Salesforce? Posted by Udit on April 27, 2020 at 2:59 PM How to call a class and its methods using a trigger in Salesforce? Aditya replied 6 years, 1 month ago 2 Members · 1 Reply 1 Reply Aditya Member April 27, 2020 at 4:28 PM //Class.. public class MyClass{ public static void TestMethod(){ //Your code in the class } } //trigger Trigger testTrigger on Account(before insert){ MyClass.TestMethod(); } Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me