Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

Can you provide an example of adding multiple arguments to a dynamic soql query?

Asked by David Edwards May 9, 2023 741 views 1 answer
Share

About this question

 I'm trying to build a dynamic query but I think I may have the wrong syntax.

String query = 'SELECT ProjectId__c from Project__c'
projectList = Database.query(query + ' WHERE Name__c equals 'pp2');

No error is thrown, only there are no retrieved records. Also, can someone provide an example of adding multiple arguments to a dynamic query?

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.