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
cstephenscstephens 

Link incorrect

I have a link which I have added to the campaign tab.  This link works perfectly in my app in the developer org, but when I install the app in a clean account the link is incorrect and I end up with a page does not exist error, even though the linked page is included in the package and I can reach it manually.  The link is defined as a button and links to the following:

 

/apex/MyPage?campaign={campaignid}

 

The link "appears" correct, but it links to c.na3.visual.force.com/apex/MyPage?campaignID=

instead of linking to <myorg>.na3.visual.force.com/apex/MyPage?campaignID= as it does in the developement org.

 

Any help will be greatly appreciated as this is holding up the launch of my app, and I have no idea how to fix a generated link.

 

Thx

*werewolf**werewolf*

If your package is a managed package, it will make for itself a separate Visualforce domain; if not then it'll just use the c domain.  Usually, though, these domains just resolve to each other no matter where they come from, so if you have a relative link from c.na3.visual.force.com and it points to myorg.na3.visual.force.com then it just kind of works by itself and changes its own domain.  Are you not seeing that?

cstephenscstephens

Right, that behavior is somehow failing.....  It is a managed package and the link points to c.na3.visual.force.com and that does not resolve... resulting in a page not found error.  Is there a way to correct it?

*werewolf**werewolf*

Well what's the page that you're coming from?  Usually a relative URL picks up the domain of wherever it started.  The page you're coming from is not in your package domain?

cstephenscstephens

The link is from a button added to the campaigns tab, so the page it's coming from is https://na3.salesforce.com/70150000000M6yQ  that connects via the button to this link:  https://na3.salesforce.com/servlet/servlet.Integration?scontrolCaching=1&lid=&eid=&ic=1, which is supposed to forward through to my link but fails....

 

*werewolf**werewolf*

Wait something there is a little strange.  How did you set up your custom button -- as in, what's your Behavior and Content Source?

cstephenscstephens

The button was created from App Setup->Customize->Campaigns->Buttons and Links and then it was included in the page by modifying the page layout.  This page layout was included in the package and activated manually after package installation.

 

The button was defined with the following parameters:

    Display Type: Detail Page Button
    Behavior: Display in existing window with sidebar
    Content Source: URL
    Link: /apex/MyPage?campaignID={!Campaign.Id}