+ Start a Discussion
Alan ChangAlan Chang 

Is there a way to define an alternate key (instead of using default field ID) between Account and Contact?

In our existing database, the customer number serves as the link between Account and Contact objects. Can we use that field instead of ID field provided by Forces.com? Your suggestion will be much appreacited.
PRABHAKARAN CHOCKALINGAMPRABHAKARAN CHOCKALINGAM
Yes you can by creating a custom field as ExternalID for the customer number.
Please refer the below link in salesforce docs,
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_dml_foreign_keys.htm.

Please let me know if I can provide more information.
Alan ChangAlan Chang
Thanks Prabhakaran. The link provided an example to send parent and child objects array in one call. Is there a REST API to accomplish this as well?
Currently, I have to create an external ID to look up ID in order to update a record in Account and use that ID as AccountID to add a child record in Contact linked to that account. Is there better way to avoid reverse lookup with REST API? From what I heard, Microsoft Dynamics has option to specify an alternate ID. Is this possible in Salesforce?