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
degmodegmo 

Upsert account record with a lookup to another account

Hello,
In my org, the Account object has a self lookup relationship to Account.  This field is called Partner Company.  My salesforce app needs to integrate with a data warehouse via a REST API.  The API that I am hooking into sends details of an Account record that I need to do an Upsert on.  The challenge for me is how to handle the Parner Company because the API just sends me Partner Company Name, Partner Company City, Partner Company State, Partner Company Zip, and Partner Company PID (which is a unqiue identifier).  What is the best way to upser the partner company info, get the SF ID, and associate it with the Account data?