+ Start a Discussion
Jerun JoseJerun Jose 

Include visualforce page from managed package

Hi,

 

Is it possible to embed a visualforce page from a managed package in our own custom visualforce page?

I am trying to use the apex include tag to reference a visualforce page from a managed package. I am not able to save the page, as I get the error that the controller is not visible.

<apex:include pageName="Namespace__VFPageName"/>

 
Is there some other way to do it?

Sridhar BonagiriSridhar Bonagiri

Hi,

 

You can include an existing VF page from a managed package, if there are any controllers are attached to the class which is a part of managed package will not be visible and SFDC will throw an error. To avoid this you need to declare that controller class as global instead of public.

 

Please let me know if you have any questions.

 

Regards,

Sridhar Bonagiri

If this post is your solution, kindly mark this as the solution and give Kudos

Jerun JoseJerun Jose
But if the package is a managed package, then we cannot change the accessibility of the controller class to set it as global. Is there any other alternative then?
Sridhar BonagiriSridhar Bonagiri

Hi,

 

There is one alternative for that, if you have access to the code then create the VF Page and controller class out side the package.

 

Regards,

Sridhar Bonagiri

If this post is your solution, kindly mark this as the solution and give Kudos