Visualforce Page:
----------------------
<apex:page standardController="account">
<apex:form>
<apex:pageBlock title="Account Details">
<apex:pageBlockButtons>
<apex:commandButton value="Save the account" action="{!save}" />
</apex:pageBlockButtons>
<apex:pageBlockSection title="Account Information" columns="2" collapsible="false">
<apex:inputField value="{!account.name}"/>
<apex:inputField value="{!account.phone}"/>
<apex:inputField value="{!account.industry}"/>
<apex:inputField value="{!account.type}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
output:
We have to override the "new" button on account object, for this go to Buttons, Links, and Actions on account object and click edit link near new label.
Then select visualforce page which we created on Salesforce Classic Override section.
Click on Save button, then whenever we click on new button to create new record on account object, this vf page will opened.
----------------------
<apex:page standardController="account">
<apex:form>
<apex:pageBlock title="Account Details">
<apex:pageBlockButtons>
<apex:commandButton value="Save the account" action="{!save}" />
</apex:pageBlockButtons>
<apex:pageBlockSection title="Account Information" columns="2" collapsible="false">
<apex:inputField value="{!account.name}"/>
<apex:inputField value="{!account.phone}"/>
<apex:inputField value="{!account.industry}"/>
<apex:inputField value="{!account.type}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
output:
We have to override the "new" button on account object, for this go to Buttons, Links, and Actions on account object and click edit link near new label.
Then select visualforce page which we created on Salesforce Classic Override section.
Click on Save button, then whenever we click on new button to create new record on account object, this vf page will opened.
No comments:
Post a Comment