You need to sign in to do that
Don't have an account?
How does Apex understand time?
Hi,
I am new to apex and am trying to build an apex schedule class that runs everyday. If the account review date for commisions is two weeks (14 days) away the scheduler will send an email to our Sales Department.
I have hit a wall....How does apex understand time? I need an email to be sent 2 weeks before the account review date but I'm not sure how to tel apex this. I would want my code logic to run something like this...
if {!Account.Next_Account_Review_Date_c} == two weeks away OR
If today is two weeks before account review date
{
sends email
}
I don't have official code yet....but is my logic sound? How would I code in apex "two weeks/14 days away"?
Thanks for your help!
I guess this would help you.
-Naidu