Skip to content

Refresh Screen Flows on Lightning Record edit

Published: at 12:13 PM

Refresh Screen Flows on Lightning Record edit

Lighnting-record-page && screen-flow Scenario:

I recently stumbled upon an annoying lack of a certain feature when utilizing screen flows on Lightning-Record Pages in Salesforce …

When screen flows are placed on a Lightning-record page in places such as a tab, it is possible that the data being utilized in the screen flow can become out of sync with the record data itself when a user makes edits to various fields.

This leads to an annoying user-experience for business users when they begin to interact with a screen flow following changes to the underlying record … they will likely notice the screen-flow displaying old data and suspect a defect in the flow itself.

Why is this?

While the overall record itself and various standard components you commonly see on Lightning-Record Pages refresh themselves with the newest record data on edits … screen flows do not (see image below … screen flows 1 && 2 in the image will not stay up to date with the record following field change).

Potential Solutions:

  1. Listen for changes of desired fields && then refresh the entire window which will in effect also refresh the page’s screen flows with the updated record data.

(I have a 1st draft in a production org using this approach by utilizing a Lightning Web Component which refreshes the current window … stay tuned for another post covering this && potential improvements)

  1. Same as 1 above BUT target the tab and/or flows themselves for refresh vs. refreshing entire window.

(no luck on this approach but I haven’t bothered much with it since solution 1 was sufficient for our users)

  1. Moreso just an additional feature/improvement to go with the prior solutions === refresh the screen manually from the screen flows after interaction

(solution 1 also accomplishes this IF the screen flows interact with fields the solution is already ‘listening’ for).

(There’s already some discussion threads and DOC guidance on refreshing from flows manually so I will put off discussing this.)

salesforce-screen-flows-fail-to-refresh-after-save-on-lightning-record-page