0

'Last date' is a Date/Time field, as soon as time is passed on the particular date populated in this field, I want to update another field Status as 'Done'. As there is no record update in our case, so can't use Workflow/Trigger/PB. How can I achieve this?

1
  • You can make use of a time-based trigger for such a scenario, where you can mention the time to trigger like 1hr after LastDate or 1Day after LastDate or before as per your requirement. Feb 8, 2022 at 12:52

1 Answer 1

2

Using the recommended SFDC automation tool - Flow, you set up a Record-triggered Flow with scheduled paths

  • The Scheduled Path executes at 0 days before (or after) the value of LastDate__c.
  • If the value of LastDate__c is changed, SFDC automatically reschedules the path

Now, if you have existing records populated with LastDate__c already and are adding this Flow, you need to coerce those existing records to "trigger" the flow. This will involve doing some DML (perhaps through Data Loader) on those records so the flow's entry condition is triggered.

An alternative to the record-triggered flows with scheduled paths is to do a Scheduled Flow that runs through all records with Status != DONE every day. If the value of the record's LastDate__c = TODAY(), then direct the flow's logic to your field update. This is a no-code solution to a scheduled apex batch job.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .