Skip to content

[feat] sfpegCardCmp - Enforce save on edits before closing the page #50

@roygre123

Description

@roygre123

Hello @pegros ,
I've been using your amazing PEG component repository for many of my client's use cases. We have encountered a puzzling behavior of the system that I was wondering if you believe that could be solved with PEG.
We are trying to enforce standard Salesforce record behavior on screen flows. When a user enters/changes a value in one of the screen's fields and navigates outside of the context of a screen flow (on a lightning page layout) to another tab or out of the focus of the tab that the screen flow is on he should be prompted to choose whether they want to save, discard or cancel the action (same as with a new/update record standard action).
Another alternative would be some kind of "Autosave" mechanism if possible. The idea is to minimize the risk of losing precious screen flow data entry updates.
Adding an example of the record detail component and a screen flow side by side under the same tab. When editing the record detail component and trying to close the tab without saving it throws the prompt. However, when you edit the screen input fields in the flow and try to close the tab it doesn't warn the user. The client thought/idea was to have a similar experience. Attaching a screen shot and recording.
Do you think this is achievable with PEG components/events or if we'll wrap the flow in a LWC container? Is there some way to identify that a flow screen input field has been edited and use the event to create an interaction between the LWC and flow?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions