You need to sign in to do that
Don't have an account?
mromani
Upsert
Does an upsert always need a field that is an externalID?
I am trying to upsert a standard object (Account), in which i wanted to do it based on Account Name.
This is my code:
sforce.UpsertResult[] upResult2 = binding.upsert("Name", objList2);
but when i run it, it ends up saying "Field name provided, Name does not match an External ID, Salesforce Id, or indexed field for Account"
what can i do to fix this error?
See the doc at
http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic=Content/sforce_api_calls_upsert.htm
On custom objects, upsert() uses an indexed custom field called an external ID to determine whether to create a new object
or update an existing object. On standard objects, this call can use the name of any field with the idLookup field property
instead of the external ID.
The Name field in Account does not have the idLookup field property. You can use the ID field instead or see the link above for a Java sample that uses a custom external ID field on Account. I hope that helps ...