No such column error

95 views
Skip to first unread message

Rick Baker

unread,
Sep 29, 2016, 2:30:34 PM9/29/16
to Force.com Development General Discussion
Has anyone had issues with this?  I have code that has been working for months and suddenly will not even compile.  The code is:

// Lazy load record type list
global static List<RecordType> RecordTypes {
get {
if (RecordTypes == null) {
RecordTypes = [SELECT Name, DeveloperName, SobjectType FROM RecordType WHERE isActive = true];
RVLog.debug('RVCache.RecordTypes.01', 'RecordTypes: [' + RecordTypes + ']');
}
return RecordTypes;
}
}

This started happening after updating Illuminated Cloud to version 1.7.4.5.  I am using IntelliJ IDEA 2016.2.4.  Could this be an issue with the tooling API?

I am developing a managed package in a Dev Org, have a deadline coming up and this has put a halt on everything.  I can compile all code in my Dev Org from my browser (Settings->Development->Apex Classes) with no errors.  When I run all unit tests (from the browser) they all pass.  However, in the IDE I am stumped with this obstacle.  I have re-built my project several times to no avail.

Does anyone out there have ANY insight as to how to get beyond this issue?

Scott

unread,
Sep 29, 2016, 2:59:42 PM9/29/16
to Force.com Development General Discussion
Rick, you said it compiles in the Setup menu.  Does it compile in Developer Console?  The former uses the Metadata API and the latter the Tooling API.  You can also tell IC to use the Metadata API for Apex by unchecking Settings>Illuminated Cloud>Validation and Deployment>Prefer Tooling API for>Apex.  See if it deploys/compiles successfully with that setting disabled.

In the past there has been at least one instance of the Tooling API reporting a false negative where the Metadata API would compile/deploy properly.  It's possible this is another such issue, but hopefully not.

Let me know if you can pick up a consistent pattern for what works and what doesn't.  Once that pattern is established, if it's something that's happening what IC is deploying the file, that's mine to fix and I'll definitely address it ASAP.

Regards,
Scott

Rick Baker

unread,
Sep 29, 2016, 5:01:42 PM9/29/16
to Force.com Development General Discussion
Thank you Scott for you prompt response.  I couldn't find the Validation and Deployment menu anywhere.  Searched for it.  Could not find it.  However, I discovered something that could be useful for you.  

I discovered that if I revert back to the previous version, 1.7.4.4-idea14, that it works fine. I even upgraded again to 1.7.4.5-idea14 and it fails.  Reverting back again to 1.7.4.5-idea14 it works just fine.  I hope that is a helpful find.

BTW--I LOVE this IDE! I will be at your presentation at Dreamforce.  I'm sure it will be helpful and insightful.  See you there!
Message has been deleted

Scott

unread,
Sep 29, 2016, 5:32:03 PM9/29/16
to Force.com Development General Discussion

That's very helpful, Rick.  I made one small change in 1.7.4.5 that is almost certainly the cause of this.  It was a fix for static resource deployment via the Tooling API that I also instrumented for other metadata types.  Obviously there's a slight issue with it.  I'll back that out, at least for types other than static resource right now, and upload a new build in the morning.  In the interim you can switch to the Metadata API here and you should be able to deploy that class successfully (albeit more slowly):


Oh, and glad to hear you're enjoying the IDE!  See you next week!


Regards,

Scott

Reply all
Reply to author
Forward
0 new messages