+ Start a Discussion
ckellieckellie 

Time-Based Apex Trigger

Are there any examples to creating a time-based trigger? I am needing to remove the value in a lookup field after 30 days field was populated.

Best Answer chosen by Admin (Salesforce Developers) 
Ron HessRon Hess

i would look at the time-based workflow, much easier if it can work for you.

 

otherwise you would read the Scheduled Apex docs.

All Answers

Ron HessRon Hess

i would look at the time-based workflow, much easier if it can work for you.

 

otherwise you would read the Scheduled Apex docs.

This was selected as the best answer
Yoganand GadekarYoganand Gadekar

Can run a piece of code by scheduling it. U will need to write two classes a batch class and a scheduling class. Trigger cannot be scheduled.

ckellieckellie

Ron,

 

I would use a time-based workflow, but I cannot remove a value from a lookup field. Do you know how to do this?