Create a Visual force page ‘AccountUpdate’ .This page should display a form having Account Name, Account Number, Type, and Site fields. There should be ‘Save ‘button on the page. On clicking on save, the fields should be saved as an Account record.
If you use this page with this URL "https://<domain>/apex/AccountUpdate" , it will create a new Account if you use this page with this URL "https://<domain>/apex/AccountUpdate?Id=0012800001IVL0w" , it will update that Account
If you use this page with this URL "https://<domain>/apex/AccountUpdate" , it will create a new Account if you use this page with this URL "https://<domain>/apex/AccountUpdate?Id=0012800001IVL0w" , it will update that Account
VF page:
<apex:page showHeader="true" standardController="Account">
<apex:form >
<apex:pageBlock title="Account Update">
<apex:pageBlockSection title="Account Details">
<apex:inputField value="{!account.Name}"/>
<apex:inputField value="{!account.AccountNUmber}"/>
<apex:inputField value="{!account.Type}"/>
<apex:inputField value="{!account.Site}"/>
</apex:pageBlockSection>
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlock>
</apex:form>
</apex:page>
If you use this page with this URL "https://<domain>/apex/AccountUpdate" , it will create a new Account
if you use this page with this URL "https://<domain>/apex/AccountUpdate?Id=0012800001IVL0w" , it will update that Account
All Answers
VF page:
<apex:page showHeader="true" standardController="Account">
<apex:form >
<apex:pageBlock title="Account Update">
<apex:pageBlockSection title="Account Details">
<apex:inputField value="{!account.Name}"/>
<apex:inputField value="{!account.AccountNUmber}"/>
<apex:inputField value="{!account.Type}"/>
<apex:inputField value="{!account.Site}"/>
</apex:pageBlockSection>
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlock>
</apex:form>
</apex:page>
If you use this page with this URL "https://<domain>/apex/AccountUpdate" , it will create a new Account
if you use this page with this URL "https://<domain>/apex/AccountUpdate?Id=0012800001IVL0w" , it will update that Account