I have created a DLL project in C# which is used to add a lead to a Salesforce account via the Partner WSDL/SOAP API.
This DLL is called from an external .NET web application, and the idea is to send the data submitted in that web form to Salesforce.
Currently I am able to create new leads using
binding.create(...) however I need to extend the functionality to handle updates to existing records in Salesforce
I add a lead with FirstName=John, Surname=Doe, this data is added to Salesforce
Edit the above row and change surname to Smith, update the existing record in Salesforce and change LastName to Smith.
My research tells me that I need to specify a field name in the first parameter of
binding.upsert(...) but which field should I use?
This is on the Lead object so perhaps I can use Email? The docs say
The idLookup field property is usually on a field that is the object's ID field or name field, but there are exceptions, so check for the presence of the property in the object you wish to upsert().
However I do not know the ID of the lead I am editing.
Please advise which field I can use in the first parameter, and/or how to see which fields in the Lead object has the [idLookup] property.