SFDO-Community / GrantGuides_f1

The Grants Content Kit stores and organizes grant proposal content in Salesforce, allowing grant writers to streamline applications starting with their best content.
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Grant Preview (Export) - Known issue #32

Closed iandrosov closed 9 months ago

iandrosov commented 10 months ago

To pass record context and parameters from Lightning to Visual Force requires keeping a state of current Grant record.
Lightning for security reasons (CROSS-SITE scripting attacks) do not allow any parameter passed to Visual Force because VFP is on different domain from LEX.

This reason launching preview tab with PDF view require a workaround - a state record/object.
We create a single grant state record per user-grant keeping current Grant to initialize preview page when navigating from Grant editor LWC->Preview VisualForce crossing site boundary.
As user changes to work on any new grant state record is updated with new Grant app ID.

This solution leads to limit of user can export only current grant and not able to simultaneously work on many Grants on many tabs/browsers and expect preview/export to work for all.
Only the current active Grant can export.

There are no current other fixes for this limitation in Lightning Salesforce.

iandrosov commented 9 months ago

Documented in WIKI