function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Philip ZimmermanPhilip Zimmerman 

SOQL on External Object With Set<Id> in WHERE clause - URL too long

I am running a simple soql query to gather a list of external objects are that related to a set of ids of internal records.  

SELECT ExternalId, Type__c, Location__c, Payer__c, PayerDescription__c, DateofService__c, PostedDate__c, Amount__c, EncounterID_SDB__c FROM Transaction_External__x WHERE EncounterID_SDB__c in: esdbids 

This query generates an insanely long GET request URL to our external system.  The Request is 9,000 characters when esdbids contains 248 ids.  I dont want to open up our maxquerylength that much.  Has anyone found a way around this issue in the past?
VineetKumarVineetKumar
I suppose the query might handle sets of 15 Id records (Set - esdbids).
You can always chunk it to 15 records at a time and do your processing.