0

Generally, in our custom visualforce pages we have a link from the record edit for that gets the user back to the listing page for the given custom sObject that looks something like:

<apex:outputLink value="{!URLFOR($Action.MyObject__c.List,$ObjectType.MyObject__c)}">Back to: MyObject List</apex:outputLink>

For ope specific custom object we have created a custom listing page in Lightning App Builder. How are we supposed to generate the apex:outputLink to direct the user to this custom listing page?

0

Just provide the page name as "/lightning/n/YourCustomLightningPageName" in value attribute of apex:outputLink and it will redirect to your lightning app page

If you have namespace the url will be lightning/n/namespace__YourCustomLightningPageName

  • What about namespace? If this Lightning page is deployed via managed package wouldn't the name of the page need to contain the namespace as well? Wondering if there is some function that does the right thing (to get the name with the namespace if appropriate). – Homerlex May 16 at 16:08
  • @Homerlex if you have namespace the url will be lightning/n/namespace__YourCustomLightningPageName – Pranay Jaiswal May 16 at 16:28
  • yes, I understand what the url will be with and without the namespace. I was hoping there was a function that would generate the url based on whether or not it has a namespace. – Homerlex May 16 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.