You need to sign in to do that
Don't have an account?
isalew
Default styling for Lightning Out in Visualforce
Trying to implement a mobile action but having difficulties using Visualforce or Lightning.
Requirements
Attempt #1: Visualforce Page Redirect
Attempt #2: Lightning Standalone App
Attempt #3: Lightning Component Embedded in Visualforce Page via Lighting Out
Conclusion
I’m finding that Lightning components / apps do not officially support being launched via mobile action, so you have to embed Lightning components inside a visual force page via Lightning Out. This would work, except the automatic formatting typically provided to a lightning page when launched from a standalone Lightning App tab is stripped away when embedded in Visualforce, thereby breaking functionality like lookup fields.
Does anyone have a recommendation on how to navigate this kind of record create scenario in mobile? Is there a trick to using Visualforce? Or is there a way to include default styling via Lightning Out?
Requirements
- Create a new record via mobile action from an Account or Opportunity record
- On action, create, save, and display the record for editing
- On cancel, delete the record
- On save, update the record
- NOTE: This record is created differently than standard records. It must be created and saved, then displayed for editing. If the user cancels this interaction, then the record is deleted. This differs from the standard Salesforce create action, where no record is created until saved.
Attempt #1: Visualforce Page Redirect
- On action, creates and displays record with standard “Cancel” and “Save” actions
- On cancel, returns to action page, which creates a second record
- On save, returns to action page, which creates a second record
- Cannot override standard Cancel and Save actions
Attempt #2: Lightning Standalone App
- On open from lightning tab, creates and displays record (but no parent record, since launched from tab menu)
- On cancel, deletes the record, returns to originating record
- On save, updates the record, redirects to new record
Attempt #3: Lightning Component Embedded in Visualforce Page via Lighting Out
- On action, creates and displays record (but displays without formatting, so lookups don’t work)
- On cancel, deletes the record, returns to originating record
- On save, updates the record, redirects to new record
Conclusion
I’m finding that Lightning components / apps do not officially support being launched via mobile action, so you have to embed Lightning components inside a visual force page via Lightning Out. This would work, except the automatic formatting typically provided to a lightning page when launched from a standalone Lightning App tab is stripped away when embedded in Visualforce, thereby breaking functionality like lookup fields.
Does anyone have a recommendation on how to navigate this kind of record create scenario in mobile? Is there a trick to using Visualforce? Or is there a way to include default styling via Lightning Out?