You need to sign in to do that
Don't have an account?
JackOdell
Drawbacks to using foreign keys with the REST API?
Hey folks.
Our team needs to be keep records in synch between our app and Salesforce. We will be updating PersonAccounts and Cases.
We're considering using the REST API to update the records using a foreign key from our app.
Can anyone think of any drawbacks to using foreign keys with the REST API? Are there things we won't be able to do? Would it be more advantageous for us to store the Salesforce record ID in our app?
Thanks in advanced.
I can't think of any drawbacks in particular. External IDs were designed especially for this kind of use case, and are well supported by the REST API - you can do an upsert against the external ID without knowing the Salesforce record ID.
All Answers
I can't think of any drawbacks in particular. External IDs were designed especially for this kind of use case, and are well supported by the REST API - you can do an upsert against the external ID without knowing the Salesforce record ID.
One minor drawback that I discovered as I thought it through is that without a record Id we will no longer be able to build links from our app to Salesforce records. To work around that, I will likely need to build a Visual Force page that will accept an external Id as a URL parameter and will redirect to the record's page.