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
Damon Roberts 2Damon Roberts 2 

How to write SOQL query in Java

Hello, I am trying to write a java query to bring back the results into a variable to use in a redirect url.. I am not familiar with writng these queries, however this is what I want to accomplish...

How do I write this SOQL query in java "select id, Contact_ID__c, User_ID__c from Custom Object where Contact_Email__c =  ('00Q3000000zLxkFEAS')

var ContactId = (Contact_ID__c)
      UserID = (User_ID__c)

I am aware that this is probaly no where close to how it should be written, but ANY help will be appreciated. Thanks
UC InnovationUC Innovation
The link below provides an example of how to query in Java:

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_query.htm