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
Sakthi RSakthi R 

Confusion in using standard controller with extension or custom controller.

i have a requirement like 
i need to have a custom detail button in every contact detail page. (I did this).
When i click that button it must go to my vf page and should list all accounts with select button in every account. (like detail page)
when i select any account, this account id must be assigned to the lookup field of contact name (Account). 
Create new button will be there in my vf page that should redirect to accout creation page when clicked.
Then a Default Account Button will be there in my vf page that create a new account with contact company name as a Account Name .
After this a popup must be open shows that click yes so it must be assigned to Contact Lookup field(Account) and redirect to vfpage with list all acounts(including newly created account) or click no to just redirect vf page shows list of accounts(including newly created account).
what controller i should use custom or standard with extensions?? for which object i should create controller??  

Hi Sakthi,

Use Standard Controller with extension. Because you have to just change in contact's account Id. So make Contact as Standard Controller.
Sakthi RSakthi R

i need to list the account which matches the searched name with all the details in the account... if i put controller in contact, i can get the account name. but not other details of the account right?