You need to sign in to do that
Don't have an account?
Sonya Dhand 3
VisualForce page not refreshing correctly
Hi Community
I have a VF page section on a standard page for a custom object and when I edit and save some fields the section will refresh as expected by returning back to the VF page. However some field will refresh and then display the home page and standard desktop view of the whole standard page within the vf section as below
I have attached my code as well, I would appreciate any help? :)
I have a VF page section on a standard page for a custom object and when I edit and save some fields the section will refresh as expected by returning back to the VF page. However some field will refresh and then display the home page and standard desktop view of the whole standard page within the vf section as below
I have attached my code as well, I would appreciate any help? :)
<apex:page standardController="Employee__c"> <apex:form > <apex:pageMessages /> <apex:pageBlock mode="inlineEdit" id="all" > <apex:actionFunction action="{! save }" name="saveChanges" reRender="all" oncomplete="location.reload()"/> <apex:pageBlockButtons > <apex:commandButton id="saveButton" value="Save" onclick="saveChanges()"/> <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" immediate="true"/> </apex:pageBlockButtons> <style> body .bPageBlock .pbBody .grey .pbSubheader{ background-color:#fbf8f8; } body .bPageBlock .pbBody .grey .pbSubheader h3{ color:#000; } </style> <apex:outputPanel styleClass="grey" layout="block"> <apex:pageBlockSection columns="3"> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >SIA Licence Type</apex:outputLabel> <apex:inputField value="{!Employee__c.SIA_LICENCE__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >SIA Licence #</apex:outputLabel> <apex:inputField value="{!Employee__c.Licence_No__c}" style="width:120px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Expiry Date</apex:outputLabel> <apex:inputField value="{!Employee__c.Expiry__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >CSCS Card?</apex:outputLabel> <apex:inputField value="{!Employee__c.CSCS_Card__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >CSCS #</apex:outputLabel> <apex:inputField value="{!Employee__c.CSCS__c}" style="width:120px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Expiry Date</apex:outputLabel> <apex:inputField value="{!Employee__c.CSCS_Expiry_Date__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >CCTV Licence?</apex:outputLabel> <apex:inputField value="{!Employee__c.CCTV_Licence_Type__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >CCTV Licence #</apex:outputLabel> <apex:inputField value="{!Employee__c.CCTV_Licence__c}" style="width:120px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Expiry Date</apex:outputLabel> <apex:inputField value="{!Employee__c.CCTV_Expiry__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Driving Licence?</apex:outputLabel> <apex:inputField value="{!Employee__c.Driving_Licence__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:3%" labelStyle="width:30%" > <apex:outputLabel >Driving Licence #</apex:outputLabel> <apex:inputField value="{!Employee__c.Driving_Licence_Number__c}" style="width:120px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Expiry Date</apex:outputLabel> <apex:inputField value="{!Employee__c.Driving_Licence_Expiry__c}" style="width:80px"/> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:outputPanel> </apex:pageBlock> </apex:form> </apex:page>
All Answers
Could you please share the screenshot a little bit enlarge. Or send me attachment at forcecube@gmail.com.
Thanks,
Kapil
Fix your inline page width from the layout.
Thanks,
Kapil