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
k practicek practice 

When i click a button on account detail page how to create Contact?

       I have a button in Account detail page like "Create Contact".When i click this button how to create contact with account name related account?

Go to Setup -> Build -> Customize -> Accounts -> Buttons, Links and Actions -> New Button or Link -> 

Create your button "Create Contact" 
Display type - Detail page button
Behaviour - whichever you prefer (other than Execute Javascript)
Content Source - URL

In the text area give - /003/e?retURL=%2F{!Account.Id}&accid={!Account.Id}

If this resolved your issue, kindly mark it as the solution.