+ Start a Discussion
Vamshi KrishnaVamshi Krishna 

Trigger on custom object field related to standard object

Consider Account(std object),Vehicle(custom object-lookup to account) and forms(another custom object- loookup to account).There is a field on custom object Vehicle called "Expiration date". Customers will apply for a form once their vehicles gets expired to get renewed. The forms are shared to account and vehicles(sharing rule).I want to send an email alert  to a team (details of vehicle) when the vehicle gets expired and didnot apply for renewal. Bit confused but can we do this? Batch class or trigger?

You can write a batch class to run everyday which checks for expired vehicle records that do not have forms record associated. Then you can send mail to them.