Skip to content

Instantly share code, notes, and snippets.

View hhudson's full-sized avatar

Hayden Hudson hhudson

  • Insum Solutions
View GitHub Profile
@hhudson
hhudson / apex-detect-changed-items.js
Created April 9, 2021 13:32
Javascript to enhance the 'Warn on Unsaved Changes' UX with item-level call-outs
//window.onbeforeunload = confirmExit;
/* The below will not run unless the above is uncommented.
* The recommendation is to run the above command in a
* dynamic action on page load of Page 0 with the Server
* Side Condition of 'Rows returned' for the following query:
* select 1
* from apex_application_pages
* where application_id = :APP_ID
* and page_id = :APP_PAGE_ID
* and warn_on_unsaved_changes = 'Yes'