I have a managed package that is deployed in an org. In the managed package there is a vf page called ShowInformation.vfp that shows some records.

Now, I have added new feature in ShowInformation.vfp page present in my dev org and added some links and buttons, some new vf pages with associated controllers. This ShowInformation.vfp page and other new vf pages needs to be sent as an extension.

Can the extension package replace already existing ShowInformation.vfp page present in an org?

If not, Is there any way by which i could replace already existing managed package vf page using extension vf page during the extension installation process.

Or, Can i just replace/add a particular section of managed package vf page with some additional links and button

1 Answer 1


As you control both packages, in the original package page you can provide the option of doing a server-side forward to the extension page:

<apex:page ... action="{!init}">

with this controller method:

public PageReference init() {

    // Make choice via custom metadata or custom settings
    if (...) {
        // Continue into the body of the original package page
        return null;
    } else {
        // Use the extension package page instead specified
        // via custom metadata or custom settings
        String extensionPackagePageUrl = ...;
        return new PageReference(extensionPackagePageUrl);
  • Isn't this would be same as redirecting a user to a different page.
    – GiJoe
    Commented May 16, 2018 at 8:52
  • @Lambu Yes it is: the URL will change to the extension package URL.
    – Keith C
    Commented May 16, 2018 at 9:04

You must log in to answer this question.

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