I've come across a SOQL syntax which I cannot find any documentation for, and was wondering if anyone knew about it.

SELECT Id, Name 
FROM Contact 
USING LOOKUP Account.ParentContact__c
BIND ParentId = '0010Y00000aXWI7'

I have a lookup field on Account, ParentContact__c, which looks up to the Contact object, and is filtered so that I can only select Contacts related to the Account's Parent Id.

This query syntax allows me to input any variables which are used by the lookup filter using the BIND variable, and then returns results according to the configured lookup filter (LOOKUP Account.ParentContact__c).

The only reference I can find to the syntax is that it was removed from the winter 15 release, per the release note changes.

Is this documented anywhere? The SOQL reference only talks about USING SCOPE.

(These can be combined: USING SCOPE Everything, LOOKUP Account.ParentContact__c)

Does anyone know any other parts to this syntax? Was this ever released officially by Salesforce, or is it an accident? Does anyone have an original version of the winter 15 release notes which might document this?

  • When you say "come across," you mean it's in an org and is being used? If so, what type of org? Commented Sep 14, 2017 at 22:13
  • I spotted the SOQL in an error log from a well known managed package, although I wouldn't like to guess how many of their end users are using the functionality they've implemented with this.
    – James
    Commented Sep 18, 2017 at 20:27

1 Answer 1


The USING syntax didn't exist in the prior version [Summer '14, v.31, release 190] and in Winter '15 [v.32, release 192] the USING syntax was introduced with just the USING SCOPE operation.

The feature probably was deemed not release ready (or similar), but already in the codebase at the time of code freeze.

It's much less risky, and much less expensive, to remove details about a feature from documentation and make a note that the section was removed than it is to actually remove the USING LOOKUP operation from the SOQL codebase and then have to fully regression test that removal to make sure nothing was regressed.

Should you choose to use it today, you'd be venturing into "not supported" territory.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .