• Aldrino Rodrigues 3
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi,

Please can someone help with with an Apex scheduled trigger or guide me in the right direction.

I have the below custom fields in Salesforce :
Date field >> 'Renewal date'
Pick list  >>  'Account Type' 
Pick list  >>  'Contract Type' 
Text Field >> 'Product 1 Delivered'
Text Field >> 'Product 2 Delviered' 

The Trigger is to run daily

I've tried to explain the query logic as best as i can below.
 
IF 
     Renewal date = Today
              AND
      Contact Type = "Auto-Renew"
             AND
( Account Type = 'Active Client' - OR - 'On-Hold Client' )



THEN,
           UPDATE 'Product 1 Delivered' = 0,
           UPDATE 'Product 1 Delivered' = 0,
           UPDATE Renewal date = Renewal date + 365
. i.e next year



I'd also love if there was a way to send out an email alert or chatter post; however this is secondary.

I hope this make sense.....

I dont know enough APEX to do this yet. Any help will be highly appriciated.

Thank you