0

Thank you in advance for any suggestions!

Scenario: I have a screen flow that guides a user through updating certain fields on a custom object, after they have entered the required data it is submitted for approval in the flow via a 'Submit for Approval' action. I then have a sub process with a pause element.

Important: I am not updating the record, just storing the data in variables.

The approval process goes through 2 approvals before the final approval / rejection steps. Once approved or rejected, the flow should resume and either update the records fields with values from the variables in the main flow (if approved) or end the flow (if rejected).

Problem: I do not want to update the fields on the record and then submit for approval as there are a number of fields that may or may not be updated and If rejected I don't believe I can identify which were changed and only revert those back to the prior values hence the somewhat complicated process. I am currently stuck on how to resume the paused flow when a custom "Approval Status" field is updated.

From what I have read, I can subscribe to a Platform Event from the flow and if the platform event is triggered it can resume the flow. How can I trigger the platform event when the Approval Status field is changed? And can it be done without code?

Your input and advice is much anticipated!

0

You would need to create a custom platform event to publish status changes. Then:

  1. Create a record-triggered flow on the customer object and publish platform events on status changes.
  2. Have the flow you are working on subscribe and listen for this platform event.

Think of custom platform events like custom object records that are not saved. They disappear after they are consumed.

I have a Youtube channel and I am working on a platform event example. It should be on the channel in a few days.

Update: The video is now published here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.