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
Lakshmi SundarLakshmi Sundar 

Prefill Account Name field

I am trying to create a new account from opportunity details page. I added a new custom button to "Create New account".  This button should take me to New account page with data prefilled (Account Name, Email and Phone) from user field values in Opportunity page.  Is this possible?
Park Walker (TAGL)Park Walker (TAGL)
What you want to do is possible, but there seems to be some misunderstanding about the schema. Opportunities do not contain any user data; they have a one-to-many relationship with Contacts, and a many-to-one relationship to Account. This means that you can get the Account name from an opportunity, but there may be multiple Contacts so email address will be a bit more difficult.

It would be helpful if you could explain what the goal is in creating a new Account from an Opportunity.