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
SUMIT BANERJEESUMIT BANERJEE 

While creating new account record I want to add a demo name should be automatically assigned on account name.

I would like to pre-populate the account name for this record type with something so the user doesn’t have to be bothered with entering something there because it’s a required field. 
Ravi Dutt SharmaRavi Dutt Sharma
Hi Sumit,

You can achieve this through URL hacking. You need to overwrite the New button with a VF page. The sole purpose of the VF page is to provide a redirection. The associated controller of the VF page will construct the URL, populate the account name field using url parametes and then open the standard account page.

You can find more information about URL hacking here : http://writeforce.blogspot.in/2013/01/prepopulating-fields-using-url-hacking.html

Let me know if you have  any questions. Thanks.
yogesh_sharmayogesh_sharma

Hi Sumit,

You can create a Java Script Custom button with type List button to pre-populate the Account Name for particular record type.

I hope it helps you.

Thanks,

Yogesh Sharma

SUMIT BANERJEESUMIT BANERJEE
Thanks @Ravi Dutt Sharma, But How I will repace 'new' Account button with custom button.
Nachiket Deshpande 33Nachiket Deshpande 33
Hi Sumit,

You can create a custom button and use that button on Accounts page layout and hide the standard New button from page Layout.

Thanks,
Nachiket
yogesh_sharmayogesh_sharma

Hi Sumit,

You can override Standard New button with following steps:

1. Setup -> Account -> Button and Links -> New (Edit) -> Here you can override this with your visualforce page.

I hope it helps you. Please mark this as best answer if it helps you, so that it would be helpful to others.

Thanks,

Yogesh Sharma