Print this page

Can a customer edit Visual force page in a managed package ?

Knowledge Article Number 000220957
Description Customer has installed a managed package and this package is supported by salesforce.com support or a partner.Customer now wants to modify a VF page in this package, Can he modify ?
Resolution
The customer will not be able to modify the VF page. 
The cleanest solution for this problem would be to generate the fields displayed dynamically based on field sets.
Below is an example on using field sets to create VF dynamically. You would probably need to create multiple field sets for different sections of the page etc.
 
<apex:page standardController="Account">
<apex:form >
<apex:pageblock > 
<apex:pageBlockSection title="Account detail">
<apex:repeat value="{!$ObjectType.Account.fieldsets.accountFieldSet}" var="fieldValue">
<apex:Inputfield value="{!Account[fieldValue]}"/>
</apex:repeat>
</apex:pageBlockSection>
</apex:pageblock>
</apex:form>
</apex:page>
OR the customer can surely try to override managed package VF page with their custom VF page and/or controller logic if
  • the controller is global
  • all its public properties are global
  • all its public methods are global
The developer in the local org can copy/paste the packaged VisualForce to create their own, and reference the controller, and all its properties and methods. They will need to add the namespace references to class name and object/field names.
If you want them to be able to extend your managed package class and override its methods, then
  • the controller should be defined global virtual
  • all its public methods should be defined global virtual




promote demote