You need to sign in to do that
Don't have an account?
What's the most efficient way to lookup Salesforce Id's of hundreds of records based on custom Ids?
I have a file that has around 300 records that needs to be processed daily. Each record has a custom Id and other attributes that need to be updated. My original approach was to lookup each record individually to find the Salesforce Id and then do the update. It appears that I'm running into api limits with this approach.
Second thought was to lookup multiple records at once using something like:
SELECT Id, ThirdParty_ID FROM Lead WHERE ThirdParty_ID IN ('ID10124' , 'ID10359' , 'ID10548')
I'd like to know the most efficient way / best practices to lookup multiple records using the web service api to limit my api calls?
Thanks,
Matt
Turns out it was not an api limit. But I'm still curious what would be the most effective way to lookup Ids and limit the number of api calls.
-Matt
Thanks Simon. This helps lead me in the right direction.
I'm trying to update records in the standard Lead object. One of the fields in the record is marked as an "External ID" field which means I could use it in the upsert() call and avoid the lookup. But, the upsert will insert any leads that don't exist and I only want records updated.
Is it possible to specify the "External ID" field alone (instead of the Id field) in the update() call as in below. Note that the External ID field is not marked as unique:
Lead lead = new Lead();
lead.External_Id__c = ExternalId; // field marked as External ID
lead.Name = "New Name"; // new name
SaveResult[] saveResults = sforceService.update(new sObject[] { lead });
Thanks,
Matt
Did this code with External ID worked for you?
hello i am new to this salesforce developer how to use standarad object and how many ways we can insert the standarad object s in the salesforce.com
how to develop the coding in salesforc e plz help me