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
saiarusaiaru 

Can I use detail page's information for apex?

For example, when I open detail page fpr some account record, I want to create contact record using account information. How can I do that?
N.M. SharmaN.M. Sharma
Hi Saiaru,

There are so many ways for create a contact from account detail page. 
In this i let you know the easiest way:

Create a Account detail page VF Button. Make a standard controller and VF page with contact fields in editable formate.
Give this page URL in VF button. Using controller fill all the account information in contact field and put the save functionality in it.

Using this you can fill field with account information according to your need.
Please try and let me know if there is any other question.

Thanks