New Opportunity Page Layout – With Highlights Panel!
Yesterday, I enabled the new Opportunity page layout in my Developer Spring ’10 Preview org, and it took a few steps, so I thought I’d share them with you.
Firstly, you’ll need to contact salesforce.com to get this feature enabled.
Then be patient. It takes a minute or two for the update to propagate. Clearly, something was churning in the Force.com platform background!
Now we’ll navigate NOT to the Setup | Customize | User Interface screen (where this should be enabled). Instead, we’ll go to the Opportunity Page Layout screen.
Follow the cool prompts. They make it so easy, a … well, you know what I mean.
Note: You can only show fields in the Highlights Panel if they are in the page layout. (I have a feeling this has to do with Professional Edition or printable layouts, but I’m just guessing.)
Once you’ve done this for each page layout, click on the big button.
At this point, each user can enable the bar. I have no idea why the admin can’t just force this on all users – or maybe I missed something – but it seems to be an opt-in feature.
Here’s the link to enable the feature. Of course, you may wish to watch a video as well!
And here it is!
It’s interesting that if you have this enabled, certain user interface settings (yes, at Setup | Customize | User Interface) cannot be changed:
Here’s my prediction: We will start to see two major mistakes during Salesforce demos:
- We will continue to see the link asking if we want more information on inline editing (after more than a year, it’s time to turn that off, people).
- At the top of the Opportunity detail page, we will see this link.
And I will continue to think less of all demonstrators who make these mistakes.
Happy Spring 2010!
Get Documents and Attachments out of Salesforce
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
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.
Trigger to help Salesforce for Twitter
Salesforce for Twitter is one of the best AppExchange packages I've seen. It fulfills the promise salesforce.com made to bring the Service Cloud to all orgs of all sizes. And it works well.
Though a supplemental/unofficial guide to customizing SFDC for Twitter will be released soon on this site, I wanted to share a trigger I just wrote to add new Leads to a campaign:
Firstly, thank you to Scott Hemmeter at Arrowpointe, who wrote the original code that I customized.
Secondly, you could easily duplicate this trigger and set it to run on the Contact object as well.
Please don't set the trigger to "after update," as in testing, it ran into problems when converting a Lead and merging with a Contact already on the "Twitter" campaign.
trigger AddToTwitterCampaign on Lead (after insert) {
// List containing each Lead being processed
list<Lead> theLeads = new list<Lead>();
//We only execute if we have a campaign named "Twitter"
if([SELECT Count() FROM Campaign WHERE name = 'Twitter'] == 1){
Campaign TC = [SELECT id, name FROM Campaign WHERE name = 'Twitter' LIMIT 1];
for(Lead l:trigger.new) {
if (l.leadsource.indexOf('Twitter',0 ) >= 0 || l.leadsource.indexOf('Tweet',0 ) >= 0 ){
theLeads.add(l); // add lead to the main lead list
}
}
// List containing Campaign Member records to be inserted
list <CampaignMember> theCampaignMembers = new list<CampaignMember>();
for (Lead ld:theLeads) {
CampaignMember cml = new CampaignMember();
cml.leadid = ld.id;
cml.campaignid = TC.id;
theCampaignMembers.add(cml);
}
//Insert the list of Campaign Members
if(!theCampaignMembers.isEmpty()){
insert theCampaignMembers;
}
}
}
The trigger requires that you have a Campaign called "Twitter," but feel free to change that to anything else you'd like.
Don't worry if you have other triggers that add Leads to Campaigns - this can work alongside them, so you can add Leads to as many Campaigns as you'd like.
Filtered Lookups, Validation Rules, and Order of Execution
Reading the cheatsheet for Filtered Lookup (beta), I noticed an interesting line:
Lookup filters function similarly to validation rules when you save a record. That is, actions that cause related records to save, such as changes to a roll-up summary fields, also trigger the lookup filters on the related record and block the save.
The implications for this are massive. Let's explore two examples:
Example 1: Filter as Validation Rule from Parent Record
- We create a lookup on a Child object to Parent.
- We filter the lookup to EXCLUDE Parent.Status = 'Closed' (Parent.Status is only Open or Closed.)
- We can edit the Child records as long as the Parent Status is not Closed.
- When Parent.Status is changed to Closed, existing related Child records are not affected...
- BUT if we attempt to edit a Child when the Parent is Closed, Force.com will throw an error (which we can customize) beause that the Lookup is invalid.
- (and clearly we cannot add new Child records either)
Conclusion: Thus, Filtered Lookups act much like Validation Rules. A quick experiment shows that Filtered Lookup errors actually fire before Validation Rules.
Example 2: Filter as Validation Rule on Roll-Up Summary (from Child Record) - what the line above was referencing
- Use the above example, but change the lookup to a master-detail relationship
- Create a Roll-Up Summary field to count all child records
- Prevent saving more than 10 child records for one parent record
Here, we have triggered a filter error without touching a parent record, yet we throw an error based on a value on the parent record.
This second example is significant because we could already prevent more than 10 child records from saving, but doing so required a Roll-Up Summary field on the parent object AND a Validation Rule on the child object. Now we can replace the Validation Rule with the Lookup Filter, though we still need the Roll-Up Summary field. Whether or not this simplifies things is definitely up for debate...
Conclusion
This is a very powerful feature! Thanks to salesforce.com for rolling it out, even in beta form.
Real world example: The above example would be great for Time Sheet Entry and Time Sheet Header objects, as they would create, in effect, a validation rule on the Header record preventing editing of any child records. Awesome!
For further reading, check Salesforce Help's Lookup Filters examples.












