+ Start a Discussion
b-liub-liu 

Connecting a Contact to an Account

I'm trying to make a custom edit page for the Contact object. I'm trying to use <apex:inputField value="{!Contact.Account.name}" /> but after saving it does not save the account name. Does anyone have a solution for this?

Best Answer chosen by Admin (Salesforce Developers) 
Prad@SFDCPrad@SFDC

Hi,

 

try AccountId in place of  Accound.Name Like

 

<apex:inputField value="{!Contact.AccountId}" />

 

Did this answer help you.If not then let me know the Issue.

All Answers

Prad@SFDCPrad@SFDC

Hi,

 

try AccountId in place of  Accound.Name Like

 

<apex:inputField value="{!Contact.AccountId}" />

 

Did this answer help you.If not then let me know the Issue.

This was selected as the best answer
b-liub-liu

Like a charm ty