You need to sign in to do that
Don't have an account?
Multiple select queries in salesforce
Hi Community,
I have a requirement in which i want to have multiple select queries in salesforce.
For ex->
SELECT Name,OrderNumber__c,Description FROM Opportunity WHERE Name= 'Test-1'
SELECT Name,OrderNumber__c,Description FROM Opportunity WHERE Name= 'Test-2'
SELECT Name,OrderNumber__c,Description FROM Opportunity WHERE Name= 'Test-3'
.....And it can go upto as many as possible.
I looked everywhere in the salesforce documentation, in the SDK(DeveloperForce.force) and in the forum. But could not find any solution.
I would really appreciate it if you people could look into this and guide me to the best possible solution.
Any Lead/Help would be highly appreciated
Thanks in advance
Mohit Batra
Thanks
Instead of multiple SOQL queries, you can implement the same using below code snippet so that you will not face governor limit issues for bulk records. I hope the above information is helpful to you!
Thanks for such a spontaneous reply.
Are we using WSDL for the above code snippet?
I would require results on the individual query basis as further i would be performing upsert operation on a different object using the response of my select query.
Does it makes sense to you?
Thanks
I found this on the following forum:
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/using_resources_retrieve_with_externalid.htm
Its kind of fulfills what i am looking for. But the only problem is the data can only be fetched using ID and not other fields.
I was looking for something like
But could not find anything related to the above or as pe rmy requirement in rest api context which could be used
Can you please try like this and see?
Yes. I checked
That would solve the purpose but the records('Test-1', 'Test-2'...) might be in hundreds or even thousands.
Do you know what will be its threshold limit??
Please find the below article for your reference.
https://salesforce.stackexchange.com/questions/195449/what-is-the-longest-uri-that-salesforce-will-accept-through-the-rest-api/195450
If you are exceeding the character’s limit then you can handle using multiple requests.
I hope the above information is helpful to you!
Hi Bhimaraj.
Thanks. It was really of great help.
This was my first time using this developer forum and experience was quite awesome.
Thanks once again