<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>X-Squared On-Demand &#187; Salesforce CRM</title>
	<atom:link href="http://www.x2od.com/cat/salesforce/feed" rel="self" type="application/rss+xml" />
	<link>http://www.x2od.com</link>
	<description>Salesforce Configuration, Administration, and Development</description>
	<lastBuildDate>Fri, 11 Jun 2010 16:30:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Chatter and the CLM</title>
		<link>http://www.x2od.com/2010/06/11/chatter-clm.html</link>
		<comments>http://www.x2od.com/2010/06/11/chatter-clm.html#comments</comments>
		<pubDate>Fri, 11 Jun 2010 16:30:20 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[New Features]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Chatter]]></category>
		<category><![CDATA[Enterprise]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=1061</guid>
		<description><![CDATA[I love Chatter. I love the way that it is a game-changer. I think that Chatter is a powerful tool. But as Peter Parker's Uncle Ben said, "With great power comes great responsibility," and with the possibility of great rewards from Chatter comes great risks. First I'll list my conclusions, just so there's no misunderstanding. [...]]]></description>
			<content:encoded><![CDATA[<p>I love Chatter.  I love the way that it is a game-changer.  I think that Chatter is a powerful tool.  But as Peter Parker's Uncle Ben said, "With great power comes great responsibility," and with the possibility of great rewards from Chatter comes great risks.</p>
<p>First I'll list my conclusions, just so there's no misunderstanding.  Then I'll explain some of the possible pitfalls that Chatter presents.</p>
<ol>
<li>Chatter is amazing.  It  lets users share information in ways never seen before.</li>
<li>Chatter should be enabled in an org as an all-or-nothing switch - as it is now.  Allowing it to be disabled for some users goes against its core purpose.</li>
<li>As a single-opt-in system, the risk of Chatter-Spam is huge, but responsibility falls to each user to self-police, and probably to each company to educate its users in appropriate chatting.</li>
</ol>
<p>Let's compare Chatter, Facebook, and Twitter in terms of what is necessary for a conversation between two people to appear in my activity stream.</p>
<p><strong>Facebook</strong></p>
<p>Facebook is a <strong>double-double</strong> opt-in system.  To see a wall post from one person to another in my stream, I must be friends with both of them, and each friendship-connection is a double opt-in, meaning that one person requests and the other approves.</p>
<p><strong>Twitter</strong></p>
<p>Twitter is a double-single opt-in system.  To see one person's reply to another, I must be following both of them.  But unless one of them decides to block me, the default is that I will see the entire exchange in my twitter feed.</p>
<p><strong>Chatter</strong>
<p>Chatter is a single-single opt-in system.  This means that if I post something to anyone in the org, everyone following that person will see.  Here's an example: Let's assume that every user at salesforce.com follows Marc Benioff.  One user posts a photo of his son's graduation to Marc.  Everyone following Marc will see it.</p>
<p>Sounds innocuous, right?  Probably.  But if a user keeps posting silly things to Marc, and enough people see it, other users could become annoyed.</p>
<p>Take it down a level, and imagine that everyone on a sales team follows each other.  A junior AE keeps sending silly stuff to the strongest seller in the group, and all the sales people have to see it.  This could clog their streams.
<p>This is called a CLM: A Career-Limiting Move.  As great power requires great responsibility, we must ask who should shoulder this responsibility.
<ol>
<li>The company: Training for users and a quick eye to bring inappropriate chatters into line.</li>
<li>Individuals: Just be careful.  This is the Facebook public-posting dilemma.  Don't forget that you have no control with whom you are connected, so anyone who wants to follow you will see anything you post, and anyone who follows someone you post to will see it as well.</li>
</ol>
<p>The solution is NOT to turn off Chatter for certain people - Chatter is about the free-flow of data across an org, organized into forms that make it useful information.  By putting information at the fingertips of every user, productivity will be increased.</p>
<p>Blocking people is also not a good solution.</p>
<p>Chatter Groups (Safe Harbor Statement!) will help, but will attenuate, not completely remove, the chances that this will happen.</p>
<p>Salesforce CRM should be a "sticky" app - that is, it should provide services in one place so that users see it as their central point of information.  The best way to ensure the free-flow of information is to prevent blocking of certain users.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2010/06/11/chatter-clm.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sophisticated DateTime &#8220;Formula Fields&#8221; with Apex and Field-Level Security</title>
		<link>http://www.x2od.com/2010/05/17/sophisticated-datetime-formula-fields-with-apex-and-fls.html</link>
		<comments>http://www.x2od.com/2010/05/17/sophisticated-datetime-formula-fields-with-apex-and-fls.html#comments</comments>
		<pubDate>Mon, 17 May 2010 20:39:25 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Force.com Platform]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[Salesforce CRM]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Eclipse IDE]]></category>
		<category><![CDATA[Force.com Builder]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=997</guid>
		<description><![CDATA[What do you do when you want to calculate a formula-like field but a regular formula won't work? Salesforce CRM's formulas handle dates very well. If you want to enter a date value and have formula fields display, for instance, mydate__c + 21 days, that's simple. Just use mydate__c + 21. Side note: If you [...]]]></description>
			<content:encoded><![CDATA[<p>What do you do when you want to calculate a formula-like field but a regular formula won't work?  </p>
<p>Salesforce CRM's formulas handle dates very well.  If you want to enter a date value and have formula fields display, for instance, mydate__c + 21 days, that's simple.  Just use <code> mydate__c + 21</code>.</p>
<p><i>Side note: If you try going the long way around and use <code>DATE( YEAR( mydate__c ), MONTH( mydate__c ), DAY( mydate__c ) + 21 ) </code> and mydate__c = 09/17/2010, Salesforce returns #Error! because there's no date 09/38/2010.  Similarly, adding three months to a date like 1/31/2010 will also give an error.  More about this in a future post.</i></p>
<p>DateTime fields are like Date fields, but they include... wait for it... a time component (and can be created in the running user's local time zone or in GMT).</p>
<p>Here's a use-case for a DateTime formula field:</p>
<p>A photography studio schedules photo shoots, and different packages include different durations.  Similarly, we could use a hair salon which offers different services, each with a different duration, a dentist... you get the idea.</p>
<p>Requirements:</p>
<ol>
	<li>Enter a DateTime for an appointment start time (<code>starttime__c</code>)</li>
	<li>Enter a duration (though in a production system, I'd include a value on the <code>Product2</code> sObject, we'll just enter a value here) (<code>minutes__c</code>)</li>
	<li>Display a read-only DateTime field with the end time (<code>endtime__c</code>)</li>
	<li>The end time must be read-only to all users, like any formula field</li>
</ol>
<p>Here's what won't work:</p>
<ul>
	<li>A formula field won't work because there are no MINUTE(), HOUR(), SECOND() formula functions</li>
	<li>Workflow won't work because it depends on formulas to fill new values for date/datetime fields</li>
</ul>
<p>That leaves Apex.  First, the configuration:</p>
<ol>
	<li>Create DateTime field <code>starttime__c</code></li>
	<li>Create DateTime field <code>endtime__c</code></li>
	<li>Set <code>endtime__c</code> field-level security to Read-Only for all profiles</li>
	<li>Create Number (18,0) field <code>minutes__c</code></li>
	<li>Create a trigger on the sobject</li>
</ol>
<p>Here's the trigger:</p>
<pre class="brush: java;">
trigger timeTrigger on TestObject__c (before insert, before update) {
    for (TestObject__c t : Trigger.New){
    	if(t.StartTime__c != null &amp;&amp; t.minutes__c != null){
        datetime myDateT = t.StartTime__c;
        double d = t.minutes__c;
        Integer shootmins = d.intValue();
        if(mydateT != null &amp;&amp; shootmins != null)
        	t.EndTime__c = myDateT.addminutes(integer.valueof(shootmins));
       	}
    }
} 
</pre>
<p>Regular readers will note that I do usually split triggers into a trigger and a class, but I've not done so here purely for the sake of brevity.</p>
<p>Here's the test code:</p>
<pre class="brush: java;">
public without sharing class shootTimesTriggerTest {

    private static testMethod void ShootCalculateEndTime_PositiveTestCases() {
        TestObject__c to;
        TestObject__c l;    
        test.starttest();
        l = new TestObject__c (name = 'test');
        datetime myDateTime = datetime.newInstance(2008, 12, 1, 12, 30, 2);
        l.StartTime__c = myDateTime;
        l.minutes__c = 90;
        insert l;
        to = [SELECT id, EndTime__c FROM TestObject__c WHERE id = :l.id];
        datetime newDateTime = datetime.newInstance(2008, 12, 1, 14, 0, 2);
        system.assertequals(to.EndTime__c, newDateTime);
        l.minutes__c = 45;
        update l;        
        to = [SELECT id, EndTime__c FROM TestObject__c WHERE id = :l.id];
        newDateTime = datetime.newInstance(2008, 12, 1, 13, 15, 2);
        system.assertequals(to.EndTime__c, newDateTime);
        test.stoptest();
    }

    private static testMethod void OppCalculateEndTime_NegativeTestCases() {
        test.starttest();
        TestObject__c l = new TestObject__c (name = 'test');
        l.minutes__c = null;
        insert l;
        system.assertequals(l.EndTime__c, null);
        test.stoptest();
    } 
}
</pre>
<p>A few points about how this works:</p>
<ul>
	<li>Triggers run in System mode, so they don't respect field-level security.  Thus, we can set a field to read-only for all profiles, and the EndTime__c field will still be updated.</li>
	<li>The test code runs in System mode as well, avoiding any potential problems if the field were set to invisible to a profile and we used System.RunAs() to test for various profiles.</li>
	<li>Although I'm not a fan of using SOQL queries this often, I used these in the interest of saving time.  Keep in mind that if you had quite a few queries in your regular code, adding these two might put you over the limit, so use queries sparingly!</li>
	<li>This is the only way I know of to add minutes to a DateTime.</li>
</ul>
<p>Did I miss anything?  Please let me know in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2010/05/17/sophisticated-datetime-formula-fields-with-apex-and-fls.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Extended NA1 Maintenance Next Weekend (3/20)</title>
		<link>http://www.x2od.com/2010/03/13/extended-na1-maintenance.html</link>
		<comments>http://www.x2od.com/2010/03/13/extended-na1-maintenance.html#comments</comments>
		<pubDate>Sat, 13 Mar 2010 21:24:30 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Spring 10]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[New Developments]]></category>
		<category><![CDATA[Salesforce.com]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=999</guid>
		<description><![CDATA[Next weekend, March 20, 2010, Salesforce NA1 will be down for an extended (8-hour) maintenance window - the longest in memory - from 7pm 3/20 to 3am 3/21 (All times PST). Overlapping this is another 8-hour window for NA0 (SSL) starting two hours earlier. Also starting at 7pm PST, EU0 (EMEA) will be down for [...]]]></description>
			<content:encoded><![CDATA[<p>Next weekend, March 20, 2010, Salesforce NA1 will be down for an extended (<b>8-hour</b>) maintenance window - the longest in memory - from 7pm 3/20
to 3am 3/21 (All times PST). </p> 
<p>Overlapping this is another 8-hour window for NA0 (SSL) starting two hours earlier.</p> 
<p>Also starting at 7pm PST, EU0 (EMEA) will be down for 2.5 hours. </p> 
<p>All other instances will be down for 30 minutes, from 9pm PST.</p> 
<p>As the email from salesforce.com explains:</p>
<table width="575px"> <tbody> <tr> <td><span style="font-family: Tahoma;"><span style="font-size: smaller;"><img
src="https://a248.e.akamai.net/f/248/25855/14d/ig.rsys1.net/responsysimages/sfc/__RS_CP__/new_header.jpg" alt="" border="0" width="575px"></span></span></td> </tr>
<tr> <td><span style="font-family: Tahoma;"><span style="font-size: smaller;">&nbsp;</span></span></td> </tr> <tr> <td valign="top">

 <span style="font-family: Tahoma;"><span style="font-size: smaller;"> <p>Dear Salesforce Administrator,</p> </span></span><span style="font-size:
smaller;">

 </span><span style="font-family: Tahoma;"><span style="font-size: x-small;">

 </span></span>

 <span style="font-family: Tahoma;"><span style="font-size: smaller;"> <p>At <a href="http://salesforce.com" target="_blank">salesforce.com</a>, customer
success through system availability and reliability is our top priority. As part of our ongoing plan to deliver high availability and reliability, we are
enhancing our service infrastructure on our NA1 instance.</p> </span></span> <span style="font-family: Tahoma;"><span style="font-size: x-small;">

 </span></span> <p><span style="font-family: Tahoma;"><span style="font-size: smaller;">Please be aware that <a
href="http://salesforce.com" target="_blank">salesforce.com</a> will be performing scheduled maintenance <em>that will extend beyond standard system
maintenance windows</em>. The current scheduled window is:<br> </span></span> <span style="font-family: Tahoma;"><span style="font-size:
smaller;"></span></span><span style="font-family: Tahoma;"></span>

 </p> <p class="MsoNormal"><span style="font-family: Tahoma;"><span style="font-size: smaller;"><b>Saturday, March 20th, 2010 from 7:00pm PST to Sunday,
March 21<sup>st</sup> at 3:00am PST </b></span></span><span style="font-size: 10pt;"></span></p>

 <span style="font-family: Tahoma;"><span style="font-size: smaller;"> During this time, the <a href="http://salesforce.com"
target="_blank">salesforce.com</a> NA1 service will be unavailable. Users attempting to access the service during this time will be presented with a
scheduled maintenance notification page. </span></span> <span style="font-family: Tahoma;"><span style="font-size: smaller;"> <p>We appreciate your
patience during this maintenance window.</p>

 </span></span><span style="font-family: Tahoma;"><span style="font-size: x-small;">

 </span></span>

 <span style="font-family: Tahoma;"><span style="font-size: smaller;"> <p>Best regards,<br> -<a href="http://salesforce.com"
target="_blank">salesforce.com</a> Support</p> </span></span><span style="font-size: smaller;">

 </span><span style="font-family: Tahoma;"></span></td>

 </tr> 
 <tr> <td
align="center" bgcolor="#ffffff" height="34"><span style="font-family: Tahoma;"><span style="font-size: smaller;"><span style="color: rgb(102, 102,
102);"><br> Copyright 2000-2010 <a href="http://salesforce.com" target="_blank">salesforce.com</a> - All rights reserved - Various trademarks held by
their respective owners<br>

 Salesforce.com, One Market Street, Suite 300, San Francisco, CA 94105</span></span></span></td> </tr> </tbody> </table>



<div leftmargin="0" topmargin="0" alink="#003366" bgcolor="#ffffff" link="#003366" marginheight="0" marginwidth="0" text="#000000" vlink="#666666">

    <!--== System Status Content ==-->
    <table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="575">
        <tr>
            <td width="575" style="padding-left:15px;padding-top:15px;padding-right:15px;padding-bottom:15px;">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td valign="top">

                            <table border="0" cellpadding="0" cellspacing="0">
                                <tbody>
                                    <tr>
                                        <td><img src="http://trust.salesforce.com/opencms/status-data/img/headerSchedMaint.gif" alt="" width="575px"></td>
                                    </tr>
                                    <tr>
                                        <td style="border-left: 1px solid rgb(255, 204, 0); border-right: 1px solid rgb(255, 204, 0); padding: 0px 0px 0px 0px; width: 575px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
                                            <center>
                                                
                                                <table border="0" cellspacing="0" cellpadding="0" width="100%">

                                                    
                                                    <tr>
                                                        <td width="10%"
                                                            style="border-bottom: 1px solid rgb(255, 204, 0); border-right: 1px solid rgb(255, 204, 0); padding:5px; ">
                                                            <b>NA0 (SSL)
                                                            </b>
                                                        </td>
                                                        <td width="26%"
                                                            style="border-bottom: 1px solid rgb(255, 204, 0); border-right: 1px solid rgb(255, 204, 0); padding:5px; ">
                                                            March 20, 5:00 pm PDT&nbsp;-<br/>March 21, 1:00 am PDT
                                                        </td>

                                                        <td style="border-bottom: 1px solid rgb(255, 204, 0); padding:5px; ">

                                                            The NA0 instance will have maintenance performed at this time. The instance will be unavailable for the duration of the maintenance.
                                                        </td>
                                                    </tr>
                                                    
                                                    <tr>
                                                        <td width="13%"
                                                            style="border-bottom: 1px solid rgb(255, 204, 0); border-right: 1px solid rgb(255, 204, 0); padding:5px; background: rgb(243, 243, 236) none repeat scroll 0%;">
                                                            <b>EU0 (EMEA)
                                                            </b>
                                                        </td>
                                                        <td width="25%"
                                                            style="border-bottom: 1px solid rgb(255, 204, 0); border-right: 1px solid rgb(255, 204, 0); padding:5px; background: rgb(243, 243, 236) none repeat scroll 0%;">
                                                            March 20, 7:00 pm PDT&nbsp;-<br/>March 20, 9:30 pm PDT
                                                        </td>

                                                        <td style="border-bottom: 1px solid rgb(255, 204, 0); padding:5px; background: rgb(243, 243, 236) none repeat scroll 0%;">
                                                            The EU0 instance will have maintenance performed at this time. The instance will be unavailable for the duration of the maintenance.
                                                        </td>
                                                    </tr>
                                                    
                                                    <tr>
                                                        <td width="13%"
                                                            style="border-bottom: 1px solid rgb(255, 204, 0); border-right: 1px solid rgb(255, 204, 0); padding:5px; ">
                                                            <b>NA1
                                                            </b>
                                                        </td>

                                                        <td width="25%"
                                                            style="border-bottom: 1px solid rgb(255, 204, 0); border-right: 1px solid rgb(255, 204, 0); padding:5px; ">
                                                            March 20, 7:00 pm PDT&nbsp;-<br/>March 21, 3:00 am PDT
                                                        </td>

                                                        <td style="border-bottom: 1px solid rgb(255, 204, 0); padding:5px; ">
                                                            The NA1 instance will have maintenance performed at this time. The instance will be unavailable for the duration of the maintenance.
                                                        </td>
                                                    </tr>
                                                    
                                                    <tr>
                                                        <td width="13%"
                                                            style="border-bottom: 1px solid rgb(255, 204, 0); border-right: 1px solid rgb(255, 204, 0); padding:5px; background: rgb(243, 243, 236) none repeat scroll 0%;">

                                                            <b>All instances
                                                            </b>
                                                        </td>
                                                        <td width="25%"
                                                            style="border-bottom: 1px solid rgb(255, 204, 0); border-right: 1px solid rgb(255, 204, 0); padding:5px; background: rgb(243, 243, 236) none repeat scroll 0%;">
                                                            March 20, 9:00 pm PDT&nbsp;-<br/>March 20, 9:30 pm PDT
                                                        </td>

                                                        <td style="border-bottom: 1px solid rgb(255, 204, 0); padding:5px; background: rgb(243, 243, 236) none repeat scroll 0%;">
                                                            The Salesforce.com Technology will be performing maintenance at this time. During this time all instances will be unavailable for the duration of the maintenance.
                                                        </td>

                                                    </tr>
                                                    
                                                </table>
                                                
                                            </center>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>

                </table>
            </td>
        </tr>
    </table>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2010/03/13/extended-na1-maintenance.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Opportunity Page Layout &#8211; With Highlights Panel!</title>
		<link>http://www.x2od.com/2010/02/18/new-opportunity-page-layout-with-highlights-panel.html</link>
		<comments>http://www.x2od.com/2010/02/18/new-opportunity-page-layout-with-highlights-panel.html#comments</comments>
		<pubDate>Thu, 18 Feb 2010 17:30:42 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[Spring 10]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Force.com Builder]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=963</guid>
		<description><![CDATA[Yesterday, I enabled the new Opportunity page layout in my Developer Spring &#8217;10 Preview org, and it took a few steps, so I thought I&#8217;d share them with you. Firstly, you&#8217;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, [...]]]></description>
			<content:encoded><![CDATA[<p>
      Yesterday, I enabled the new Opportunity page layout in my Developer Spring &#8217;10 Preview org, and it took a few steps, so I thought I&#8217;d share them with you.</p>
<p>
      Firstly, you&#8217;ll need to contact salesforce.com to get this feature enabled.
    </p>
<p>
      Then be patient. It takes a minute or two for the update to propagate. Clearly, something was churning in the Force.com platform background!
    </p>
<p>
      Now we&#8217;ll navigate NOT to the <a href="https://prerelna1.pre.salesforce.com/ui/setup/org/UserInterfaceUI?setupid=UserInterface&#038;retURL=%2Fui%2Fsetup%2FSetup%3Fsetupid%3DCustomize">Setup | Customize | User Interface</a> screen (where this should be enabled). Instead, we&#8217;ll go to the <a href="https://prerelna1.pre.salesforce.com/ui/setup/layout/PageLayouts?type=Opportunity&#038;setupid=OpportunityLayouts&#038;retURL=%2Fui%2Fsetup%2FSetup%3Fsetupid%3DOpportunity">Opportunity Page Layout</a> screen.</p>
<p>
      Follow the cool prompts. They make it so easy, a &#8230; well, you know what I mean. </p>
<div id="attachment_975" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/Highlights-Panel-0.png"><img src="http://www.x2od.com/wp/uploads/Highlights-Panel-0-300x214.png" alt="Step 1: Enable the Highlights Panel" title="Highlights Panel 0" width="300" height="214" class="size-medium wp-image-975"></a><p class="wp-caption-text">Step 1: Enable the Highlights Panel</p></div> <div id="attachment_970" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/Highlights-Panel-1.png"><img src="http://www.x2od.com/wp/uploads/Highlights-Panel-1-300x194.png" alt="Opportunity Layout Setup page" title="Highlights Panel 1" width="300" height="194" class="size-medium wp-image-970"></a><p class="wp-caption-text">Opportunity Layout Setup</p></div> <div id="attachment_976" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/Highlights-Panel-1.5.png"><img src="http://www.x2od.com/wp/uploads/Highlights-Panel-1.5-300x100.png" alt="Step 2: Edit the Page Layout" title="Highlights Panel 1-5" width="300" height="100" class="size-medium wp-image-976"></a><p class="wp-caption-text">Step 2: Edit the Page Layout</p></div> <div id="attachment_965" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/Highlights-Panel-2.png"><img src="http://www.x2od.com/wp/uploads/Highlights-Panel-2-300x172.png" alt="Choose Fields to Display" title="Highlights Panel 2" width="300" height="172" class="size-medium wp-image-965"></a><p class="wp-caption-text">Choose Fields to Display</p></div>
<p>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&#8217;m just guessing.)</p>
<p>Once you&#8217;ve done this for each page layout, click on the big button. </p>
<div id="attachment_966" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/Highlights-Panel-3.png"><img src="http://www.x2od.com/wp/uploads/Highlights-Panel-3-300x196.png" alt="Confirmation" title="Highlights Panel 3" width="300" height="196" class="size-medium wp-image-966"></a><p class="wp-caption-text">Confirmation - You are (mostly) done!</p></div>
<p>At this point, each user can enable the bar. I have no idea why the admin can&#8217;t just force this on all users &#8211; or maybe I missed something &#8211; but it seems to be an opt-in feature.</p>
<div id="attachment_993" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/Highlights-Panel-8.png"><img src="http://www.x2od.com/wp/uploads/Highlights-Panel-8-300x232.png" alt="Enable User Opt-In" title="Highlights Panel 8" width="300" height="232" class="size-medium wp-image-993" /></a><p class="wp-caption-text">Step 3: Enable User Opt-In</p></div>
<p>Here&#8217;s the link to enable the feature.  Of course, you may wish to watch a video as well!</p>
<div id="attachment_967" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/Highlights-Panel-4.png"><img src="http://www.x2od.com/wp/uploads/Highlights-Panel-4-300x111.png" alt="The link to enable this setting" title="Highlights Panel 4" width="300" height="111" class="size-medium wp-image-967"></a><p class="wp-caption-text">The link to enable this setting</p></div>
<p>And here it is!</p>
<div id="attachment_968" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/Highlights-Panel-5.png"><img src="http://www.x2od.com/wp/uploads/Highlights-Panel-5-300x126.png" alt="The new layout!" title="Highlights Panel 5" width="300" height="126" class="size-medium wp-image-968"></a><p class="wp-caption-text">The new layout!</p></div><br />
<div id="attachment_969" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/Highlights-Panel-6.png"><img src="http://www.x2od.com/wp/uploads/Highlights-Panel-6-300x185.png" alt="View from the bottom of the page" title="Highlights Panel 6" width="300" height="185" class="size-medium wp-image-969"></a><p class="wp-caption-text">Return to top from the bottom of the page</p></div>
<p>It&#8217;s interesting that if you have this enabled, certain user interface settings (yes, at Setup | Customize | User Interface) cannot be changed:  </p>
<div id="attachment_971" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/Highlights-Panel-7.png"><img src="http://www.x2od.com/wp/uploads/Highlights-Panel-7-300x299.png" alt="When this is enabled, you cannot turn off two settings" title="Highlights Panel 7" width="300" height="299" class="size-medium wp-image-971"></a><p class="wp-caption-text">When this is enabled, you cannot turn off two settings</p></div>
<p>Here&#8217;s my prediction: We will start to see two major mistakes during Salesforce demos: </p>
<ol>
<li>We will continue to see the link asking if we want more information on inline editing (after more than a year, it&#8217;s time to turn that off, people).</li>
<li>At the top of the Opportunity detail page, we will see this link.</li>
</ol>
<p>And I will continue to think less of all demonstrators who make these mistakes.</p>
<p><strong>Happy Spring 2010!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2010/02/18/new-opportunity-page-layout-with-highlights-panel.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Get Documents and Attachments out of Salesforce</title>
		<link>http://www.x2od.com/2010/02/08/docs-and-attachs-out-of-salesforce.html</link>
		<comments>http://www.x2od.com/2010/02/08/docs-and-attachs-out-of-salesforce.html#comments</comments>
		<pubDate>Mon, 08 Feb 2010 19:16:03 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Spring 10]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[DreamFactory]]></category>
		<category><![CDATA[Force.com Builder]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[Salesforce.com]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=905</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>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.</p>
<p>Why is it even an issue? </p>
<ul>
<li><em>Surely we can download each file?</em>  Yes, but who wants to?</li>
<li><em>Can't we do a Data Export and then upload those to Content?</em>  Yes, but all the files are renamed with their 15-character Ids, making renaming them all-but-impossible.</li>
</ul>
<br>
<strong>salesforce.com and DreamFactory to the rescue!</strong>
<h3>Solution 1</h3>
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:
<pre class="brush: perl;">
# Nick Marcantonio
# nmarcantonio at salesforce.com
# 08/07

$file = 'Attachment.csv';

open (F, $file) || die (&quot;Could not open $file!&quot;);

$line = &lt;F&gt;; #read first line which is nothing but column headers
while ($line = &lt;F&gt;)
{
  ($id,$name) = split ',', $line;
  chomp($id);
  $id =~ s/\&quot;//g;
  chomp($name);
  $name =~ s/\&quot;//g;
  
  #print &quot;$id : $name\n&quot;;
  
  $result = rename($id, $name);
  #print &quot;$result\n&quot;;
}

close (F);
</pre>
The instructions: 
<pre class="brush: plain;">
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) 
</pre>
<p>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.</p>
<p>A heartfelt thank-you to Nick Marcantonio for his help!</p>
<h3>Solution 2</h3>
<p>Install DreamFactory's FREE <a href="http://sites.force.com/appexchange/listingDetail?listingId=a0N30000001e1GkEAI">DreamTeam Document Management</a> application from the AppExchange to drag-and-drop your Documents to your desktop.  <br>
This doesn't work with Attachments, though, so you may need to use another method for them.</p>
<p>Please let us know how it goes - good luck and enjoy Content!</p>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2010/02/08/docs-and-attachs-out-of-salesforce.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Computer Associates Plans To Release Agile Development Tool On Force.com Platform</title>
		<link>http://www.x2od.com/2009/11/19/computer-associates-planned-dev-tool.html</link>
		<comments>http://www.x2od.com/2009/11/19/computer-associates-planned-dev-tool.html#comments</comments>
		<pubDate>Thu, 19 Nov 2009 18:48:25 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Partners]]></category>
		<category><![CDATA[Force.com Platform]]></category>
		<category><![CDATA[New Features]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=859</guid>
		<description><![CDATA[Today, at Dreamforce 2009, Computer Associates plans to release CA Agile Planner (http://www.ca.com/agile), a tool to manage agile development teams. ]]></description>
			<content:encoded><![CDATA[<p>Today, at Dreamforce 2009, Computer Associates plans to release CA Agile Planner(<a href="http://www.ca.com/agile">http://www.ca.com/agile</a>), a tool to manage agile development teams.<br />
CA Agile Planner will be integrated with CA Clarity PPM (<a href="http://www.ca.com/ppm">http://www.ca.com/ppm</a>).</p>
<p>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.</p>
<p>For more information, see <a href="http://www.ca.com/agile">http://www.ca.com/agile</a>.</p>
<p>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.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/11/19/computer-associates-planned-dev-tool.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Developer Library Released</title>
		<link>http://www.x2od.com/2009/11/19/new-developer-library-released.html</link>
		<comments>http://www.x2od.com/2009/11/19/new-developer-library-released.html#comments</comments>
		<pubDate>Thu, 19 Nov 2009 17:43:29 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Force.com Platform]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[Visualforce]]></category>
		<category><![CDATA[Winter 10]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Dreamforce 2009]]></category>
		<category><![CDATA[Salesforce.com]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=853</guid>
		<description><![CDATA[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!]]></description>
			<content:encoded><![CDATA[<p>Today, Developer Force (<a href="http://developer.force.com">http://developer.force.com</a>) released its new library.  Here are a few of them.  All can be found at <a href="http://wiki.developerforce.com/index.php/Documentation">http://wiki.developerforce.com/index.php/Documentation</a>.</p>
<p>Workbook<br />
<a href="http://www.salesforce.com/us/developer/docs/workbook/index.htm">http://www.salesforce.com/us/developer/docs/workbook/index.htm</a></p>
<p>Fundamentals<br />
<a href="http://www.salesforce.com/us/developer/docs/fundamentals/index.htm">http://www.salesforce.com/us/developer/docs/fundamentals/index.htm</a></p>
<p>Cookbook<br />
<a href="http://www.salesforce.com/us/developer/docs/cookbook/index.htm">http://www.salesforce.com/us/developer/docs/cookbook/index.htm</a></p>
<p>Apex Advanced Code Example<br />
<a href="http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_shopping_cart_example.htm">http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_shopping_cart_example.htm</a><br />
<a href="https://sites.secure.force.com/appexchange/listingDetail?listingId=a0N30000001saDCEAY">https://sites.secure.force.com/appexchange/listingDetail?listingId=a0N30000001saDCEAY</a></p>
<p>And many more to come!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/11/19/new-developer-library-released.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filtered Lookups, Validation Rules, and Order of Execution</title>
		<link>http://www.x2od.com/2009/10/06/filtered-lookups-validation-rules-and-order-of-execution.html</link>
		<comments>http://www.x2od.com/2009/10/06/filtered-lookups-validation-rules-and-order-of-execution.html#comments</comments>
		<pubDate>Tue, 06 Oct 2009 15:47:34 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Winter 10]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Force.com Builder]]></category>
		<category><![CDATA[Force.com Platform]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=771</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>Reading the <a href="http://drop.io/ds/asset/filtered-lookup-cheatsheet-beta">cheatsheet for Filtered Lookup (beta)</a>, I noticed an interesting line:</p>
<p><code>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.</code></p>
<p>The implications for this are massive.  Let's explore two examples:</p>
<p><strong>Example 1: Filter as Validation Rule from Parent Record</strong></p>
<ul>
	<li>We create a lookup on a Child object to Parent.</li>
	<li>We filter the lookup to EXCLUDE Parent.Status = 'Closed' (Parent.Status is only Open or Closed.)</li>
	<li>We can edit the Child records as long as the Parent Status is not Closed.</li>
	<li>When Parent.Status is changed to Closed, existing related Child records are not affected...</li>
	<li><strong>BUT</strong> 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.</li>
	<li>(and clearly we cannot add new Child records either)</li>
</ul>
<p><strong>Conclusion:</strong> Thus, Filtered Lookups act much like Validation Rules.  A quick experiment shows that Filtered Lookup errors actually fire <u>before</u> Validation Rules.</p>
<p><strong>Example 2: Filter as Validation Rule on Roll-Up Summary (from Child Record)</strong> - what the line above was referencing</p>
<ul>
	<li>Use the above example, but change the lookup to a master-detail relationship</li>
	<li>Create a Roll-Up Summary field to count all child records</li>
	<li>Prevent saving more than 10 child records for one parent record</li>
</ul>
<p>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.</p>
<p>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...</p>

<h4>Conclusion</h4>
<p>This is a very powerful feature!  Thanks to salesforce.com for rolling it out, even in beta form.</p>
<p><strong>Real world example:</strong> 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!</p>
<P><em>For further reading, check <a href="https://na1.salesforce.com/help/doc/user_ed.jsp?loc=help&target=fields_lookup_filters_examples.htm">Salesforce Help's Lookup Filters examples</a>.</em></p>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/10/06/filtered-lookups-validation-rules-and-order-of-execution.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A Mention in the Developers Challenge</title>
		<link>http://www.x2od.com/2009/10/02/a-mention-in-the-developers-challenge.html</link>
		<comments>http://www.x2od.com/2009/10/02/a-mention-in-the-developers-challenge.html#comments</comments>
		<pubDate>Fri, 02 Oct 2009 19:56:51 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[X-Squared On Demand]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[Force.com Platform]]></category>
		<category><![CDATA[Sites]]></category>
		<category><![CDATA[Visualforce]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=754</guid>
		<description><![CDATA[The salesforce.com Developer Force Challenge has concluded, and the team of Force Squared and The Enforcer won a mention! Our Daily Shinro site was listed &#8220;for sheer exuberance!&#8221; I&#8217;m really proud of the site, though the lion&#8217;s share of the kudos go to John for the concept and site design. I just coded whatever he [...]]]></description>
			<content:encoded><![CDATA[<p>The salesforce.com <a href="http://blog.sforce.com/sforce/2009/09/developer-force-challenge-results.html">Developer Force Challenge has concluded</a>, and the team of Force Squared and The Enforcer won a mention!</p>
<p>Our <a href="http://www.dailyshinro.com">Daily Shinro</a> site was listed &#8220;for sheer exuberance!&#8221;  </p>
<p>I&#8217;m really proud of the site, though the lion&#8217;s share of the kudos go to John for the concept and site design.  I just coded whatever he told me to code; he&#8217;s the creative one!</p>
<p>So if anyone is looking for a custom Force.com Site or website integration to Salesforce, <a href="/contact">contact us</a> and let&#8217;s discuss your needs!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/10/02/a-mention-in-the-developers-challenge.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preparing a New Org</title>
		<link>http://www.x2od.com/2009/09/16/preparing-a-new-org.html</link>
		<comments>http://www.x2od.com/2009/09/16/preparing-a-new-org.html#comments</comments>
		<pubDate>Wed, 16 Sep 2009 18:44:59 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[New Features]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=717</guid>
		<description><![CDATA[Every time one encounters a fresh org, there are maintenance tasks to perform. I usually go through an org (whether a Developer Edition org or a Prerelease version) and do the same tasks, generally in no particular order. This time, however, I wrote down what I did as I did it. Looking at the list, it's hardly in any "best practices" order at all - it's just how I did it.

There's no need to follow every step, and it is not a complete list of all possibilities, but this should give you some idea of the possibilities and available tweaks: (*** indicates some of the new features in WInter '10)]]></description>
			<content:encoded><![CDATA[<p>With the impending arrival of the Winter 2010 (aka 162 or Winter'10) edition of Salesforce CRM, 
as with every other release, comes a prerelease org.  (You can get one at 
<a href="https://www.salesforce.com/form/trial/prerelease_winter10.jsp">https://www.salesforce.com/form/trial/prerelease_winter10.jsp</a>.)</p>
<p>Every time one encounters a fresh org, there are maintenance tasks to perform.  I usually go through an org (whether a Developer Edition 
org or a Prerelease version) and do the same tasks, generally in no particular order.  This time, however, I wrote down what I did as I did it.  Looking at the list, it's hardly in any
"best practices" order at all - it's just how I did it.</p>
<p>There's no need to follow every step, and it is not a complete list of all possibilities, but this should give you some idea of the possibilities and available tweaks: (*** indicates some of the new features in WInter '10)</p>
<ol>
	<li>Save login with 1Password/Roboform</li>
	<li>Reset (Set) Security Token</li>
	<li>Administration Setup | Security Controls</li>
<ul>
	<li>Session time 8 hrs
	<li>Passwords never expire</li>
</ul>
	<li>Create Record Types (and Business Processes) for Lead, Opportunity, Case</li>
	<li>(Campaigns were not enabled in this prerelease org) - would have configured them here, similarly</li>
	<li>Activities section: Calendar link on sidebar</li>
	<li>Download latest versions of Connect for Outlook, Office Edition</li>
	<li>Opportunities:</li>
<ul>
	<li>Enable Similar Opportunities</li>
	<li>Enable Opportunity Teams</li>
</ul>

	<li>Create Account Master Record Type</li>
	
	<li>Enable Account Teams</li>
<li>Create Contact Master Record Type</li>
<ul><li><i>Note: Asked to add to page layout.  Not asked for Opportunities.</i></li></ul>
	<li>Enable Case Teams</li>
	<li>Enable Public Solutions</li>
	<li>Solutions:</li>
<ul>
	<li>Enable Solution Browsing</li>
	<li>Enable Solution HTML</li>
<li>Could have created a Solution Process & Record Type</li>
	<li>Did not enable multilingual solutions</li>
</ul>
	<li>Enable Self-Service</li>
	<li>Enable Web-to-Case</li>
	<li>Create default Owner, etc (auto prompted)</li>
	<li>Enable PRM and Partner Portal (though have no licenses)</li>
	<li>Salesforce to Salesforce</li>
<ul>
<li>Enabled S2S</li>

	<li>Set up S2S Connection Finder ***</li>
	<li>Added fields to page layout - Kept read-only for all profiles except System Administrator</li>
	<li>Enable Public & Private Tags</li>
</ul>
	<li>Enable Console for all Profiles</li>
	<li>Search Settings - Enable Enhanced Lookup & Auto-Complete</li>
	<li>User Interface</li>
	<ul>
	<li>Separate loading of related lists</li>
	<li>Spell Checker on Tasks & Events</li>
	<li>Collapsible Sidebar</li>
	<li>Custom Sidebar on all Pages</li>
	<li>Enhanced Profile Management ***</li>
	</ul>
	<li>Set myself as default Workflow User</li>
	<li>Looked at Develop | Custom Settings ***</li>
	<li>Created a Default Queue and added myself</li>
	<li>Set all Sharing Rules to Private</li>
	<li>Update Home Page to the way I like it</li>
<ul>
<li>Order of wide section (top down): Calendar, Tasks, Items to Approve, Dashboard</li>
<li>No changes to narrow section</li>
</ul>
</ol>
<p> Other things that may be possible in other orgs:</p>
<ul>
	<li>Enable Customer Portal</li>
	<li>Customize Campaigns</li>
	<li>Set up Sites</li>

</ul>
<p>Again, this is not meant to be a complete list.  Also, it is not intended to be a how-to; for more information you may search the Help link
at the top of every org page, check <a href="http://www.salesforce.com/community">Salesforce Community</a>, or <a href="http://developer.force.com">Developer Force</a>.</p>
<p>Happy configuring!</p?


]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/09/16/preparing-a-new-org.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Show Current Year Using Only Visualforce</title>
		<link>http://www.x2od.com/2009/08/17/show-current-year-using-only-visualforce.html</link>
		<comments>http://www.x2od.com/2009/08/17/show-current-year-using-only-visualforce.html#comments</comments>
		<pubDate>Mon, 17 Aug 2009 17:08:34 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Visualforce]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=698</guid>
		<description><![CDATA[While perusing some websites, looking at html code, I saw something interesting: A company had used Javascript to update the copyright date of its website using Javascript. This is the code. Copyright &#38;copy; 2005-&#60;script type=&#34;text/javascript&#34;&#62;document.write(new Date().getFullYear());&#60;/script&#62; This Company. All rights reserved. Of course, as a Force.com developer, I prefer to use Visualforce and Apex over [...]]]></description>
			<content:encoded><![CDATA[<p>While perusing some websites, looking at html code, I saw something interesting:
<p>A company had used Javascript to update the copyright date of its website using Javascript.  This is the code.
<pre class="brush: xml;">
Copyright &amp;copy; 2005-&lt;script type=&quot;text/javascript&quot;&gt;document.write(new Date().getFullYear());&lt;/script&gt; This Company. All rights reserved.
</pre>
<p>Of course, as a Force.com developer, I prefer to use Visualforce and Apex over Javascript (as it makes the client thinner - 
thick clients are not my preferred <em>modus operandi</em>).</p>
<p>This is the Visualforce version of the above code; it requires no Apex controller nor extension, and will always display the current year.</p>
<pre class="brush: xml;">
Copyright &amp;copy; 2005-{!year(today())} This Company. All rights reserved.
</pre>
<p>Feel free to use this snippet in your Visualforce pages (including Sites) to ensure that on January 1, you won't look foolish for failing to (shudder) manually
update the footer in your site template.</p>
Happy coding!]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/08/17/show-current-year-using-only-visualforce.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Overload Apex Class to be Controller AND Extension</title>
		<link>http://www.x2od.com/2009/07/24/overload-apex-class-to-be-controller-and-extension.html</link>
		<comments>http://www.x2od.com/2009/07/24/overload-apex-class-to-be-controller-and-extension.html#comments</comments>
		<pubDate>Fri, 24 Jul 2009 20:01:00 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Visualforce]]></category>
		<category><![CDATA[X-Squared On Demand]]></category>
		<category><![CDATA[Eclipse IDE]]></category>
		<category><![CDATA[Force.com Platform]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=682</guid>
		<description><![CDATA[Coding the new premium version of Mass Update Contacts (details to come), I replaced the two parts of the page with Apex Components. This will allow the app to support custom address fields and international address formats.
I didn't want to write one ControllerExtension for the main page, a CustomController for the view section component, and another CustomController for the pageblocktable component. So here is the overloaded class constructor. Note that this works because an extension passes the StandardController to the constructor, and a CustomController passes nothing:]]></description>
			<content:encoded><![CDATA[<p>Wow - today brought an interesting discovery.  Here's the situation:</p>
<p>Coding the new premium version of Mass Update Contacts (details to come), I replaced the two parts of the page with Apex Components.  This will allow the app to support custom address fields and international address formats.</p>
<p>I didn't want to write one ControllerExtension for the main page, a CustomController for the view section component, and another CustomController for the pageblocktable component.  So here is the overloaded class constructor.  Note that this works because an extension passes the StandardController to the constructor, and a CustomController passes nothing:</p>

<pre class="brush: java;">
public with sharing class VersatileClass {

private Account account;

public VersatileClass(){
	system.debug('OPERATING AS CONTROLLER');
		if(System.currentPageReference().getParameters().get('id')==null){
			//Include error checking here
		} else{
			string AId = System.currentPageReference().getParameters().get('id');
			account = [select id, name from Account where id = :AId];
			//And whatever else you want to do
		}
}

public VersatileClass(ApexPages.StandardController controller) {
	system.debug('OPERATING AS EXTENSION');
		if(System.currentPageReference().getParameters().get('id')==null){
			//Include error checking here
		} else{
			this.account = (Account)controller.getRecord();
			//And whatever else you want to do
		}
	}
}
</pre>
<p>Enjoy!  This should save people a lot of time.</p>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/07/24/overload-apex-class-to-be-controller-and-extension.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Email Inbox Version 2</title>
		<link>http://www.x2od.com/2009/07/15/email-inbox-version-2.html</link>
		<comments>http://www.x2od.com/2009/07/15/email-inbox-version-2.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 01:39:41 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Visualforce]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[X-Squared On Demand]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=664</guid>
		<description><![CDATA[Well, it took about ten minutes from the release of Email Inbox Version 1 for people to request additional features, screenshots, etc. Version 2 includes some neat icons, and this post has the multiple-times-requested screenshots we promised. First, a teaser screenshot. (There's a better one below the code.) Here's the updated Visualforce code: &#60;apex:page controller=&#34;EmailMessageController&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it took about ten minutes from the release of <a href="http://www.x2od.com/2009/07/14/visualforce-email-inbox.html">Email Inbox Version 1</a> for people to request additional features, screenshots, etc.  Version 2 includes some neat icons, and this post has the multiple-times-requested screenshots we promised.</p>
<p>First, a teaser screenshot.  (There's a better one below the code.)</p>
<center><a href="http://www.x2od.com/wp/uploads/EmailInbox-screenshot.JPG"><img src="http://www.x2od.com/wp/uploads/EmailInbox-screenshot-300x50.jpg" alt="EmailInbox screenshot" title="EmailInbox screenshot" width="300" height="50" class="aligncenter size-medium wp-image-672" /></a></center>
<p>Here's the updated Visualforce code:</p>
<pre class="brush: xml;">
&lt;apex:page controller=&quot;EmailMessageController&quot; action=&quot;{!ViewData}&quot;&gt;
    &lt;apex:sectionHeader title=&quot;Email Messages&quot; subtitle=&quot;&quot;&gt;&lt;/apex:sectionHeader&gt;
    &lt;apex:pageblock id=&quot;emailblock&quot;&gt;
        &lt;apex:facet name=&quot;header&quot;&gt;
            &lt;apex:form &gt;
                &lt;apex:panelGrid styleClass=&quot;list&quot;
                    columnClasses=&quot;pbTitle,pbButton,pbHelp&quot; columns=&quot;3&quot; border=&quot;0&quot;
                    cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
                    &lt;apex:outputLabel &gt;&lt;h3&gt;Messages&lt;/h3&gt;&lt;/apex:outputLabel&gt;
                    &lt;apex:commandButton value=&quot; Refresh &quot; styleClass=&quot;btn&quot;
                        action=&quot;{!ViewData}&quot; rerender=&quot;emailblock&quot;&gt;&lt;/apex:commandButton&gt;
                    &lt;apex:SelectList value=&quot;{!wheretext}&quot; size=&quot;1&quot;  id=&quot;controllerselectlist&quot;&gt;
                        &lt;apex:actionSupport event=&quot;onchange&quot; action=&quot;{!ViewData}&quot;
                            reRender=&quot;emailblock&quot;&gt;&lt;/apex:actionSupport&gt;
                        &lt;apex:selectOptions value=&quot;{!views}&quot; /&gt;
                    &lt;/apex:SelectList&gt;
                &lt;/apex:panelGrid&gt;
            &lt;/apex:form&gt;
        &lt;/apex:facet&gt;
        &lt;apex:form &gt;
            &lt;apex:pageblocktable value=&quot;{!Messages}&quot; var=&quot;e&quot; id=&quot;emailtable&quot;
                bgcolor=&quot;#F3F3EC&quot; styleClass=&quot;list&quot; rowClasses=&quot;dataRow&quot;
                onRowMouseOver=&quot;hiOn(this);&quot; onRowMouseOut=&quot;hiOff(this);&quot;&gt;
                &lt;apex:column &gt;
                    &lt;apex:facet name=&quot;header&quot;&gt;
                        &lt;apex:commandLink action=&quot;{!ViewData}&quot;
                            value=&quot;{!$ObjectType.EmailMessage.fields.Subject.label}{!IF(sortExpression=='Subject', 
                            IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
                            &lt;apex:param value=&quot;Subject&quot; name=&quot;column&quot;
                                assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
                        &lt;/apex:commandLink&gt;
                    &lt;/apex:facet&gt;
                    &lt;apex:outputLink value=&quot;/{!e.Id}&quot; target=&quot;_blank&quot;&gt;{!e.Subject}&lt;/apex:outputLink&gt;
                &lt;/apex:column&gt;
                &lt;apex:column &gt;
                    &lt;apex:facet name=&quot;header&quot;&gt;
                    {!$ObjectType.Contact.fields.Name.label}
                    &lt;/apex:facet&gt;
                    &lt;apex:outputLink value=&quot;/{!e.Parent.ContactId}&quot; target=&quot;_blank&quot;
                        rendered=&quot;{!IF(e.Parent.ContactId != '',true,false)}&quot;&gt;{!e.FromName}&lt;/apex:outputLink&gt;
                    &lt;apex:outputtext value=&quot;{!e.FromName}&quot;
                        rendered=&quot;{!IF(e.Parent.ContactId != '',false,true)}&quot; /&gt;
                &lt;/apex:column&gt;
                &lt;apex:column &gt;
                    &lt;apex:facet name=&quot;header&quot;&gt;
                    {!$ObjectType.Account.fields.Name.label}
                    &lt;/apex:facet&gt;
                    &lt;apex:outputLink value=&quot;/{!e.Parent.AccountId}&quot; target=&quot;_blank&quot;&gt;{!e.Parent.Account.Name}&lt;/apex:outputLink&gt;
                &lt;/apex:column&gt;
                &lt;apex:column value=&quot;{!e.FromAddress}&quot;&gt;
                    &lt;apex:facet name=&quot;header&quot;&gt;
                        &lt;apex:commandLink action=&quot;{!ViewData}&quot;
                            value=&quot;{!$ObjectType.EmailMessage.fields.FromAddress.label}{!IF(sortExpression=='FromAddress', 
                            IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
                            &lt;apex:param value=&quot;FromAddress&quot; name=&quot;column&quot;
                                assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
                        &lt;/apex:commandLink&gt;
                    &lt;/apex:facet&gt;
                &lt;/apex:column&gt;
                &lt;apex:column value=&quot;{!e.Status}&quot;&gt;
                    &lt;apex:facet name=&quot;header&quot;&gt;
                        &lt;apex:commandLink action=&quot;{!ViewData}&quot;
                            value=&quot;{!$ObjectType.EmailMessage.fields.Status.label}{!IF(sortExpression=='Status', 
                            IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
                            &lt;apex:param value=&quot;Status&quot; name=&quot;column&quot;
                                assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
                        &lt;/apex:commandLink&gt;
                    &lt;/apex:facet&gt;
                &lt;/apex:column&gt;
                &lt;apex:column value=&quot;{!e.MessageDate}&quot;&gt;
                    &lt;apex:facet name=&quot;header&quot;&gt;
                        &lt;apex:commandLink action=&quot;{!ViewData}&quot;
                            value=&quot;{!$ObjectType.EmailMessage.fields.MessageDate.label}{!IF(sortExpression=='MessageDate', 
                            IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
                            &lt;apex:param value=&quot;MessageDate&quot; name=&quot;column&quot;
                                assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
                        &lt;/apex:commandLink&gt;
                    &lt;/apex:facet&gt;
                &lt;/apex:column&gt;
                &lt;apex:column &gt;
                    &lt;apex:facet name=&quot;header&quot;&gt;
                        &lt;apex:commandLink action=&quot;{!ViewData}&quot;
                            value=&quot;Inbound/Outbound{!IF(sortExpression=='Incoming', 
                            IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
                            &lt;apex:param value=&quot;Incoming&quot; name=&quot;column&quot;
                                assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
                        &lt;/apex:commandLink&gt;
                    &lt;/apex:facet&gt;
                    &lt;apex:image url=&quot;/img/emailInbound.gif&quot; rendered=&quot;{!e.Incoming}&quot; /&gt;
                    &lt;apex:image url=&quot;/img/emailOutbound.gif&quot; rendered=&quot;{!NOT(e.Incoming)}&quot; /&gt;
                    &lt;!--&lt;apex:outputfield value=&quot;{!e.Incoming}&quot; rendered=&quot;{!NOT(e.Incoming)}&quot; /&gt;--&gt;
                &lt;/apex:column&gt;
                &lt;apex:column &gt;
                    &lt;apex:facet name=&quot;header&quot;&gt;
                        &lt;apex:commandLink action=&quot;{!ViewData}&quot;
                            value=&quot;Attachment{!IF(sortExpression=='HasAttachment', 
                            IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
                            &lt;apex:param value=&quot;HasAttachment&quot; name=&quot;column&quot;
                                assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
                        &lt;/apex:commandLink&gt;
                    &lt;/apex:facet&gt;
                    &lt;apex:image url=&quot;/img/emailHasAttach.gif&quot; rendered=&quot;{!e.HasAttachment}&quot;/&gt;
                    &lt;apex:outputfield value=&quot;{!e.HasAttachment}&quot; rendered=&quot;{!NOT(e.HasAttachment)}&quot; /&gt;
                &lt;/apex:column&gt;
                &lt;apex:column &gt;
                    &lt;apex:facet name=&quot;header&quot;&gt;
                        &lt;apex:commandLink action=&quot;{!ViewData}&quot;
                            value=&quot;{!$ObjectType.Case.fields.CaseNumber.label}{!IF(sortExpression=='ParentId', 
                            IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
                            &lt;apex:param value=&quot;ParentId&quot; name=&quot;column&quot;
                                assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
                        &lt;/apex:commandLink&gt;
                    &lt;/apex:facet&gt;
                    &lt;apex:outputLink value=&quot;/{!e.ParentId}&quot;&gt;{!e.Parent.CaseNumber}&lt;/apex:outputLink&gt;

                &lt;/apex:column&gt;
                &lt;apex:column value=&quot;{!e.ToAddress}&quot;&gt;
                    &lt;apex:facet name=&quot;header&quot;&gt;
                        &lt;apex:commandLink action=&quot;{!ViewData}&quot;
                            value=&quot;{!$ObjectType.EmailMessage.fields.ToAddress.label}{!IF(sortExpression=='ToAddress', 
                            IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
                            &lt;apex:param value=&quot;ToAddress&quot; name=&quot;column&quot;
                                assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
                        &lt;/apex:commandLink&gt;
                    &lt;/apex:facet&gt;
                &lt;/apex:column&gt;
            &lt;/apex:pageblocktable&gt;
        &lt;/apex:form&gt;
    &lt;/apex:pageblock&gt;
&lt;/apex:page&gt;
</pre>
<p>The Apex controller code has not changed from <a href="http://www.x2od.com/2009/07/14/visualforce-email-inbox.html">Version 1</a>.  </p>
<p>Here's the screenshot, which includes some emails from around the Salesforce ecosystem:</p>
<center>
<div id="attachment_666" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/EmailInbox-screenshot-2.JPG"><img src="http://www.x2od.com/wp/uploads/EmailInbox-screenshot-2-300x110.jpg" alt="Incoming (and auto-response) Emails" title="EmailInbox screenshot" width="300" height="110" class="size-medium wp-image-666" /></a><p class="wp-caption-text">Incoming (and auto-response) Emails</p></div></center>

Things to notice and things we've learned:
<ol>
	<li>Salesforce will search ANY Email field to match an incoming email to a Contact. (nice job, Salesforce!) - We know because <a href="http://www.pocketsoap.com">Simon Fell</a>'s Contact.Email is sfell at salesforce.com, and his Contact.Secondary_Email__c is simon at fell.com in the sandbox.  Ditto (with her own email addresses) for <a href="http://www.xlerate.ca/">Irene Brodt</a>.</li>
	<li>Auto-response emails will be included.  We turned off auto-response after a few emails came in.</li>
	<li>Though the Email Address field is coded just to show the field value, Salesforce includes the Gmail link. (We assume that's because we activated the integration, but we may be wrong. Has anyone not activated that?)</li>
	<li>We did not (yet) implement the <a href="http://blogs.salesforce.com/support/2009/03/autocreating-a.html">super Email/Web2Case trigger code</a> that Marco Casalaina posted in the Salesforce Support Blog, but if we had, then every email in the list would be associated with a Contact. (Example: Michael Smith of Force2b.net, who will be a Contact from now on!)</li>
</ol>
Enjoy!  ]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/07/15/email-inbox-version-2.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Visualforce Email Inbox</title>
		<link>http://www.x2od.com/2009/07/14/visualforce-email-inbox.html</link>
		<comments>http://www.x2od.com/2009/07/14/visualforce-email-inbox.html#comments</comments>
		<pubDate>Tue, 14 Jul 2009 18:00:26 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Visualforce]]></category>
		<category><![CDATA[X-Squared On Demand]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=642</guid>
		<description><![CDATA[Sonny Cloward, SysAd at Rainforest Alliance, approached us about writing a Visualforce page to display all incoming emails for a given Case Queue. This led to quite a few interesting discoveries. Here's how we handled the project:]]></description>
			<content:encoded><![CDATA[<p>Sonny Cloward, SysAd at <a href="http://rainforestalliance.org/">Rainforest Alliance</a>, approached us about writing a Visualforce page to display all incoming emails for a given Case Queue.  This led a few interesting discoveries.  Here's how we handled the (donated time) project:</p>
<p>First, the page was built upon the <a href="http://salesforcesource.blogspot.com/2008/11/adding-sorting-capability-to.html">template Sam Arjimandi built</a> at <a href="http://salesforcesource.blogspot.com">Salesforce<Source></a>.  Instead of the Account object, we substituted the <a href="http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_emailmessage.htm">EmailMessage object</a>.  But something didn't work.  </p>
Fields have certain <a href="http://www.salesforce.com/us/developer/docs/api/Content/access_for_fields.htm">attributes</a>:<br />
            <table cellpadding="4" cellspacing="0" summary="" class="featureTable">
                <thead align="left">
                    <tr>
                        <th class="featureTableHeader" width="25%" id="d9607e40" colspan="1" rowspan="1">Property</th>
                        <th class="featureTableHeader" width="75%" id="d9607e43" colspan="1" rowspan="1">Description</th>
                    </tr>
                </thead>
                <tbody>

                    <tr>
                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="i1435186"><a name="i1435186" shape="rect"><!-- --></a>Autonumber</span>
                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">The <span>API</span> creates an autonumber.</td>
                    </tr>
                    <tr>

                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="i1435191"><a name="i1435191" shape="rect"><!-- --></a>Create</span>
                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">Value for the field can be specified during create using the <span>API</span>.</td>
                    </tr>
                    <tr>
                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="i1435199"><a name="i1435199" shape="rect"><!-- --></a>Defaulted on create</span>

                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">When created, a default value is supplied if no other value
is specified.</td>
                    </tr>
                    <tr>
                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="i1435204"><a name="i1435204" shape="rect"><!-- --></a>Delete</span>
                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">Value for the field can be deleted using the <span>API</span>.</td>

                    </tr>
                    <tr>
                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="i1435212"><a name="i1435212" shape="rect"><!-- --></a>Filter</span>
                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">Can be used as filter criteria in a SOQL query FROM or WHERE
clause.</td>
                    </tr>
                    <tr>
                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="access_lookup"><a name="access_lookup" shape="rect"><!-- --></a>idLookup</span>

                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">Can be used to specify a record in an <span><a href="sforce_api_calls_upsert.htm" shape="rect"><span><samp class="codeph">upsert()</samp></span></a></span> call. The <span class="fieldName">Id</span> field of each
object has this property and some <span class="fieldName">Name</span> fields. <span>There are exceptions, so check for the property in
any object you wish to <a href="sforce_api_calls_upsert.htm" shape="rect"><span><samp class="codeph">upsert()</samp></span>.</a></span></td>

                    </tr>
                    <tr>
                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="i1435217"><a name="i1435217" shape="rect"><!-- --></a>Nillable</span>
                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">The field can contain a null value.</td>
                    </tr>
                    <tr>
                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="i1435222"><a name="i1435222" shape="rect"><!-- --></a>Query</span>

                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">The field can be queried with SOQL using the <span>API</span>.</td>
                    </tr>
                    <tr>
                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="i1435230"><a name="i1435230" shape="rect"><!-- --></a>Replicate</span>
                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">The value of the field can be replicated using the <span>API</span>.</td>

                    </tr>
                    <tr>
                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="i1435238"><a name="i1435238" shape="rect"><!-- --></a>Restricted picklist</span>
                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">  A picklist that depends on the value of another picklist
for the values it displays.</td>
                    </tr>
                    <tr>

                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="i1435244"><a name="i1435244" shape="rect"><!-- --></a>Retrieve</span>
                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">Value of the field can be retrieved using the <span>API</span>.</td>
                    </tr>
                    <tr>
                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="field_access_search"><a name="field_access_search" shape="rect"><!-- --></a>Search</span>

                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">Can be searched with SOSL using the <span>API</span>.</td>
                    </tr>
                    <tr>
                        <td width="25%" headers="d9607e40" colspan="1" rowspan="1"><span id="i1435259"><a name="i1435259" shape="rect"><!-- --></a>Update</span>
                        </td>
                        <td width="75%" headers="d9607e43" colspan="1" rowspan="1">Can be updated using the <span>API</span>.</td>

                    </tr>
                </tbody>
            </table>
<p>The important one here is "Filter" because (as the documentation states) this allows the field to be used in a WHERE clause.  Also, however, (as the documentation does not state) it allows the field to be used in an ORDER BY clause.  So all fields on the EmailMessage object that do not allow filtering/ordering had to be presented plainly, without Sam's cool PageBlockTable sorting features.
Once this was done, Sonny had some great ideas:</p>
<ol>
	<li>Show the email subject, but make that a hyperlink to the email message itself</li>
	<li>Link the Case Number (EmailMessage.ParentId) to the Case (EmailMessage.Parent)</li>
	<li>Show the Case Contact (EmailMessage.Parent.Contact.Name), linking to the Contact (EmailMessage.Parent.ContactId)</li>
	<li>Show the Case Account (EmailMessage.Parent.Account.Name), linking to the Account (EmailMessage.Parent.AccountId)</li>
	<li>Provide filters - Incoming only, Unread only, etc.</li>
</ol>
You'll see in the Apex Code where we added parent object fields to the SOQL query, and where we used a List<SelectOption> to populate the query's filter.  
<pre class="brush: java;">
public with sharing class EmailMessageController {
   public String EmailMessage { get; set; }
   private List&lt;EmailMessage&gt; messages;
   private String sortDirection = 'ASC';
   private String sortExp = 'MessageDate';
   public String wheretext;

   public EmailMessageController(){
   	wheretext = '';
   }

   public String sortExpression { get {
        return sortExp;
     }
     set {
       //if the column is clicked on then switch between Ascending and Descending modes
       if (value == sortExp)
         sortDirection = (sortDirection == 'ASC')? 'DESC' : 'ASC';
       else
         sortDirection = 'ASC';
       sortExp = value;
     }
   }
   
public void setWhereText(String value) {  
   whereText = value;
 }
public string getWhereText(){
	return wheretext;
}
   
public List&lt;SelectOption&gt; getViews(){
	List&lt;SelectOption&gt; options = new List&lt;SelectOption&gt;();
	options.add(new SelectOption('WHERE e.id != null','All'));
	options.add(new SelectOption('WHERE e.Incoming = true AND e.Status = \'0\' ','Incoming Unread'));
	options.add(new SelectOption('WHERE e.Incoming = true AND e.Status = \'1\' ','Incoming Read'));
        options.add(new SelectOption('WHERE e.Incoming = true','All Incoming'));
        options.add(new SelectOption('WHERE e.Incoming = false','All Outgoing'));
        options.add(new SelectOption('WHERE e.ToAddress = \'support@x2od.com\'','Support Queue'));
        options.add(new SelectOption('WHERE e.ToAddress = \'support2@x2od.com\'','Support Queue2')); //etc.
        return options;
}

 public String getSortDirection() {
    //if not column is selected 
    if (sortExpression == null || sortExpression == '')
      return 'ASC';
    else
     return sortDirection;
 }

 public void setSortDirection(String value) {  
   sortDirection = value;
 }
  
   public List&lt;EmailMessage&gt; getMessages() {
       return messages;
   }
   
   public PageReference ViewData() {
       //build the full sort expression
       string sortFullExp = sortExpression  + ' ' + sortDirection;
      
       //query the database based on the sort expression
       messages = Database.query('Select e.FromAddress, e.Parent.ContactId, e.Parent.Contact.Name, e.Parent.Account.Name, e.ToAddress, e.Parent.CaseNumber, e.Parent.AccountId, e.TextBody, e.SystemModstamp, e.Subject, e.Status, e.ParentId, e.MessageDate, e.LastModifiedDate, e.LastModifiedById, e.IsDeleted, e.Incoming, e.Id, e.HtmlBody, e.Headers, e.HasAttachment, e.FromName, e.CreatedDate, e.CreatedById, e.CcAddress, e.BccAddress, e.ActivityId From EmailMessage e ' + wheretext + ' order by ' + sortFullExp + ' limit 1000');
       return null;
   }
}
</pre>
<p>And here's the Visualforce Page:</p>
<pre class="brush: xml;">
&lt;apex:page controller=&quot;EmailMessageController&quot; action=&quot;{!ViewData}&quot;&gt;
	&lt;apex:sectionHeader title=&quot;Email Messages&quot; subtitle=&quot;&quot;&gt;&lt;/apex:sectionHeader&gt;
	&lt;apex:pageblock id=&quot;emailblock&quot;&gt;
		&lt;apex:facet name=&quot;header&quot;&gt;
			&lt;apex:form&gt;
				&lt;apex:panelGrid styleClass=&quot;list&quot;
					columnClasses=&quot;pbTitle,pbButton,pbHelp&quot; columns=&quot;3&quot; border=&quot;0&quot;
					cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
					&lt;apex:outputLabel&gt;&lt;h3&gt;Messages&lt;/h3&gt;&lt;/apex:outputLabel&gt;
					&lt;apex:commandButton value=&quot; Refresh &quot; styleClass=&quot;btn&quot;
						action=&quot;{!ViewData}&quot; rerender=&quot;emailblock&quot;&gt;&lt;/apex:commandButton&gt;
					&lt;apex:SelectList value=&quot;{!wheretext}&quot; size=&quot;1&quot;	id=&quot;controllerselectlist&quot;&gt;
						&lt;apex:actionSupport event=&quot;onchange&quot; action=&quot;{!ViewData}&quot;
							reRender=&quot;emailblock&quot;&gt;&lt;/apex:actionSupport&gt;
						&lt;apex:selectOptions value=&quot;{!views}&quot; /&gt;
					&lt;/apex:SelectList&gt;
				&lt;/apex:panelGrid&gt;
			&lt;/apex:form&gt;
		&lt;/apex:facet&gt;
		&lt;apex:form&gt;
			&lt;apex:pageblocktable value=&quot;{!Messages}&quot; var=&quot;e&quot; id=&quot;emailtable&quot;
				bgcolor=&quot;#F3F3EC&quot; styleClass=&quot;list&quot; rowClasses=&quot;dataRow&quot;
				onRowMouseOver=&quot;hiOn(this);&quot; onRowMouseOut=&quot;hiOff(this);&quot;&gt;
				&lt;apex:column&gt;
					&lt;apex:facet name=&quot;header&quot;&gt;
						&lt;apex:commandLink action=&quot;{!ViewData}&quot;
							value=&quot;{!$ObjectType.EmailMessage.fields.Subject.label}{!IF(sortExpression=='Subject', 
							IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
							&lt;apex:param value=&quot;Subject&quot; name=&quot;column&quot;
								assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
						&lt;/apex:commandLink&gt;
					&lt;/apex:facet&gt;
					&lt;apex:outputLink value=&quot;/{!e.Id}&quot; target=&quot;_blank&quot;&gt;{!e.Subject}&lt;/apex:outputLink&gt;
				&lt;/apex:column&gt;
				&lt;apex:column&gt;
					&lt;apex:facet name=&quot;header&quot;&gt;
					{!$ObjectType.Contact.fields.Name.label}
					&lt;/apex:facet&gt;
					&lt;apex:outputLink value=&quot;/{!e.Parent.ContactId}&quot; target=&quot;_blank&quot;
						rendered=&quot;{!IF(e.Parent.ContactId != '',true,false)}&quot;&gt;{!e.FromName}&lt;/apex:outputLink&gt;
					&lt;apex:outputtext value=&quot;{!e.FromName}&quot;
						rendered=&quot;{!IF(e.Parent.ContactId != '',false,true)}&quot; /&gt;
				&lt;/apex:column&gt;
				&lt;apex:column&gt;
					&lt;apex:facet name=&quot;header&quot;&gt;
					{!$ObjectType.Account.fields.Name.label}
					&lt;/apex:facet&gt;
					&lt;apex:outputLink value=&quot;/{!e.Parent.AccountId}&quot; target=&quot;_blank&quot;&gt;{!e.Parent.Account.Name}&lt;/apex:outputLink&gt;
				&lt;/apex:column&gt;
				&lt;apex:column value=&quot;{!e.FromAddress}&quot;&gt;
					&lt;apex:facet name=&quot;header&quot;&gt;
						&lt;apex:commandLink action=&quot;{!ViewData}&quot;
							value=&quot;{!$ObjectType.EmailMessage.fields.FromAddress.label}{!IF(sortExpression=='FromAddress', 
							IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
							&lt;apex:param value=&quot;FromAddress&quot; name=&quot;column&quot;
								assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
						&lt;/apex:commandLink&gt;
					&lt;/apex:facet&gt;
				&lt;/apex:column&gt;
				&lt;apex:column value=&quot;{!e.Status}&quot;&gt;
					&lt;apex:facet name=&quot;header&quot;&gt;
						&lt;apex:commandLink action=&quot;{!ViewData}&quot;
							value=&quot;{!$ObjectType.EmailMessage.fields.Status.label}{!IF(sortExpression=='Status', 
							IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
							&lt;apex:param value=&quot;Status&quot; name=&quot;column&quot;
								assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
						&lt;/apex:commandLink&gt;
					&lt;/apex:facet&gt;
				&lt;/apex:column&gt;
				&lt;apex:column value=&quot;{!e.MessageDate}&quot;&gt;
					&lt;apex:facet name=&quot;header&quot;&gt;
						&lt;apex:commandLink action=&quot;{!ViewData}&quot;
							value=&quot;{!$ObjectType.EmailMessage.fields.MessageDate.label}{!IF(sortExpression=='MessageDate', 
							IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
							&lt;apex:param value=&quot;MessageDate&quot; name=&quot;column&quot;
								assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
						&lt;/apex:commandLink&gt;
					&lt;/apex:facet&gt;
				&lt;/apex:column&gt;
				&lt;apex:column value=&quot;{!e.Incoming}&quot;&gt;
					&lt;apex:facet name=&quot;header&quot;&gt;
						&lt;apex:commandLink action=&quot;{!ViewData}&quot;
							value=&quot;{!$ObjectType.EmailMessage.fields.Incoming.label}{!IF(sortExpression=='Incoming', 
							IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
							&lt;apex:param value=&quot;Incoming&quot; name=&quot;column&quot;
								assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
						&lt;/apex:commandLink&gt;
					&lt;/apex:facet&gt;
				&lt;/apex:column&gt;
				&lt;apex:column value=&quot;{!e.HasAttachment}&quot;&gt;
					&lt;apex:facet name=&quot;header&quot;&gt;
						&lt;apex:commandLink action=&quot;{!ViewData}&quot;
							value=&quot;{!$ObjectType.EmailMessage.fields.HasAttachment.label}{!IF(sortExpression=='HasAttachment', 
							IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
							&lt;apex:param value=&quot;HasAttachment&quot; name=&quot;column&quot;
								assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
						&lt;/apex:commandLink&gt;
					&lt;/apex:facet&gt;
				&lt;/apex:column&gt;
				&lt;apex:column&gt;
					&lt;apex:facet name=&quot;header&quot;&gt;
						&lt;apex:commandLink action=&quot;{!ViewData}&quot;
							value=&quot;{!$ObjectType.Case.fields.CaseNumber.label}{!IF(sortExpression=='ParentId', 
							IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
							&lt;apex:param value=&quot;ParentId&quot; name=&quot;column&quot;
								assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
						&lt;/apex:commandLink&gt;
					&lt;/apex:facet&gt;
					&lt;apex:outputLink value=&quot;/{!e.ParentId}&quot;&gt;{!e.Parent.CaseNumber}&lt;/apex:outputLink&gt;

				&lt;/apex:column&gt;
				&lt;apex:column value=&quot;{!e.ToAddress}&quot;&gt;
					&lt;apex:facet name=&quot;header&quot;&gt;
						&lt;apex:commandLink action=&quot;{!ViewData}&quot;
							value=&quot;{!$ObjectType.EmailMessage.fields.ToAddress.label}{!IF(sortExpression=='ToAddress', 
							IF(sortDirection='ASC','▼','▲'),'')}&quot;&gt;
							&lt;apex:param value=&quot;ToAddress&quot; name=&quot;column&quot;
								assignTo=&quot;{!sortExpression}&quot;&gt;&lt;/apex:param&gt;
						&lt;/apex:commandLink&gt;
					&lt;/apex:facet&gt;
				&lt;/apex:column&gt;
			&lt;/apex:pageblocktable&gt;
		&lt;/apex:form&gt;
	&lt;/apex:pageblock&gt;
&lt;/apex:page&gt;
</pre>
<p>There are some other cool bits: </p>
<p>If there is no Case.Contact, the table will display the FromName, pulled from the email message.</p>
<p>An interesting point: You may notice that EmailStatus is presented in numerical form.  For instance, Incoming Unread is 0, Incoming Read is 1, etc.  The documentation, however, says, "Read only. The status of the email. For example, “New,” “Unread,” “Replied,” “Sent.”"  So we're not sure of the exact mapping.  3 seems to be Sent, so 2 is probably Replied... but we're not sure.</p>
<p>Don't forget: EmailMessage has two lookups (foreign key): Case, and Activity.  This Activity is the task created when Salesforce receives the email, and is - according to the documentation - assigned to the Case Owner.  We're not sure what happens when the Case is owned by a Queue.  Feel free to comment and share your experiences.</p>
<p>
That's it!  Enjoy.</p>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/07/14/visualforce-email-inbox.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Eclipse as a Password Manager</title>
		<link>http://www.x2od.com/2009/07/10/eclipse-as-a-password-manager.html</link>
		<comments>http://www.x2od.com/2009/07/10/eclipse-as-a-password-manager.html#comments</comments>
		<pubDate>Fri, 10 Jul 2009 19:33:11 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Eclipse IDE]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=625</guid>
		<description><![CDATA[Recently, Judi Sohn wrote about a URL hack to save your Salesforce username and password (in an exposed, plaintext manner). This is a great way to save a lot of time logging into Salesforce.

There is another way to save un/pw combinations: Use Eclipse to store the un/pw/securitytoken.

Read more: http://www.x2od.com/?p=625&#038;preview=true#ixzz0Kt2X1lQD&#038;C]]></description>
			<content:encoded><![CDATA[<p>Caution: Only use this tip if your computer is SECURE.  </p>

<p>Recently, Judi Sohn <a href="http://www.judisohn.com/2009/06/tip_easy_salesforce_logins/">wrote about a URL hack</a> to save your Salesforce username and password (in an exposed, plaintext manner).  This is a great way to save a lot of time logging into Salesforce. </p>

<p>There is another way to save un/pw combinations: Use Eclipse to store the un/pw/securitytoken.  There's a catch (there always is): Once they're entered, you can't see them in plaintext for, say, doing a copy/paste of your token into <a href="https://na1.salesforce.com/setup/outlook/outlooksetup2.jsp?retURL=%2Fui%2Fsetup%2FSetup%3Fsetupid%3DDesktopIntegration&setupid=OutlookEdition">Connect for Outlook</a>, <a href="http://wiki.developerforce.com/index.php/Force.com_Excel_Connector">Excel Connector</a>, etc.</p>

<p>For each client, I create a project in the <a href="http://wiki.developerforce.com/index.php/Force.com_IDE">Eclipse Force.com IDE</a>, entering the username, password, and security token into the appropriate form.  (This does require me to have a System Administrator, or at least "View All Data" and possibly "Edit All Data" profile permissions.)  Then, instead of getting into Salesforce through the browser, I open a file in the project, such as an Apex Class, right-click, and select "Show in Salesforce Web."  The browser does the rest, opening the org, and taking me to that Apex Class.  It does not take me to the Home screen, but I'm willing to use that one extra click.  Plus, it's nice to get directly into the Setup area sometimes.</p>

<p><a href="http://www.x2od.com/wp/uploads/ShowInSalesforceWeb.jpg"><img src="http://www.x2od.com/wp/uploads/ShowInSalesforceWeb.jpg" alt="ShowInSalesforceWeb" title="ShowInSalesforceWeb" width="224" height="238" class="aligncenter size-full wp-image-630" /></a></p>

<p>That's it!  Keep all your projects in Eclipse, and (as long as you're a developer and work in Eclipse a lot) it will save time.</p>

<p>To reiterate the above caution: Anyone who can open Eclipse can get into any of those orgs, so be careful with this!  Always secure your computer.  On Vista, require a password when waking from the screen saver, and use other security features whenever possible.  <br clear="both" />]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/07/10/eclipse-as-a-password-manager.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Checkbox Formula Field in Visualforce</title>
		<link>http://www.x2od.com/2009/05/21/checkbox-formula-field-in-visualforce.html</link>
		<comments>http://www.x2od.com/2009/05/21/checkbox-formula-field-in-visualforce.html#comments</comments>
		<pubDate>Thu, 21 May 2009 17:00:52 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Visualforce]]></category>
		<category><![CDATA[salesforce.com]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=609</guid>
		<description><![CDATA[In keeping with the theme of checkboxes and formulas, we provide an easy way to create a checkbox formula field using Visualforce: the checkbox tag with the disabled attribute:]]></description>
			<content:encoded><![CDATA[<p>In keeping with the theme of <a href="http://www.x2od.com/2009/05/11/standard-checkbox-images.html">checkboxes</a> and formulas, we provide an easy way to create a checkbox formula field using Visualforce: the checkbox tag with the disabled attribute:</p>
<p>First, the Apex controller method:</p>
<pre class="brush: java;">
public boolean checkformula(){
boolean b = [insert formula here];
return b;
}
</pre>
<p>And the visualforce code:</p>
<pre class="brush: xml;">
&lt;apex:inputCheckbox disabled=&quot;true&quot; value=&quot;{!checkformula}&quot;/&gt;
</pre>
<p>That's it!  Of course, there are many ways to set up the Apex method, but the important piece is the Visualforce markup.  By using a tag usually associated with an edit page but making it disabled, the checkbox becomes an output field.</p>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/05/21/checkbox-formula-field-in-visualforce.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pulling Code Out of Triggers</title>
		<link>http://www.x2od.com/2009/05/18/pulling-code-out-of-triggers.html</link>
		<comments>http://www.x2od.com/2009/05/18/pulling-code-out-of-triggers.html#comments</comments>
		<pubDate>Mon, 18 May 2009 17:00:41 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Summer 09]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Eclipse IDE]]></category>
		<category><![CDATA[Force.com Platform]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=583</guid>
		<description><![CDATA[To date, triggers have only been accessible on each object's setup page, leading to a lot of hunting for code within the Salesforce CRM application. Even in Eclipse, switching between the Class and Trigger folders for a given project can be a pain.

These pains can partially be alleviated by keeping all Apex code in one place--as Apex Classes.

Read more: http://www.x2od.com/?p=583&#038;preview=true#ixzz0FncHsqPw&#038;B]]></description>
			<content:encoded><![CDATA[<p>To date, triggers have only been accessible on each object's setup page, leading to a lot of hunting for code within the Salesforce CRM application.  Even in Eclipse, switching between the Class and Trigger folders for a given project can be a pain.</p>
<p>These pains can partially be alleviated by keeping all Apex code in one place--as Apex Classes.  With the addition of a consolidated trigger list in <a href="http://wiki.developerforce.com/index.php/Summer_09">Summer09</a>, some may feel that this post is superfluous, but consolidating code in one place, combined with the trigger list, will lead to a better development, debugging, and org administration experience.</p>

<p>First, here's a sample trigger (written by <a href="http://blog.jeffdouglas.com/2009/04/20/writing-bulk-triggers-for-salesforce">Jeff Douglas</a>):</p>
<pre class="brush: java;">
trigger AddOwnerColor on Account (before insert, before update) {

    // create a set of all the unique ownerIds
    Set&amp;lt;Id&amp;gt; ownerIds = new Set&amp;lt;Id&amp;gt;();
    for (Account a : Trigger.new)
        ownerIds.add(a.OwnerId);    

    // query for all the User records for the unique userIds in the records
    // create a map for a lookup / hash table for the user info
    Map&amp;lt;Id, User&amp;gt; owners = new Map&amp;lt;Id, User&amp;gt;([Select Favorite_Color__c from User Where Id in: ownerIds]);   

    // iterate over the list of records being processed in the trigger and
    // set the color before being inserted or updated
    for (Account a : Trigger.new)
        a.Owner_Favorite_Color__c = owners.get(a.OwnerId).Favorite_Color__c; 
}
</pre>
<p>Let's pull the code from the trigger into an Apex Class and leave a reference to that class & method in the trigger.  We need to pass the list Trigger.new as a parameter to the new class's method:<p>
The trigger:
<pre class="brush: java;">
trigger AddOwnerColor on Account (before insert, before update) {
AccountTriggers.AddOwnerColor(Trigger.new);
}
</pre>
And the class:
<pre class="brush: java;">
public class AccountTriggers {
    public static void AddOwnerColor(Account[] accts) {

    // create a set of all the unique ownerIds
    Set&amp;lt;Id&amp;gt; ownerIds = new Set&amp;lt;Id&amp;gt;();
    for (Account a : accts)
        ownerIds.add(a.OwnerId);    

    // query for all the User records for the unique userIds in the records
    // create a map for a lookup / hash table for the user info
    Map&amp;lt;Id, User&amp;gt; owners = new Map&amp;lt;Id, User&amp;gt;([Select Favorite_Color__c from User Where Id in: ownerIds]);   

    // iterate over the list of records being processed in the trigger and
    // set the color before being inserted or updated
    for (Account a : accts)
        a.Owner_Favorite_Color__c = owners.get(a.OwnerId).Favorite_Color__c; 
    } // close AddOwnerColor
}
</pre>
While this may seem trivial, it has a few advantages:<p>
<ul>
	<li>Easier to work in Eclipse (all code in the Classes section)</li>
	<li>Easier to write test code (can see tests and their associated methods in one place)</li>
	<li>Can promote code reuse by allowing other classes and triggers to call the same method.</li>
	<li>For those who like to include test code in the same class as the regular Class, this allows them to do so.</li>
</ul>
<p>There's a catch (there always is):
<p>You should comment into your Class which trigger is calling the class because otherwise, it is almost impossible to see at a glance where the code flows.  This will especially help when writing and debugging tests.
<p>Just a matter of personal style: It may be a good idea to write an Apex Class for each object's triggers (such as class AccountTriggers above).  Code reuse is still possible, but it can track where triggers were originally used.
<p>Happy coding!]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/05/18/pulling-code-out-of-triggers.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Standard Checkbox Images</title>
		<link>http://www.x2od.com/2009/05/11/standard-checkbox-images.html</link>
		<comments>http://www.x2od.com/2009/05/11/standard-checkbox-images.html#comments</comments>
		<pubDate>Mon, 11 May 2009 16:58:14 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Force.com Builder]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=520</guid>
		<description><![CDATA[One of Salesforce CRM's coolest features from a "bright shiny object" standpoint (i.e. something that aids productivity but also looks flashy) is the image formula field. Jamie Grenney first wrote about this a while ago, and his pdf and sample images from the Salesforce built-in library are available on the community site. Sometimes, however, we [...]]]></description>
			<content:encoded><![CDATA[<!–start_raw–>
One of Salesforce CRM's coolest features from a "bright shiny object" standpoint (i.e. something that aids productivity but also looks flashy) is the image formula field.  Jamie Grenney first wrote about this a while ago, and his <a href="http://www.salesforce.com/community/crm-best-practices/administrators/customization/advanced-customization/image-fields.jsp">pdf and sample images</a> from the Salesforce built-in library are available on the <a href="http://www.salesforce.com/community">community</a> site.<br>
Sometimes, however, we want something simple.  Sometimes we want to create a formula field that displays a simple checkbox (or an empty box).  This is currently not possible, but has been suggested as a Salesforce <a href="http://ideas.salesforce.com/article/show/75535/Formula_fields_should_support_YesNo_output_like_checkbox">Idea</a>.  <p>
Until that is built into the platform, feel free to use these two images in an image formula field (storing them in the documents folder): <p>
<a href="http://www.x2od.com/2009/05/11/standard-checkbox-images.html/true" rel="attachment wp-att-522"><img src="http://www.x2od.com/wp/uploads/true.gif" alt="true" title="true" width="21" height="16" class="alignleft size-full wp-image-522" /></a>&nbsp;<p>
<a href="http://www.x2od.com/2009/05/11/standard-checkbox-images.html/false" rel="attachment wp-att-521"><img src="http://www.x2od.com/wp/uploads/false.gif" alt="false" title="false" width="21" height="16" class="alignleft size-full wp-image-521" /></a>&nbsp;
<p>
Or download <a href='http://www.x2od.com/wp/uploads/checkbox.zip'>this zip file</a> and put it into a static resource for use in a Visualforce page.
<!–end_raw–>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/05/11/standard-checkbox-images.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Dashboards are Improved AND New in Summer 09</title>
		<link>http://www.x2od.com/2009/05/07/dashboards-are-improved-and-new-in-summer-09.html</link>
		<comments>http://www.x2od.com/2009/05/07/dashboards-are-improved-and-new-in-summer-09.html#comments</comments>
		<pubDate>Thu, 07 May 2009 21:54:18 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[Summer 09]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Force.com Builder]]></category>
		<category><![CDATA[Salesforce.com]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=509</guid>
		<description><![CDATA[The Summer09 prerelease orgs are here, so <a href="https://prerelwww.pre.salesforce.com/form/trial/prerelease_summer09.jsp">get yours now</a>!  Upon first look, something cool stood out and merits immediate posting:

Dashboards are improved.  The colors are more vivid, there's detail in the bars and pie chart wedges, and... pie charts can now display the actual and percentage values!]]></description>
			<content:encoded><![CDATA[<p>The Summer09 prerelease orgs are here, so <a href="https://prerelwww.pre.salesforce.com/form/trial/prerelease_summer09.jsp">get yours now</a>!  Upon first look, something cool stood out and merits immediate posting:</p>
<p>Dashboards are improved.  The colors are more vivid, there&#8217;s detail in the bars and pie chart wedges, and&#8230; pie charts can now display the actual <em>and</em> percentage values!</p>
<p>Dashboards are also new.  Visualforce pages can now be included as dashboard components, and there&#8217;s a new &#8220;Color-Blind Palette on Charts&#8221; setting for each user.  Here are before and after shots.</p>
<div id="attachment_507" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/dashboard-regular.jpg"><img src="http://www.x2od.com/wp/uploads/dashboard-regular-300x168.jpg" alt="Dashboard with regular color scheme" title="dashboard-regular" width="300" height="168" class="size-medium wp-image-507" /></a><p class="wp-caption-text">Salesforce dashboard with regular color scheme</p></div>
<div id="attachment_508" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.x2od.com/wp/uploads/dashboard-cb.jpg"><img src="http://www.x2od.com/wp/uploads/dashboard-cb-300x224.jpg" alt="Salesforce dashboard with color-blind/alternate color scheme" title="dashboard-cb" width="300" height="224" class="size-medium wp-image-508"  /></a><p class="wp-caption-text">Dashboard with color-blind/alternate color scheme</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/05/07/dashboards-are-improved-and-new-in-summer-09.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Salesforce Blackberry Wallpaper</title>
		<link>http://www.x2od.com/2009/04/09/salesforce-blackberry-wallpaper.html</link>
		<comments>http://www.x2od.com/2009/04/09/salesforce-blackberry-wallpaper.html#comments</comments>
		<pubDate>Fri, 10 Apr 2009 02:05:31 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Just for fun]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=499</guid>
		<description><![CDATA[In honor of this week’s release of a Salesforce Mobile Development guide on DeveloperForce, we’re posting a Blackberry wallpaper for your enjoyment.]]></description>
			<content:encoded><![CDATA[<p>In honor of this week&#8217;s release of a <a href="http://wiki.developerforce.com/index.php/Force.com_Mobile_AppDev_-_Part_1">Salesforce Mobile Development guide</a> on <a href="http://developer.force.com">DeveloperForce</a>, we&#8217;re posting a Blackberry wallpaper for your enjoyment.  <a href="http://blogs.salesforce.com/mobile/2006/04/salesforce_blac.html">Jamie Grenney first posted it</a> in April 2006, when Salesforce released AppExchange Mobile.</p>
<p><center><br />
<div id="attachment_500" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.x2od.com/wp/uploads/blackberrybackground.jpg"><img src="http://www.x2od.com/wp/uploads/blackberrybackground.jpg" alt="Salesforce Blackberry Wallpaper" title="Salesforce Blackberry Wallpaper" width="320" height="240" class="size-full wp-image-500" border="0"/></a><p class="wp-caption-text">Salesforce Blackberry Wallpaper</p></div></center></p>
<p>Download it <a href="http://www.x2od.com/wp/uploads/blackberrybackground.jpg">here</a> or view this blog (with its cool new mobile layout) on your mobile browser and download the image directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/04/09/salesforce-blackberry-wallpaper.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
