Is anyone experiencing issues with incorrect managed package apex class visibility? Suddenly unable to save a class and everything seems to be in order. What am I missing? Anyone run into this or have workarounds?
Seems like this is an issue with the Tooling API. Was using Sublime Text 3 + Maven’s Mate, and switching from Tooling to Metadata apex compilation (which I seem to do daily now) resolved the issue.
Editing a class that refers to a Zuora class.
Zuora.OnDemandSyncManager syncManager = new Zuora.OnDemandSyncManager();
Previously this had saved fine, but now I’m getting the following error
Package Visibility: Type is not visible: ondemandsyncmanager
However the constructor is listed as global when I view the installed package components (v2.4)
Which matches the version settings for my class.
Based on user comments this appears to be a bug in the Tooling API. Switching to a tool that uses the Metadata API resolves the issue (maven’s mate w/config changes OR eclipse OR ant)
So it’s not a bug per se, more of a doc issue. The tooling api docs don’t specify how to set the api versions for managed packages (at least at this time), although you can infer how to do it by looking at the tooling api wsdl. Because of this some tools, i.e. MM doesn’t set the api versions for managed packages when updating apex classes …