function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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?
EldonEldon
Hi,

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.

Regards