Skip to content
ToolShedby Wasim Shaikh

Salesforce SOQL to Veeva VQL Cheat Sheet: Migrating Legacy Veeva CRM Queries

Wasim · 27 Nov 2026

As commercial IT teams migrate from legacy Salesforce-based Veeva CRM to native Veeva Vault CRM ahead of the December 2029 end-of-support deadline, every middleware job, ETL script, and portal integration using SOQL must be rewritten in VQL (Vault Query Language).

This cheat sheet covers the exact syntax mappings and gotchas you will encounter when translating SOQL to VQL.

Interactive Companion Tool: Paste any legacy SOQL query and convert it to formatted VQL with migration warnings using our Salesforce SOQL to Veeva VQL Converter.


1. SOQL vs. VQL Quick Mapping Table

Feature Salesforce SOQL Veeva Vault VQL
Standard Veeva Objects/Fields Call2_vod__c, Status_vod__c call2__v, status__v
Relationship Joins Account_vod__r.Name account__vr.name__v
Row Limit LIMIT 200 MAXROWS 200
Pagination Offset OFFSET 100 SKIP 100 (or next_page)
All Fields FIELDS(ALL) Not supported — list fields explicitly
Security Enforcement WITH SECURITY_ENFORCED Enforced automatically per Vault session

2. Example: Legacy Call Query to Native VQL

Before (Salesforce SOQL):

SELECT Id, Name, Account_vod__r.Name, Status_vod__c
FROM Call2_vod__c
WHERE Status_vod__c = 'Submitted_vod'
ORDER BY Call_Date_vod__c DESC
LIMIT 200

After (Veeva Vault VQL):

SELECT
  id,
  name__v,
  account__vr.name__v,
  status__v
FROM call2__v
WHERE status__v = 'submitted__v'
ORDER BY call_date__v DESC
MAXROWS 200

3. SOQL Features That Require Manual Review in VQL

  1. Date Literals (TODAY, LAST_N_DAYS:30): Replace Salesforce date literals with explicit ISO 8601 dates (YYYY-MM-DD) or Vault date functions.
  2. MAXROWS vs. PAGESIZE Order: In VQL, MAXROWS must always appear before PAGESIZE.
  3. Pagination: Prefer following responseDetails.next_page over large SKIP offsets.

Official References

Wasim Shaikh

About the author

Wasim Shaikh is a UI/UX developer and front-end engineer with 15+ years of experience, based in Ahmedabad, India. He specializes in Liferay, React, Angular, Next.js and Tailwind CSS.

Keep reading

Veeva · 27 Nov 2026Veeva CLM HTML5 Package Structure & JS API Guide (PromoMats & Vault CRM)Veeva · 27 Nov 2026Veeva Vault Criteria VQL Guide: Reference Constraints, {{this.field}} Tokens & Sharing RulesVeeva · 27 Nov 2026Veeva eTMF Risk-Based QC & EDL Guide: How to Calculate Audit Readiness