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
DBlondeauDBlondeau 

Link fields like in Access

Hello, Is it possible to link fiends together like in Access? In the Contact tab, I want the Account ID to autofill when the Account Name is selected. I would like Account and Account ID to be main fields by which everthing is connected.
werewolfwerewolf

???

 

The Account Name and the Account ID fields on Contact are actually the same field.  When you fill the name, it actually fills the underlying AccountId field with the correct foreign key.  It doesn't actually store the account's name in the Contact.

DBlondeauDBlondeau
I have the fields Account Name (ABC, Inc.) and Accont ID (12345). These are in the Account tab. If I am in a contact and want to add a company, I choose the lookup field for Account Name. I want the associated ID to auto populate.
werewolfwerewolf

1.  Go to Setup->Customize->Contacts->Fields.

2.  Add a custom field there of type Formula.

3.  Use the Insert Field button.  Navigate there from Contact to Account> to Account Number (or whatever field you're storing this in -- it's not going to be Account ID, even if it's labeled that way, because that's the primary key).

4.  Save the formula field and add it to some page layouts.

 

Now you'll see a field on Contact which will show your "Account ID" associated with the account name you set on it.  It will not update dynamically in edit mode (in fact it won't even appear in edit mode), but will update when you save the contact.