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

Overriding the new and edit buttons to an custom object

I have created a custom object realted to accounts table.

I have created a page to use it to overirde the new and edit button forms as below.

But it is working fine for the edit, not working to the new.

I am not sure what is happening, do I need to enter the account id also in the form since related to accounts table.

<apex:page standardcontroller="Document__c" showHeader="true">

<apex:form >

<p><b>title</b><br />

<apex:inputField value="{!Document__c.Title__c}"/>


<p><b>url</b><br />

<apex:inputField value="{!Document__c.Doc_Url__c}" />


<apex:commandButton value="Save" action="{!Save}"/>

</apex:form><br />

  Thanks for any help in advance.