Press ESC to close

Managed Package Extension – Developer Console Chaos !

Recently I was working on a managed package extension, which required me to use some GLOBAL Apex APIs from the managed package.

I mostly use aside.io, mavens mate or eclipse (in decreasing order of preference). I was giving Developer console a try, because of recent Spring’14 developer console enhancements, like :

  • themes (monokai my fav) 

  • adjustable font sizes, can’t use Developer console with those big fonts 🙂

You must be thinking, I am pretty choosy ? Yes I’m, specially when it comes to IDEs, where I spend most of my life 🙂 

But, all the fun and excitement disappeared, when I ran into a strange save/compile problem, that made me quit Developer Console again.

That error was :

Package Visibility: Type is not visible: MyAwesomeManagedGlobalClass

“The name of classes/characters are changed to protect the individuals who inspired this story.”

Here “MyAwesomeManagedGlobalClass” is a global Apex class which was part of managed package (namespace prefix : PKGM), and I am trying to access it in some Apex code in managed extension org, in usual pattern i.e.

public class ExtApexClass {
 // Accessing managed package global apex class here
 public static PKGM.MyAwesomeManagedGlobalClass globalClassProp {get;set;}
}

Solution ?

After trying a lot of combinations, one least expected thing fixed the issue i.e. I tried saving the same extension apex class from “Setup > Apex Classes”,  everything was working fine here and class saved successfully.

Surprisingly this problem is not coming with other Tooling API based IDEs like aside.io. So it seems their is some difference in validation routines executed by Developer Console only, which are not yet part of public tooling API.

Vote up this idea for resolution !

To grab salesforce attention on this issue, please share this idea and upvote as well.

Leave a Reply

%d bloggers like this: