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
Team AllCloudTeam AllCloud 

Override Standard New Button using Visualforce


I'm trying to create a VF page to override the standard New button in order to prepopulate value in the standard Name field:
<apex:page standardController="Opportunity"
    action="{!URLFOR($Action.Opportunity.New, null, [Name='Will be Populated by the system'], true)}"

Howver, it's not populated in the New layout. 
What am I missing?

VinayVinay (Salesforce Developers) 
why do you want to use vf page? Try using url hack to populate name field on opportunity.

Check below examples.

Please mark as Best Answer if above information was helpful.

Imran TMImran TM
Using a Before trigger/ Workflow has not helped me fill in or provide a default value to a standard field(NAME) while saving a new record.
I was asked to build a Visual force page and then override the 'NEW' button to add a default value to the token field, type Name, which will then allow to save a record.
Visual force page code used to override 'NEW':
<apex:page standardController="Certification__c" action="{!URLFOR($Action.Certification__c.New, NULL, ['Name'='DoNotEdit'], true)}"/>
Team AllCloudTeam AllCloud
Looks similar to my code, did that work for you?
Anand kurubaAnand kuruba
<apex:page standardController="Certification__c" action="{!URLFOR($Action.Certification__c.New, NULL, ['Name'='DoNotEdit'], true)}"/>
please follow this link also
Santoshi K VSantoshi K V

Check out this link, it may be helpul

Thank you