2

I have a Visualforce page with following code to redirect page abcd when click link:

<apex:outputLink value="/apex/abcd?sfdc.tabName={!tabName}&state=group"
    >abcd</apex:outputLink>

In lightning theme version Summer'17 it working well but when update to Winter '18, it's not working with following error message:

Apex page abcd does not exist.

When I check inspect element on browser I see url of 2 version is different:

  • Summer '17:

    <a href="/one/one.app#/alohaRedirecthttps://account-geolocation-dev-ed--c.ap2.visual.force.com/apex/abcd?sfdc.tabName=...&amp;state=...&amp;isdtp=p1">abcd</a>`  
    
  • Winter '18:

    <a href="javascript:srcUp('%2Fapex%2Fabcd%3Fsfdc.tabName%3D01r0k0000008jRJ%26state%3D...%26isdtp%3Dp1');">abcd</a>
    

How can fix problem? Please share some thoughts.

1 Answer 1

2

Using relative URL does not work in all scenarios. Better would be to use $Page global variable as it dynamically generates appropriate Page URL:

Try replacing your code with following-

<apex:outputLink value="{!$Page.abcd} + '?sfdc.tabName=' + tabName + '&state=group'"
    >abcd</apex:outputLink>
1
  • Or use 'lightning:formattedUrl' base component
    – Raul
    Nov 21, 2018 at 20:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .