function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Visualforce page url in Lightning

How do I build a VVF page URL in Lightning?
e.g.  - in classic I would build a url like "/apex/myVisualforce?myvar=1"
what would be the the URL in LEX (without building a redirect that slows things down.. ;) )?

Vasani ParthVasani Parth
Hi Roy,

As you know,URL hacks dont work in lightning experience, couple of options you can consider here :

Option 1
If possible, you may consider reverting back to Salesforce Classic until (or if) Lightning Experience supports your needed features. It's not a complete product yet but is getting new features each release. In the release notes there's usually a section about what new is supported but also what isn't yet.

Option 2
Try using Chatter Quick Actions that can pre-populate values for you. For creating Accounts this may need to be a Global Action, but for Contacts and Opportunities those can be object-specific and available from their parent account page.

Option 3
Have your custom button URL point to a Flow. You can use its screen wizard to prompt for fields, have fields pre-populated, etc. if you embed the Flow in Visualforce page then on complete you can redirect the user to the newly created record.

Hope this helps !