Appexchange crippled in Winter ‘07
In Winter ‘07 Salesforce.com had a major rev, and we got a lot of things that are really helpful. A couple stand outs:
- The ability to use includes in SControl (custom code) development
- Sharing custom fields on standard objects via the Appexchange
- Creating full-fledged UI buttons
I’ve been loving these new features since I got them, doing all sorts of new things which have significantly improved the user experience inside the databases I’m building.
But I’ve come to realize that some low-profile Winter ‘07 functionality is having a big effect on how I work. It’s making it much more difficult to do Salesforce.com SControl sharing via the Appexchange. I’m talking about Appexchange package validation.
When you package up a UI button for sharing, Salesforce.com is smart and realizes that the Button requires the SControl, which may require an SControl snippet (included library) and may make queries that call a custom field on a standard object. All these items are added to the package as required, and can’t be removed unless the Button is removed. They are treated as dependencies.
But when you go to install an Appexhange package, it tries to install these dependencies even if you already have them. And if you already have them, the install fails. You can’t install the package.
Here is why this is a problem. First, by using includes, I can reference existing SControl libraries. I have a Utilities library that is included in most of my custom code. If I want to package 3 different pieces of my app in different packages, they will all require the Utilities library, and won’t install because of conflict.
Second, we’ve gotten together in the nonprofit community and worked with the Salesforce.com Foundation to identify a set of objects and fields that are common to nonprofits using Salesforce. So a lot of the people I want to share code with already have a Fund field on their Opportunity object. This is great–the commonality helps us share. But in this case the commonality causes the Appexchange installs to fail. They already have the fields that are required for my code, but the install fails because they already have the fields that are required for my code. Arg!
Third, Salesforce.com uses record types on objects as a really cool way to extend customization ability. I use it a lot, especially for Opportunities. The new package validation inspects your code for references to record types. It appears to even find Salesforce.com GUIDS in hard coded variable definitions. And when it finds them, it won’t include the code in a package because record types can’t currently be Appexchanged. So any code that references record types can’t be appexhanged at all.
Sharing of code from one instance to another is now back to way I did it before Winter ‘06–copy and paste text files. There are very few things I can Appexchange without problems. It makes doing consulting on the platform more expensive, and it makes sharing with colleagues and the broader community more difficult.
To fix the situation, a couple of things need to happen. I’m all for a package containing everything it needs to work, but the installer has to be smarter. If a field that is part of the package already exists in the install destination, warn the user and then install the package. Maybe even check to make sure the field is the right type.
Next, the code library situation has to be figured out. How can you code with libraries and share them modularly? I don’t know. Perhaps on the fly renaming of snippets that run into naming conflicts? That would at least get the package installed, and redundancy could be cleaned up later.
Finally, record types should be ignored by the validator until there is a good way to handle them gracefully. I need to be able to refer to record type Id’s for my custom code to do anything helpful. If I can eventually Appexchange full record types, that’s great, but they have to gracefully abort if they already exist in the destination databass.
Maybe Spring ‘07 will fix some of these validation issues. I can imagine that Salesforce.com has some unhappy customers, especially if this behavior is being seen in their Sandbox product. People are paying money for that service which is supposed to make testing and installing code easier. I would be upset if I were paying for a product that lost functionality unannounced.
I have faith they will be fixed. I’ve been continually impressed with how Salesforce.com is moving the platform forward as the complexity continues to increase. All in all, Winter ‘07 is still way on the positive side of the scale for me, and would be off the charts if these problems hadn’t been introduced.

March 7th, 2007 at 4:23 pm
Not ideal - but mya help in the short run. You could put your AJAX library into an externally hosted file on a server and reference it from within the HTML. You’ll get cross domain security warnings but may help.
This is what we do for Salesidekick - except we take it a step further and generate the AJAX on-demand based on license conditions.
Gareth.
March 7th, 2007 at 5:51 pm
Thanks Gareth, that’s an interesting idea. As a consultant who works with many sf.com instances, I love that I can leave my custom code behind in their instance, and not keep anything running on my servers.
The best way longer term is an idea I heard from Salesforce, to create a managed package for my utilities libraries. That way I can upgrade them as necessary and make sure they are up to date. There’s some admin overhead to that approach, but it’s an interesting one.
Thanks for the tip!
March 8th, 2007 at 11:30 am
[...] I wrote the other day about how I was being stymied by the Winter ‘07 Appexchange. In my post I never used the word bug, because I didn’t really see the issues I was having as technical flaws in their Appexchange implementation, but more a disconnect between my process and the tool. I’m happy to say that with a nudge in the right direction from Salesforce.com (more bout that later), I was able to overcome the Record Type issue and found a possible solution to the custom field problem. [...]
March 8th, 2007 at 9:56 pm
I share your pain, but I’ve discovered the managed app approach has its pains too.
Perhaps you’ll discover a better way to utilize this than I did.
http://community.salesforce.com/sforce/board/message?board.id=appexdirectory&message.id=154
March 9th, 2007 at 7:18 am
Thanks for the pointer to the managed package thread Mike. I haven’t used them but just the fact that they’re called “managed” makes me leery of the added overhead.
March 15th, 2007 at 6:16 am
[...] On Monday I had a great chat with Jim Yu, Director of Platform Product Management, and Adam Gross, Director of Developer Marketing, from Salesforce.com. Last week I posted some frustrations I was having with the Appexchange and Jim contacted me to talk about what I was experiencing, some possible workarounds, and to get a better sense of the way I was trying to use the service. [...]