Get Documents and Attachments out of Salesforce

February 8, 2010 · Filed Under Configuration, Spring 10, Tips and Tricks, salesforce.com · 3 Comments 

As Content will be included in all Salesforce licenses (for completeness, I'll add 'to some degree') with the Spring '10 release, orgs will be faced with the daunting prospect of getting their documents and attachments out of Salesforce and into Content.

I had this problem when Content was first released and I was asked to be one of the first SysAds to use it. At the time, we used Solution 1 (below), but since then, other products have been released to help with this.

Why is it even an issue?

  • Surely we can download each file? Yes, but who wants to?
  • Can't we do a Data Export and then upload those to Content? Yes, but all the files are renamed with their 15-character Ids, making renaming them all-but-impossible.

salesforce.com and DreamFactory to the rescue!

Solution 1

Summary: Use a script to rename all exported files. A (wonderful!) salesforce.com employee, Nick Marcantonio, wrote a Perl script to perform the transformation. Here it is, in all its glory:
# Nick Marcantonio
# nmarcantonio at salesforce.com
# 08/07

$file = 'Attachment.csv';

open (F, $file) || die ("Could not open $file!");

$line = <F>; #read first line which is nothing but column headers
while ($line = <F>)
{
  ($id,$name) = split ',', $line;
  chomp($id);
  $id =~ s/\"//g;
  chomp($name);
  $name =~ s/\"//g;
  
  #print "$id : $name\n";
  
  $result = rename($id, $name);
  #print "$result\n";
}

close (F);
The instructions:
If you've done a data export you've noticed that all attachments are placed in the Attachments subfolder and named with their salesforce ID, not the actual file name or extension. One must then consult the Attachment.csv file included in the data export to find the name associated with the ID and rename the file. Attached to this solution is a Perl script that will rename all of the exported attachments to their proper names. Please follow these steps to run this:

1. Perform a data export and unzip the resulting zip file
2. Launch the data loader and export from the Attachments table ONLY the Id and Name column. This file must be named Attachment.csv.
3. Install ActivePerl. This will allow perl scripts to be run on a Windows machine. ActivePerl is available here (http://www.activestate.com/activeperl).
4. Copy the Attachment.csv file and the attached AttachmentParser.pl file to the Attachments subdirectory of the data export.
5. Double-click on AttachmentParser.pl.

All of the files named with their salesforce IDs will be renamed with their proper names and file extensions.

(This solution will work for documents as well. Follow the same procedure and be sure to name the extract from the Documents table Attachment.csv) 

Note: This will not preserve folders, as far as I know. You may be able to recreate this by exporting the Folder table and doing some work on that, as the Document table does include a FolderId column.

A heartfelt thank-you to Nick Marcantonio for his help!

Solution 2

Install DreamFactory's FREE DreamTeam Document Management application from the AppExchange to drag-and-drop your Documents to your desktop.
This doesn't work with Attachments, though, so you may need to use another method for them.

Please let us know how it goes - good luck and enjoy Content!

Computer Associates Plans To Release Agile Development Tool On Force.com Platform

November 19, 2009 · Filed Under Development, Partners · 1 Comment 

Today, at Dreamforce 2009, Computer Associates plans to release CA Agile Planner(http://www.ca.com/agile), a tool to manage agile development teams.
CA Agile Planner will be integrated with CA Clarity PPM (http://www.ca.com/ppm).

Although it was not clear how much of the demonstrated app will run on Force.com and how much will run on the CA servers (though it appeared to be 100% on Force.com), it was clear that the application was accessed via a force.com URL.

For more information, see http://www.ca.com/agile.

A release date for the product was not mentioned, but the earliest planned release of any newly-announced feature thus far is Spring 2010, so one might assume that this will not be available until then.

New Developer Library Released

Today, Developer Force (http://developer.force.com) released its new library. Here are a few of them. All can be found at http://wiki.developerforce.com/index.php/Documentation.

Workbook
http://www.salesforce.com/us/developer/docs/workbook/index.htm

Fundamentals
http://www.salesforce.com/us/developer/docs/fundamentals/index.htm

Cookbook
http://www.salesforce.com/us/developer/docs/cookbook/index.htm

Apex Advanced Code Example
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_shopping_cart_example.htm
https://sites.secure.force.com/appexchange/listingDetail?listingId=a0N30000001saDCEAY

And many more to come!

Dreamforce Keynote – Chatter and the Platform

November 18, 2009 · Filed Under salesforce.com · Comment 

There is no way to write one post to cover everything, so I want to address one thing that some people may not have noticed:

Salesforce Chatter is being pushed as a platform layer.

Looking at the “chiclet” slide that Marc Benioff unveiled, let’s start with the “old” slide:

Yes, this is not the exact slide, but getting a copy of the initial slide is proving difficult. We'll have to use this one from Dreamforce 2008 as a reference, and will need to imagine the rest.

  • Notice that the bottom level is Infrastructure. This is the hardware that salesforce.com provides along with the promise that it will work properly. It is called Infrastructure as a Service, and there’s nothing new about that.
  • On top of that is what we call the Force.com Platform. This includes Apex code, workflow, analytics, and Visualforce.
  • And on top of that are the clouds: Service Cloud 2, Sales Cloud 2, and Custom Cloud.

However, the first new chiclet slide that Marc showed was misleading. The item with the big question mark was a cloud. And Chatter is not only a cloud.

Once Chatter was shown and demonstrated, the new chiclet slide did not just show it as a cloud. It was also shown as another platform layer. This is huge.


Chatter, clearly, is not just an application that sits on top of Salesforce CRM and the Force.com platform. (Examples of these are AppExchange apps like FinancialForce and even integration features like Google Docs for Salesforce.) Chatter is an integral part of the platform and will be a part of every customization. What does this mean? Just as with every custom object comes the ability to make Workflow and Validation Rules, with every custom object will come the ability to include Chatter features.

So let’s talk about the new slide. First, something negative:

From an IT perspective, we know that there are three levels to Software as a Service: Infrastructure as a Service, Platform as a Service, and Application as a Service. Where does Chatter fit in? I have no idea. In the Platform? No. Platform features are data-driven and can exist without a user-interface. In Infrastructure? Obviously not. So Chatter must be an Application. Obviously, salesforce.com is including Chatter as features in every application. But just because it is ubiquitous does not mean that it is a platform layer.

Now, something positive:

From a marketing perspective, nobody cares about the Service layers. Infrastructure? Platform? Application? All the people with money (CXOs) care about is what they’re going to get and what the product can do. If we look at the slide as a selling-tool, it’s perfect. It shows us features that are available across the board, in every object.

So my conclusion:

If I take off my developer hat, Chatter is a great feature that will help businesses run better. Sure, the slide is funny-looking, but it works.

Salesforce.com Releases “Chatter” – a first look

November 18, 2009 · Filed Under salesforce.com · Comment 

The keynote hasn’t even started and already there is a lot of chatter on twitter and the web about salesforce.com’s new offering: Salesforce Chatter.
In the Blog Pound, we were given books of Service Cloud success stories and chattering-teeth. The press packets were handed out, full of descriptions of Salesforce CRM’s new releases, all focused on the Service Cloud.
The biggest release is Salesforce Chatter, an enterprise collaboration – social computing mashup (http://www.salesforce.com/chatter – link inactive at posting time). It combines Content, Apps, and People in a secure environment within each company.
The features will include Profiles (user profiles like Facebook pages), Status Updates, Feeds (such as announcements when Salesforce Content files are updated or triggered announcements analogous to workflow emails/tasks), Groups (like CRM groups or Content workspaces), Social Apps (really just an RSS-type feature), Social Content (file sharing), Social Sharing (a euphemism for security model), and Twitter (referring more to the already-released Twitter integration features), Facebook (with auto-population from Facebook profiles), AppExchange (ISV partners can integrate App updates to a Chatter feed), and Mobile (allowing the Chatter features to travel).

« Previous PageNext Page »