Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I'm using Apex-lang to build queries. http://code.google.com/p/apex-lang/

problem: A custom lookup field won't show up in the generated query.

If I duplicate the SoqlBuilder class and use the new class, the custom field will show up.

Could there be some FLS on class level that I'm missing? I tried this using Anonymous Apex.

share|improve this question
    
What API version is the non-working class? Can you confirm the API version of the two classes are the same? –  Mikey Jun 3 '13 at 15:34
    
The non-working class is API version 13.0 If I change it to 28.0 it is working. Do you know by any chance the creteria for fields to show up in API 13.0? –  user2965 Jun 4 '13 at 7:16
    
Not off the top of my head. Here's a resource that shows what has changed in each API Version. I'm wondering if lookup fields weren't added until after API 13.0 salesforce.com/us/developer/docs/api/Content/whats_new.htm –  Mikey Jun 4 '13 at 14:23
    
Ok, thanks for the link. I'll play with the API Version to see where it fails. You may add your comments as an answer, so I can mark it as the best. –  user2965 Jun 10 '13 at 12:09

1 Answer 1

up vote 2 down vote accepted

If the API version of the classes are different, this could be causing the issue. New features are versioned within the API, to maintain backward compatibility. If a feature was added after the API version of the class, it will not be accessible.

Take a look at this documentation to see what features were added in what API version.

share|improve this answer
1  
lookups to junction objects were added after v13 –  superfell Jun 10 '13 at 17:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.