0

I would like to determine if a user clicked the close button of the standard tab in a Salesforce application - NOT the browser tab. I have found this question which works ok for closing or refreshing the browser (although I would like it to run my own method and not show the "Reload site?" message it shows by default). Attached is a screenshot to clearly show the close button I mean. enter image description here

The use case is I want to be able to check if the user has added a note to the record before closing the record, and if not make them add a note.

Any guidance on how (or if) I can achieve this would be very much appreciated, I hope I have given enough details, but let me know if you need more information.

1 Answer 1

1

This is not possible today. The Workspace API does not emit events for this kind of action. You can control when/how/what to open in the workspace using it, but you can't detect standard actions (such as when the user clicks the close icon).

Also, the Workspace API is available only for Aura components.

You must log in to answer this question.

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