How to call Apex class in trigger in Salesforce?

How to call Apex class in trigger in Salesforce?

Sample Trigger:

trigger sample on Account (before insert)
{
    for(Account a : trigger.New)
    {
        sampleRest s = new sampleRest();
    }
}

Sample Apex Class:

public class sampleRest
{
     ………………….
      ………………….
      ………………….
      ………………….
}

Leave a Reply