• Adam Binder
  • NEWBIE
  • 0 Points
  • Member since 2017

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

I'm new to Apex, so I need some help.

I need to build an Apex Batch on a custom object to update all records (so that it runs workflows) where the invoice date is within the last 760 days. I also need this to run on a schedule nightly.

My object is Orders_and_Invoices__c and my invoice date is Invoice_Date__c

Can anyone help?
Help!

I have no experience with Apex classes and need help building one...

I have a custom object called Orders_and_Invoices__c
I have processes built in the process builder that need to be ran daily, so I need something to kick off the updates (as you can't schedule these).
There are around 30k worth of records so a time based work flow is no good. From my googling it looks like I need and Scheduled Apex Class to update all records in this object which in turn will run my processes.

Can someone help me build the code to do this?