I'm new to salesforce development, and I want to overwrite the New action button for my custom object. Here is my VFP code.
<apex:page standardcontroller="Document__c">
<apex:sectionHeader title="New Document" subtitle="Document Creation Form"/>
<apex:form >
<apex:pageBlock title="Document Information">
<apex:pageBlockSection>
<apex:inputField label="Document Name" value="{!Document__c.Name}" required="true"/>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
I really don't know how to start this, but I want the same pop-up window like the standard button. How can i do this?
I guess I need an apex class for that to save, but firstly I want to make the same like the standard new button, but with the fields which I choose.