0

I have a flow which should update the event status to closed after 1 day if the records are not in closed status. i can find in debug that the status is changed to closed but it did not update the record.

scenario is: event history is related record in event. when event history record is newly created with action type 'unlock', it should capture the action datetime and add 1 day to it. and if that date equals to current date and event's status is not equal to closed,
flow should update the event's status- to closed.

i can find in debug that the status is changed to closed but it did not update the record. But it did not update status

4
  • 3
    probably because your flow is running in rollback mode.
    – Nick C
    Commented Jul 19, 2023 at 2:14
  • If an error occurs during the execution of any flow element, the flow enters rollback mode. The error could be due to validation rules, process failures, API limits, or other exceptions. Commented Jul 19, 2023 at 3:42
  • How do i check that and correct it so that flow updates the records
    – SFPR
    Commented Jul 19, 2023 at 3:45
  • But usually if any error occurs ,. I would get mail saying flow execution failed
    – SFPR
    Commented Jul 19, 2023 at 3:47

1 Answer 1

0

The only way to check if your flow is working, is by activating the flow and testing it out with real records, by creating a new event history with action type = "unlock" and the action datetime to match current date or to any condition that will trigger the flow to run.

From the flow debug log, it is saying, it will update the following record's status to Closed_vod.

EM_Event_Vod__c (record), whose Id = "a3a4k...." Status_Vod__c = "Closed_vod"

As mentioned in your post's comment by Nick Cook:
If you are just "debug"-ing your flow, you can never see this changes in your record, because record-triggered flow, debug mode ALWAYS run in Rollback mode.

from Salesforce Record-Triggered flow debug mode

Rollback mode simply means, no changes will be made to the record/records. It is just a testing ground for you to check the flow's behaviour.

4
  • Hi, thanks for your input, but i already tested with real record(by waiting one day as i cannot change action datetime as it will take updated date and add one day to it and compare with current date) and found it did not update status, and then tried to debug and found this
    – SFPR
    Commented Jul 19, 2023 at 10:46
  • Wait, your flow is not scheduled, that means you don't have to wait one day to test it out. You are saying if you create a new event history, with action type = "unlock", where and what is the action datetime? Is it a field on Event History object?
    – prem22
    Commented Jul 19, 2023 at 11:20
  • yes its a field on event history object which captures the date time when event history record is created. It is created based on actions on event record, like when i click on unlock button on event, an event history records will be created with action type 'unlock' and action datetime as current .,which changes the status of event from closed to approved. And i want to add one day to action datetime and change the status on event back to closed if it is not closed by user.
    – SFPR
    Commented Jul 19, 2023 at 11:25
  • then you should run a scheduled flow, when a event history is created, set the flow to run 24 hours after and check if Event record is closed, if it is not closed then you can update the record to change the status to closed.
    – prem22
    Commented Jul 19, 2023 at 13:52

You must log in to answer this question.

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