Wednesday, September 19, 2012

Deploying Profile with Salesforce.com: A major tool flaw

The ANT tool for force.com (and Change Set from the UI side as well for that matter) is pretty powerless if you want to just deploy profiles by themselves.  Note this in the Tool Guide:
The contents of a profile retrieved depends on the contents of the organization. For example, profiles will only include field-level security for fields included in custom objects returned at the same time as the profiles.

This may sound unclear what it actually means... Well, basically if you don't deploy a component along with the profile, the profile info will have nothing (permission wise) about the component.  You might see an error like this with ANT:
Error: profiles/BIT.profile(BIT):Permission Create Fund_4Case__c depends on perm
ission(s): Read Fund_Detail__c
The reason that the dependency item is missing could very well be that you simply didn't include that dependency item in the deployment package, even though you really shouldn't have to as there's no change to it.  This poses some challenges when managing a profile deployment, do you really want to deploy everything a profile may need to use just so as to have all necessary permissions get across?  It just sounds a bit dumb to me.

Wednesday, September 12, 2012

Metadata accessibility

If you regularly use an automated/scripted migration tool based on Salesforce.com metadata API (like their ANT tool), this is a pretty handy piece of documentation just to see what you cannot do with metadata tools:

Unsupported Metadata Types

I also want to add to the list that, even technically considered a page layout, the Case Close page layouts are not available.  If you try to retrieve them the way like regular page layouts, you get nowhere.

The list also has the same error with the criteriaBasedRules.