Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Salesforce by (11.9k points)

I'm writing an API that converts actions performed by a non-technical user into Salesforce.com SOQL 'SELECT''UPSERT', and 'DELETE' statements. Is there any resource, library, etc. out there that could validate the syntax of the generated SOQL? I'm the only one at my company with any experience with SOQL, so I'd love to place it into a set of automated tests so that other developers enhancing (or fixing) the SOQL generation algorithm know if it's still functioning properly.

I know one solution here is to just make these integration tests. However, I'd rather avoid that for three reasons:

  1. I'd need to maintain another Salesforce.com account just for tests so we don't go over our API request cap.
  2. We'll end up chasing false positives whenever there are connectivity issues with Salesforce.com.
  3. Those other developers without experience will potentially need to figure out how to clean up the test Salesforce.com instance after DML operation test failures (which really means I'll need to clean up the instance whenever this occurs).

1 Answer

0 votes
by (32.1k points)

You should be able to solve this problem using  SoqlBuilder library As it generates SOQL and is basically capable of producing SOQL statements which could be error-prone if created manually. As the syntax is straight forward, it has been used very few issues.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...