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
SusanConnorSusanConnor 

simple code for three-column display in Account page layout

I have a client who would like to have three columns display in one section of their Account page layout, and I don't know the visualforce behind it! Is there simple code that would allow me to build a Visualforce page that I could use "inline" on the standard page layout?

 

Thank you!!

 

 

WorkhardWorkhard

Hi,

Use the below code and add this VF page on layout of Account.

 

<apex:page standardController="Account" >
  <apex:form >
        <apex:pageBlock mode="inlineEdit">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!edit}" id="editButton" value="Edit"/>
                <apex:commandButton action="{!save}" id="saveButton" value="Save"/>
                <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection >
                <apex:outputField value="{!Account.name}">
                    <apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
                        hideOnEdit="editButton" event="ondblclick"
                        changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
                </apex:outputField>
                <apex:outputField value="{!Account.billingcity}"/>
             
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>