<?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; Configuration</title>
	<atom:link href="http://www.x2od.com/cat/salesforce/configuration/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>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>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>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>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>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>
		<item>
		<title>Hacking a Case Comment Trigger</title>
		<link>http://www.x2od.com/2009/04/01/hacking-a-case-comment-trigger.html</link>
		<comments>http://www.x2od.com/2009/04/01/hacking-a-case-comment-trigger.html#comments</comments>
		<pubDate>Wed, 01 Apr 2009 20:01:23 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Force.com Builder]]></category>
		<category><![CDATA[Force.com Platform]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=477</guid>
		<description><![CDATA[There has been some chatter about asking the salesforce.com team to include the CaseComment object in the "triggerable" list.  After conferring with JP Seabury (ForceMonkey), we designed a Rube Goldberg-esque solution to the problem.  ]]></description>
			<content:encoded><![CDATA[<p>There has been some discussion about asking the salesforce.com team to include the CaseComment object in the &#8220;triggerable&#8221; list.  After conferring with JP Seabury (<a href="http://forcemonkey.blogspot.com">ForceMonkey</a>), we designed a Rube Goldberg-esque solution to the problem.<br />
<span id="more-477"></span><br />
<big><b>Business Use-Case</b></big><br />
Whenever a user adds a comment to a case, add him/her to the Case Team.</p>
<h3>The Plan</h3>
<p>Here it is, in general terms:</p>
<ol>
<li>Workflow on <code>Case Comment</code> sends email to Apex email service</li>
<li>Email service parses <code>CaseId</code> and <code>UserId</code> and adds the User to the Case Team
</ol>
<p><big><b>Case Comment Workflow</b></big><br />
Use existing workflow functionality to send an email whenever a comment is added to a case.</p>
<ul>
<li>Template Includes:</li>
<li>Case Id</li>
<li>User Id</li>
</ul>
<p>The recipient is an Apex email service that we can code using the <a href="http://blog.sforce.com/sforce/2008/06/create-ideas-fr.html">Email to Idea</a> example by Rasmus Mencke.<br />
For more information on setting up the <a href="http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_inbound_using.htm"><code>InboundEmail object</code></a>, check the <a href="http://www.salesforce.com/us/developer/docs/apexcode/index.htm">Apex documentation</a>.<br />
<big><b>Apex Class</b></big><br />
The class needs to add the User to the Case Team, which requires a few fields:</p>
<ul>
<li><code>MemberId</code> &#8211; UserId (received from the email)</li>
<li><code>ParentId</code> &#8211; CaseId (received from the email)</li>
<li><code>TeamRoleId</code> &#8211; Could be hardcoded or found in a SOQL SELECT statement. A better practice would be to pass the name or <code>Id</code> in the email (coding it in the template), allowing the use of one Apex Class with multiple Case workflow email templates.</li>
<li><strong>NOT</strong> <code>TeamTemplateMemberId</code> &#8211; This is not a createable field. It is only available when Case Team members are added automatically in Salesforce CRM.</li>
</ul>
<p>That&#8217;s it!  The unique part of this is that we&#8217;re sending an email FROM Salesforce TO Salesforce.<br />
Thinking outside the box &#8211; isn&#8217;t it more fun?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/04/01/hacking-a-case-comment-trigger.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Flexible Field Labels</title>
		<link>http://www.x2od.com/2009/03/23/flexible-field-labels.html</link>
		<comments>http://www.x2od.com/2009/03/23/flexible-field-labels.html#comments</comments>
		<pubDate>Mon, 23 Mar 2009 21:02:46 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[Visualforce]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Force.com Platform]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=439</guid>
		<description><![CDATA[While making a Visualforce page to display a Zip/Country -> City, State, County application, it became obvious that labeling fields manually will not satisfy all users, especially international ones. There are a few ways to include a field and its label on a Visualforce page. The simplest, using OutputField: VF Page (simple): &#60;apex:page standardcontroller=&#34;Account&#34;&#62; &#60;apex:pageblock&#62; [...]]]></description>
			<content:encoded><![CDATA[While making a Visualforce page to display a Zip/Country -> City, State, County application, it became obvious that labeling fields manually will not satisfy all users, especially international ones.  

There are a few ways to include a field and its label on a Visualforce page.  

<span id="more-439"></span>
<p>The simplest, using OutputField:<br>
<strong>VF Page (simple):</strong>
<pre class="brush: xml;">
&lt;apex:page standardcontroller=&quot;Account&quot;&gt;
&lt;apex:pageblock&gt;
&lt;apex:pageblocksection&gt;
&lt;apex:outputField value=&quot;{!Account.Name}&quot; /&gt;
&lt;/apex:pageblocksection&gt;
&lt;/apex:pageblock&gt;
&lt;/apex:page&gt;
</pre>

<a href="http://www.x2od.com/2009/03/23/flexible-field-labels.html/code1" rel="attachment wp-att-451"><img src="http://www.x2od.com/wp/uploads/code1.png" alt="code1" title="code1" width="386" height="57" class="aligncenter size-full wp-image-451" /></a><p><p>

The most common (based on code shares and other observations) method allows one to use a label other than the one in Salesforce.  It also allows combining of multiple fields while maintaining the standard style:<br>
<strong>VF Page (common, but static):</strong>
<pre class="brush: xml;">
&lt;apex:page standardcontroller=&quot;Account&quot;&gt;
&lt;apex:pageblock&gt;
&lt;apex:pageblocksection columns=&quot;1&quot;&gt;
&lt;apex:pageblocksectionitem&gt;
&lt;apex:outputLabel value=&quot;Account Name&quot; for=&quot;an&quot; /&gt;
&lt;apex:outputText value=&quot;{!Account.Name}&quot; id=&quot;an&quot; /&gt;
&lt;/apex:pageblocksectionitem&gt;
&lt;apex:pageblocksectionitem&gt;
&lt;apex:outputLabel value=&quot;City, State, Zip&quot; for=&quot;csz&quot; /&gt;
&lt;apex:outputText value=&quot;{!Account.BillingCity}, {!Account.BillingState} {!Account.BillingPostalCode}&quot; /&gt;
&lt;/apex:pageblocksectionitem&gt;
&lt;/apex:pageblocksection&gt;
&lt;/apex:pageblock&gt;
&lt;/apex:page&gt;
</pre>

<a href="http://www.x2od.com/2009/03/23/flexible-field-labels.html/code2" rel="attachment wp-att-450"><img src="http://www.x2od.com/wp/uploads/code2.png" alt="code2" title="code2" width="401" height="99" class="aligncenter size-full wp-image-450" /></a><p><p>

And a way to allow field label renaming and translations:<br>
<strong>VF Page (more flexible, allowing for renaming and translations):</strong>
<pre class="brush: xml;">
&lt;apex:page standardcontroller=&quot;Account&quot;&gt;
&lt;apex:pageblock&gt;
&lt;apex:pageblocksection columns=&quot;1&quot;&gt;
&lt;apex:pageblocksectionitem&gt;
&lt;apex:outputLabel value=&quot;{!$ObjectType.account.fields.name.label}&quot;  for=&quot;an&quot; /&gt;
&lt;apex:outputText value=&quot;{!Account.Name}&quot; id=&quot;an&quot; /&gt;
&lt;/apex:pageblocksectionitem&gt;
&lt;apex:pageblocksectionitem&gt;
&lt;apex:outputLabel value=&quot;{!$ObjectType.account.fields.billingcity.label}, {!$ObjectType.account.fields.billingstate.label}, {!$ObjectType.account.fields.billingpostalcode.label}&quot; for=&quot;csz&quot; /&gt;
&lt;apex:outputText value=&quot;{!Account.BillingCity}, {!Account.BillingState} {!Account.BillingPostalCode}&quot; id=&quot;csz&quot;/&gt;
&lt;/apex:pageblocksectionitem&gt;
&lt;/apex:pageblocksection&gt;
&lt;/apex:pageblock&gt;
&lt;/apex:page&gt;
</pre>

<a href="http://www.x2od.com/2009/03/23/flexible-field-labels.html/code3" rel="attachment wp-att-449"><img src="http://www.x2od.com/wp/uploads/code3.png" alt="code3" title="code3" width="413" height="106" class="aligncenter size-full wp-image-449" /></a><p><p><p>
So by using <strong>$ObjectType.account.fields.billingcity.label</strong> (and similar markup for other objects and fields) we can allow org-specific customizations to come into our code with no effort required.
<p>
There's a catch (there always is).  Note that there is no way to combine the three fields for City, State, and Zip (while using automatic renaming to help us with any customizations that the org has made) while maintaining proper labeling.  In this case, the label for the combined field would be "<strong>Billing City, Billing State, Billing Zip/PostalCode</strong>."  In other words, we can use whatever the org prefers for each field, but the developer must choose the label, which must remain static.<p>
The more astute administrators and developers will note that there is a solution available: Use a component and pass the field labels displayed to the component.  Then, using custom labels and translations, the component could be made truly international.  This is, however, beyond the scope of this post.  But it is an idea for a future post...<p>
And the most astute amongst you are probably saying, "A truly flexible labeling system would allow the word "State" for a US address, "Province" for Canadian and others, and would still be completely customizable and translatable.  Yes, that would be nice.  :)]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/03/23/flexible-field-labels.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Ultimate Visualforce Events Tab &#8211; Almost</title>
		<link>http://www.x2od.com/2009/01/05/the-ultimate-visualforce-events-tab-almos.html</link>
		<comments>http://www.x2od.com/2009/01/05/the-ultimate-visualforce-events-tab-almos.html#comments</comments>
		<pubDate>Mon, 05 Jan 2009 16:35:56 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Visualforce]]></category>
		<category><![CDATA[Winter 09]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[Force.com Builder]]></category>
		<category><![CDATA[Force.com Platform]]></category>
		<category><![CDATA[Salesforce.com]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=217</guid>
		<description><![CDATA[Check old blog posts, and you&#8217;ll see that I&#8217;ve been working on custom Events and Task tabs for a while now. A Task Visualforce tab (that mimics the Task box on the Home Page) is almost ready to come out, but the Events Enhanced List tab is (pretty much) here! This bears emphasizing: Enhanced Lists [...]]]></description>
			<content:encoded><![CDATA[Check old blog posts, and you&#8217;ll see that I&#8217;ve been working on custom Events and Task tabs for a while now.  A Task Visualforce tab (that mimics the Task box on the Home Page) is almost ready to come out, but the Events Enhanced List tab is (pretty much) here!<p>
This bears emphasizing: Enhanced Lists were initially not fully released for Activity/Event/Task objects, but are available now.  <p>
The code is ridiculously simple, thanks to the apex:EnhancedList Visualforce tag:
<pre class="brush: xml;">
&lt;apex:page standardController=&quot;Task&quot; &gt;
&lt;apex:enhancedList type=&quot;Activity&quot; height=&quot;800&quot; rowsPerPage=&quot;50&quot; /&gt;
&lt;/apex:page&gt;
</pre>

See?  Nothing to it!   Or so we thought.  There are some catches (there always are):<p>

<ol>
	<li>The original use-case required displaying all upcoming events without the header or sidebar.  We still cannot do this.  Quoting from the Winter &#8217;09 Release Notes: <em>The enhancedList component is not allowed on pages that have the attribute showHeader set to false.</em></li>
	<li>We&#8217;d like to create a custom tab for this page.  We create a Visualforce Tab, pick a custom icon, and show the page&#8230; and when I click on the tab, the enhanced list is displayed, but the tab is not highlighted.  Also, the custom icon I chose is not displayed.  How do we highlight our tab?<br />
After making the page, we make the tab as desribed above.  Then we RETURN to the page and add a tabstyle modifier to the apex:page tag, like so:

<pre class="brush: xml;">
&lt;apex:page standardController=&quot;Task&quot; tabstyle=&quot;enhanced_activities__tab&quot;&gt;
&lt;apex:enhancedList type=&quot;Activity&quot; height=&quot;800&quot; rowsPerPage=&quot;50&quot; /&gt;
&lt;/apex:page&gt;
</pre>
[Of course, change the tab name to whatever you choose.]<p>

Success?  Not quite.  There&#8217;s another catch:

</li>
	<li>The tab is highlighted (brown in our case), but the color and icon for the enhanced list are standard green/home.  <br />

Sadly, I have no workaround for this one. Sorry.</li>
</ol>

To repeat: Enhanced lists were not initially fully available for Events and Tasks, but now do support them.  <p>

Moving forward, consider if you want to create a particular enhanced list view instead of calling the standard enhanced Activity list as I have done here.  If you would prefer to make a custom enhanced list view, then you will need to add more code, but that is beyond the scope of this post.<p>

Enjoy!]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/01/05/the-ultimate-visualforce-events-tab-almos.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Force.com Sites Guest User Profile Permissions</title>
		<link>http://www.x2od.com/2008/12/22/sites-guest-profile.html</link>
		<comments>http://www.x2od.com/2008/12/22/sites-guest-profile.html#comments</comments>
		<pubDate>Mon, 22 Dec 2008 16:54:39 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[Winter 09]]></category>
		<category><![CDATA[Force.com Platform]]></category>
		<category><![CDATA[Sites]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=294</guid>
		<description><![CDATA[I&#8217;m working on an event registration application for the Sites Developer Challenge, and it involves a validation that the registrant&#8217;s email exists in a Contact record. Remembering that Steve Andersen had run into some obstacles with Contact.Email visibility, I decided to check the guest profile for Contact Field Level Security. Here&#8217;s what I found: If [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on an event registration application for the <a href="http://developer.force.com/developerchallenge">Sites Developer Challenge</a>, and it involves a validation that the registrant&#8217;s email exists in a Contact record.  Remembering that <a href="http://community.salesforce.com/sforce/board/message?message.uid=96974#U96974">Steve Andersen had run into some obstacles</a> with Contact.Email visibility, I decided to check the guest profile for Contact Field Level Security.  Here&#8217;s what I found:</p>
<div id="attachment_295" class="wp-caption alignnone" style="width: 521px"><img src="http://www.x2od.com/wp/uploads/sitesguestcontactfls.jpg" alt="Guest profile Contact Field Level Security" title="sitesguestcontactfls" width="50%" height="50%" class="size-full wp-image-295" /><p class="wp-caption-text">Guest profile Contact Field Level Security</p></div>
<p>If you squint a bit, you can see that the Opt-Out and Email fields are hidden to the guest user.  I have no idea why these, in particular, are hidden.  Likewise, I couldn&#8217;t find a pattern in which fields were shown on the custom objects I had created, nor which were visible on standard objects.</p>
<p>In any event, I don&#8217;t have any pearls of wisdom on this topic; this is more of an informative note to all that are using Sites (especially if you plan to do any communication-subscriptions) to check out the Field-Level Security.</p>
<p>For those wondering how to get to this Profile (since it is not visible in the usual Profile section), go to the Sites page > Site Name or URL > Public Access Settings (a button).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/12/22/sites-guest-profile.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inline Visualforce Page Layouts!</title>
		<link>http://www.x2od.com/2008/11/29/inline-visualforce-page-layouts.html</link>
		<comments>http://www.x2od.com/2008/11/29/inline-visualforce-page-layouts.html#comments</comments>
		<pubDate>Sat, 29 Nov 2008 23:42:20 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Force.com Builder]]></category>
		<category><![CDATA[New Developments]]></category>
		<category><![CDATA[Visualforce]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=269</guid>
		<description><![CDATA[We're all used to using inline S-Controls, dragging and dropping them into page layouts.  And the entire Salesforce community has been spending tons of time recreating page layouts in Visualforce, just to edit one small piece of a page.

As an example, how would you implement the example at developer.force.com: <a href="http://wiki.apexdevnet.com/index.php/Visualforce_DynamicEditPage">Visualforce Dynamic Edit Page</a>?  You would do it the way it was explained in the blog post!

Well the rules of the game have changed.]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://blog.sforce.com/sforce/2008/11/adding-a-visualforce-page-to-a-page-layout.html">This is huge news!</a></strong></p>
<p>We&#8217;re all used to using inline S-Controls, dragging and dropping them into page layouts.  And the entire Salesforce community has been spending tons of time recreating page layouts in Visualforce, just to edit one small piece of a page.</p>
<p>As an example, how would you implement the example at developer.force.com: <a href="http://wiki.apexdevnet.com/index.php/Visualforce_DynamicEditPage">Visualforce Dynamic Edit Page</a>?  You would do it the way it was explained in the blog post!</p>
<p>Well the rules of the game have changed.</p>
<p>As long as you use a Standard Controller, <a href="http://blog.sforce.com/sforce/2008/11/adding-a-visualforce-page-to-a-page-layout.html"><strong>you can now place Visualforce pages IN regular page layouts</strong></a>!</p>
<div class="wp-caption alignnone" style="width: 510px"><img width=497 height=309 alt="Inline Visualforce Page Layout screenshot" src="http://blog.sforce.com/.a/6a00d8341cded353ef0105361c5757970b-pi" title="Inline Visualforce Page Layout" width="829" height="515" /><p class="wp-caption-text">Inline Visualforce Page Layout screenshot</p></div>
<p>The article was written by Sati Hillyear, who is also an expert on the License Manager Application.  Check it out!</p>
<p>[<em>Addendum 5-9-2009:</em> For another example of this, see <a href="http://blog.jeffdouglas.com/2009/05/08/inline-visualforce-pages-with-standard-page-layouts/">Jeff Douglas' blog post</a>.]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/11/29/inline-visualforce-page-layouts.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Project: Change Owner Button in Visualforce</title>
		<link>http://www.x2od.com/2008/11/13/project-change-owner-button-in-visualforce.html</link>
		<comments>http://www.x2od.com/2008/11/13/project-change-owner-button-in-visualforce.html#comments</comments>
		<pubDate>Thu, 13 Nov 2008 06:13:15 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Visualforce]]></category>
		<category><![CDATA[X-Squared On Demand]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=244</guid>
		<description><![CDATA[Drawing upon some code I found in the Developers Guide, I have written a Visualforce page to mass-change the owner of all selected records to any active User in Salesforce.  Yes, it only works with Contacts for now, but my next step will be to use Dynamic Apex to pass the sObject name to the page and its extension/controller, allowing me to reuse one bit of code for multiple objects.  We'll see how it goes.  But in the meantime, enjoy this page that lets you perform a search, check which records you want to transfer, and then input a User.  I've tested it with 50 records at once, so that should suffice for most uses.]]></description>
			<content:encoded><![CDATA[<p>Salesforce Labs has put out a series of Mass Action packages on the AppExchange.  There is <a href="https://www.salesforce.com/appexchange/detail_overview.jsp?NavCode__c=&#038;id=a0330000000iAkcAAE">Mass Transfer Opportunity Owner</a> (uses AJAX), <a href="http://www.salesforce.com/appexchange/detail_overview.jsp?NavCode__c=&#038;id=a0330000000iIEtAAM">Mass Update Contact Addresses</a> (AJAX), <a href="http://www.salesforce.com/appexchange/detail_overview.jsp?NavCode__c=&#038;id=a0330000000iAkcAAE">Mass Update Opportunity Owner</a>, <a href="https://www.salesforce.com/appexchange/detail_overview.jsp?NavCode__c=&#038;id=a0330000000iIAxAAM">Mass Update Opportunity Close Dates</a>, etc.  All of these are &#8220;thick client&#8221; tools, meaning that data must be loaded onto your computer, altered, and then uploaded back to Salesforce.  </p>
<p><a href="http://community.salesforce.com/sforce/tracker?user.id=198">Ron Hess</a> released a super bit of code, found in the Visualforce documentation and elsewhere, to <a href="http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_sosc_custom_button.htm">Mass Update Opportunity Stage and Close Date</a>.  It could, theoretically, be expanded to other fields as well.  This got me thinking about doing so with other objects.  </p>
<p>A while ago, I took the code for the <a href="http://www.salesforce.com/appexchange/detail_overview.jsp?NavCode__c=&#038;id=a03300000033CsnAAE">Mass Delete</a> button and altered it to change the owner of the selected records to the User clicking the button.  It was like an Accept button, but I could use it for any object.  Actually, it wasn&#8217;t as easy as that.  I had to make one button for each object, and maintenance was a pain&#8211;whenever I created a new object, I needed to clone my code.</p>
<p>Drawing upon some code I found in the <a href="http://wiki.apexdevnet.com/index.php/force_library">Developers Guide</a>, I have written a Visualforce page to mass-change the owner of all selected records to any active User in Salesforce.  Yes, it only works with Contacts for now, but my next step will be to use Dynamic Apex to pass the sObject name to the page and its extension/controller, allowing me to reuse one bit of code for multiple objects.  We&#8217;ll see how it goes.  But in the meantime, enjoy this page that lets you perform a search, check which records you want to transfer, and then input a User.  I&#8217;ve tested it with 50 records at once, so that should suffice for most uses.</p>
<p><strong>VF Page:</strong><br />
<pre class="brush: xml;">&lt;br /&gt;
&lt;apex:page standardController=&quot;Contact&quot; recordSetVar=&quot;Contacts&quot; id=&quot;updateOwnerPage&quot;&gt;&lt;br /&gt;
&lt;apex:form&gt;&lt;br /&gt;
&lt;apex:sectionHeader title=&quot;Change Owner for Contacts&quot;/&gt;&lt;br /&gt;
&lt;apex:pageBlock mode=&quot;edit&quot;&gt;&lt;br /&gt;
&lt;apex:pageMessages /&gt;&lt;br /&gt;
&lt;apex:pageblockSection title=&quot;Change&quot; columns=&quot;1&quot;&gt;&lt;br /&gt;
&lt;apex:pageblockSectionItem &gt;&lt;br /&gt;
&lt;apex:outputLabel for=&quot;owner&quot;&gt;New Owner&lt;/apex:outputLabel&gt;&lt;br /&gt;
&lt;apex:inputField id=&quot;owner&quot; value=&quot;{!Contact.OwnerId}&quot;/&gt;&lt;br /&gt;
&lt;/apex:pageblockSectionItem&gt;&lt;br /&gt;
&lt;/apex:pageBlockSection&gt;&lt;br /&gt;
&lt;apex:pageBlockSection title=&quot;Selected Contacts&quot; columns=&quot;1&quot;&gt;&lt;br /&gt;
&lt;apex:pageBlockTable value=&quot;{!selected}&quot; var=&quot;j&quot; bgcolor=&quot;#F3F3EC&quot; width=&quot;100%&quot;&lt;br /&gt;
styleClass=&amp;#8221;list&amp;#8221; rowClasses=&amp;#8221;dataRow&amp;#8221; onRowMouseOver=&amp;#8221;hiOn(this);&amp;#8221; onRowMouseOut=&amp;#8221;hiOff(this);&amp;#8221;&gt;&lt;br /&gt;
&lt;apex:column &gt;&lt;br /&gt;
&lt;apex:facet name=&quot;header&quot;&gt;Contact Name&lt;/apex:facet&gt;&lt;br /&gt;
&lt;apex:outputLink value=&quot;{!URLFOR($Action.Contact.View, j.id)}&quot;&gt;&lt;br /&gt;
{!j.FirstName} {!j.LastName}&lt;/apex:outputLink&gt;&lt;br /&gt;
&lt;/apex:column&gt;&lt;br /&gt;
&lt;apex:column &gt;&lt;br /&gt;
&lt;apex:facet name=&quot;header&quot;&gt;Account Name&lt;/apex:facet&gt;&lt;br /&gt;
&lt;apex:outputLink value=&quot;{!URLFOR($Action.Account.View, j.Account.id)}&quot;&gt;&lt;br /&gt;
{!j.Account.Name}&lt;/apex:outputLink&gt;&lt;br /&gt;
&lt;/apex:column&gt;&lt;br /&gt;
&lt;apex:column&gt;&lt;br /&gt;
&lt;apex:facet name=&quot;header&quot;&gt;Current Owner&lt;/apex:facet&gt;&lt;br /&gt;
{!j.Owner.Name}&lt;br /&gt;
&lt;/apex:column&gt;&lt;br /&gt;
&lt;/apex:pageBlockTable&gt;&lt;br /&gt;
&lt;/apex:pageblockSection&gt;&lt;br /&gt;
&lt;apex:pageBlockButtons location=&quot;bottom&quot;&gt;&lt;br /&gt;
&lt;apex:commandButton value=&quot;Save&quot; action=&quot;{!save}&quot;/&gt;&lt;br /&gt;
&lt;apex:commandButton value=&quot;Cancel&quot; action=&quot;{!cancel}&quot;/&gt;&lt;br /&gt;
&lt;/apex:pageBlockButtons&gt;&lt;br /&gt;
&lt;/apex:pageBlock&gt;&lt;br /&gt;
&lt;/apex:form&gt;&lt;br /&gt;
&lt;/apex:page&gt;&lt;br /&gt;
</pre></p>
<p><strong>Button:</strong><br />
Go to Setup -> Contact -> Buttons and Links<br />
Create a new button, set it to execute in the current window with sidebar and header, and set it to call a Visualforce page.  Select the page you just created.  Then add the button to Contact Search Layout and to any Contact related lists you like.</p>
<p>Voila!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/11/13/project-change-owner-button-in-visualforce.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Salesforce Order of Execution</title>
		<link>http://www.x2od.com/2008/11/09/salesforce-order-of-execution.html</link>
		<comments>http://www.x2od.com/2008/11/09/salesforce-order-of-execution.html#comments</comments>
		<pubDate>Sun, 09 Nov 2008 09:25:43 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[Force.com Builder]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=230</guid>
		<description><![CDATA[I came across this page in the Apex documentation and wanted to share it with everyone.  So many people have asked about this in the past, so it seems a good idea to publicize it:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_order_of_execution.htm]]></description>
			<content:encoded><![CDATA[<p>I came across this page in the Apex documentation and wanted to share it with everyone.  So many people have asked about this in the past, so it seems a good idea to publicize it:</p>
<p><a href="http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_order_of_execution.htm">http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_order_of_execution.htm</a></p>
<p><strong>Triggers and Order of Execution</strong></p>
<p>When a record is saved with an insert, update, or upsert statement, the following events occur in order:</p>
<p>   1. The original record is loaded from the database (or initialized for an insert statement)<br />
   2. The new record field values are loaded from the request and overwrite the old values<br />
   3. All before triggers execute<br />
   4. System validation occurs, such as verifying that all required fields have a non-null value, and running any user-defined validation rules<br />
   5. The record is saved to the database, but not yet committed<br />
   6. All after triggers execute<br />
   7. Assignment rules execute<br />
   8. Auto-response rules execute<br />
   9. Workflow rules execute<br />
  10. If there are workflow field updates, the record is updated again<br />
  11. If the record was updated with workflow field updates, before and after triggers fire one more time (and only one more time)<br />
  12. Escalation rules execute<br />
  13. All DML operations are committed to the database<br />
  14. Post-commit logic executes, such as sending email</p>
<p><strong>Additional Considerations</strong></p>
<p>Please note the following when working with triggers:</p>
<p>    * When Enable Validation and Triggers from Lead Convert is selected, if the lead conversion creates an opportunity and the opportunity has Apex before triggers associated with it, the triggers run immediately after the opportunity is created, before the opportunity contact role is created. For more information, see &#8220;Customizing Lead Settings&#8221; in the Salesforce online help.<br />
    * If you are using before triggers to set Stage and Forecast Category for an opportunity record, the behavior is as follows:<br />
          o If you set Stage and Forecast Category, the opportunity record contains those exact values.<br />
          o If you set Stage but not Forecast Category, the Forecast Category value on the opportunity record defaults to the one associated with trigger Stage.<br />
          o If you reset Stage to a value specified in an API call or incoming from the user interface, the Forecast Category value should also come from the API call or user interface. If no value for Forecast Category is specified and the incoming Stage is different than the trigger Stage, the Forecast Category defaults to the one associated with trigger Stage. If the trigger Stage and incoming Stage are the same, the Forecast Category is not defaulted.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/11/09/salesforce-order-of-execution.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Salesforce CRM &#8220;Locale&#8221; Field</title>
		<link>http://www.x2od.com/2008/10/23/salesforce-crm-locale-field.html</link>
		<comments>http://www.x2od.com/2008/10/23/salesforce-crm-locale-field.html#comments</comments>
		<pubDate>Thu, 23 Oct 2008 17:50:36 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[Force.com Builder]]></category>
		<category><![CDATA[Salesforce.com]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=222</guid>
		<description><![CDATA[I wanted to change the first day of my week to Monday, and to see my weekends on the right-side of the 7-day view.  I've started doing this on my Google and Outlook calendars, so why not be consistent? ]]></description>
			<content:encoded><![CDATA[<p>Most of the people reading this are probably in the United States, so on our User record, we have Locale set to &#8220;English (US).&#8221;  This has a few effects on how we see Salesforce data, including the Calendar.</p>
<p>I wanted to change the first day of my week to Monday, and to see my weekends on the right-side of the 7-day view.  I&#8217;ve started doing this on my Google and Outlook calendars, so why not be consistent?  To do this, I changed my Locale to &#8220;English (United Kingdom).&#8221;  </p>
<p>There&#8217;s a catch (there always is!): My dates are now reversed.  D&#8217;Oh!</p>
<p>Time will tell if I have any other major changes to the org.  I don&#8217;t mind British spellings (colour vs. color) &#8212; though I&#8217;ve found the word &#8220;color&#8221; three times since I switched.  The org currency will remain US Dollars, as that is set elsewhere, in the Company Profile.</p>
<p>So what will I do, on the whole?  I need to decide if the date format is more or less important than the week format.  I&#8217;ll try out this UK thing&#8230; and will decide later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/10/23/salesforce-crm-locale-field.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert between Business and Person Accounts (B2B  B2C)</title>
		<link>http://www.x2od.com/2008/08/19/convert-between-business-and-person-accounts-b2b-b2c.html</link>
		<comments>http://www.x2od.com/2008/08/19/convert-between-business-and-person-accounts-b2b-b2c.html#comments</comments>
		<pubDate>Tue, 19 Aug 2008 20:26:10 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></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=169</guid>
		<description><![CDATA[I'm a huge fan of Person Accounts (Salesforce's phenomenal combination of Account and Contact that allows selling B2C--the best example I use is Land's End, which sells to people).  Orgs can use a hybrid model, allowing a company to track its, e.g. partner companies (B2B) and individual customers (B2C).
There is an interesting limitation to Person Accounts: They cannot be converted to B2B via the Salesforce front-end.  The record type can only be changed via the API, using a tool like Data Loader or the Excel Connector.
I set out to create a tool that would use the API to convert the record type of a B2B to B2C and back.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a huge fan of Person Accounts (Salesforce&#8217;s phenomenal combination of Account and Contact that allows selling B2C&#8211;the best example I use is Land&#8217;s End, which sells to people).  Orgs can use a hybrid model, allowing a company to track its, e.g. partner companies (B2B) and individual customers (B2C).</p>
<p>There is an interesting limitation to Person Accounts: They cannot be converted to B2B via the Salesforce front-end.  The record type can only be changed via the API, using a tool like Data Loader or the Excel Connector.  Additionally, a B2B can only be converted to a B2C if it has:</p>
<ul>
<li>One Contact</li>
<li>No Parent Account</li>
<li>Nothing in Reports To on the Contact record</li>
</ul>
<p>I set out to create a tool that would use the API to convert the record type of a B2B to B2C and back.</p>
<p>And there was a hitch.  (There always is.)  I wrote javascript buttons to be included on B2B or B2C page layouts, and it worked perfectly in my org.  However, I could not upload it to the AppExchange because one cannot create a package that references B2C:</p>
<blockquote><p>
Note: You cannot upload packages that contain any of the following:<br />
• References to person accounts, such as an s-control or custom field referencing person accounts.<br />
• Workflow rules or workflow actions (such as field updates or outbound messages) that reference record types.
</p></blockquote>
<p>(Side note: Why not just require an org to have Person Accounts enabled, and then allow references to B2C?)</p>
<p>Anyway, I can&#8217;t upload the package, but I can show the code here.</p>
<ol>
<li>Create a custom button or link on the Account object.  Set it to execute javascript.</li>
<li>Paste the following code into the body and copy the appropriate RecordTypeId where indicated.</li>
<li>Place the button or link on page layouts, and go for it!  Remember to put the button to convert to B2C only on B2B page layouts, and vice versa.  </li>
</ol>
<blockquote><p><code>{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")}<br />
var AccountObj = new sforce.SObject("Account");<br />
AccountObj.Id = '{!Account.Id}';<br />
AccountObj.RecordTypeId = '0120000000000000'; // Paste B2B/C RecordTypeID<br />
sforce.connection.update([AccountObj]);<br />
location.reload(true);</code></p></blockquote>
<p><center><br />
<div id="attachment_178" class="wp-caption aligncenter" style="width: 510px"><img src="http://www.x2od.com/wp/uploads/custom-button.jpg" alt="Screenshot of code in org." title="custom-button" width="500" height="154" class="size-full wp-image-178" /><p class="wp-caption-text">Screenshot of code in org.</p></div><br />
</center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/08/19/convert-between-business-and-person-accounts-b2b-b2c.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google Docs Now Has Templates for Google Apps</title>
		<link>http://www.x2od.com/2008/08/04/google-docs-now-has-templates-for-google-apps.html</link>
		<comments>http://www.x2od.com/2008/08/04/google-docs-now-has-templates-for-google-apps.html#comments</comments>
		<pubDate>Mon, 04 Aug 2008 22:07:00 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[SFDC for Google Apps]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Eclipse IDE]]></category>
		<category><![CDATA[Force.com Builder]]></category>
		<category><![CDATA[Force.com Platform]]></category>
		<category><![CDATA[Salesforce for Google Apps]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=114</guid>
		<description><![CDATA[Google Docs has templates, and those of us using Google Apps with our Salesforce org (which should be almost everyone, since it’s free and easy to use) can design company-wide templates. This, combined with Google Docs’ super collaborative features, should make things much easier for consultants.]]></description>
			<content:encoded><![CDATA[<p>I use templates for most of my documentation&#8211;it&#8217;s just easier to write a ROF or a configuration plan when all the standard information is already there.  Up to this point, short of using <a href="http://www.salesforce.com/products/content-management/">Salesforce Content</a> or <a href="http://www.dreamfactory.com/solutions/dreamteam">DreamTeam</a>, I haven&#8217;t seen many options for version control through Salesforce.  Until now.</p>
<p><a href="http://docs.google.com">Google Docs</a> has <a href="http://www.google.com/google-d-s/whatsnew.html">templates</a>, and those of us using <a href="http://www.google.com/a/help/intl/en/index.html">Google Apps</a> with our Salesforce org (which should be almost everyone, since it&#8217;s free and easy to use) can <a href="http://documents.google.com/support/bin/answer.py?answer=99065&#038;hl=en">design company-wide templates</a>.  This, combined with Google Docs&#8217; super collaborative features, should make things much easier for consultants.</p>
<p>Here&#8217;s my wishlist for this feature: Use the <a href="http://wiki.apexdevnet.com/index.php/Google_Data_API_Toolkit">Google-Salesforce Toolkit</a> to create a spreadsheet with each worksheet representing an object and each row a field.  (It would probably use a Describe function, etc.)  Include columns for things like label, name, length, type, picklist values, etc.  I don&#8217;t know how to code it myself, but it would be awesome to use.  If we had one for a fresh, pristine org as a template, then we could use that for requirements-gathering with clients, creating the template in Google Docs and then doing the configuration based upon that spreadsheet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/08/04/google-docs-now-has-templates-for-google-apps.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Activities Tab in Salesforce</title>
		<link>http://www.x2od.com/2008/08/03/activities-tab-in-salesforce.html</link>
		<comments>http://www.x2od.com/2008/08/03/activities-tab-in-salesforce.html#comments</comments>
		<pubDate>Mon, 04 Aug 2008 03:03:58 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[Force.com Builder]]></category>
		<category><![CDATA[Salesforce.com]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=105</guid>
		<description><![CDATA[To display a tab of Activities, just like you can with Accounts, Opportunities, etc., use the following URLs in the Web Tab configuration screen: /home/actlist.jsp?isdtp=mn Displays a full-page list of Activities (Tasks and Events) The list is non-enhanced, even when viewed in an &#8220;enhanced lists&#8221; org. /home/actlist.jsp Displays Activities with the Sidebar and Tabs these [...]]]></description>
			<content:encoded><![CDATA[<p>To display a tab of Activities, just like you can with Accounts, Opportunities, etc., use the following URLs in the Web Tab configuration screen:</p>
<p><strong>/home/actlist.jsp?isdtp=mn</strong></p>
<ul>
<li>Displays a full-page list of Activities (Tasks and Events)</li>
<li>The list is non-enhanced, even when viewed in an &#8220;enhanced lists&#8221; org.</li>
</ul>
<p><strong>/home/actlist.jsp</strong></p>
<ul>
<li>Displays Activities with the Sidebar and Tabs</li>
</ul>
<p>these are especially useful if you have Enhanced Lists enabled &#8211; it looks amazing.  Create additional views for Tasks or Events, and then save the URL for each as its own Web Tab as desired.<br />
(For example, in my org, My Open Tasks is https://na1.salesforce.com/007?fcf=00B30000005UoEi &#8211; I made a Web Tab and in the URL put &#8220;/007?fcf=00B30000005UoEi.&#8221;  Worked perfectly.</p>
<p>Enjoy!</p>
<p><strong>Addendum:</strong> To prevent multiple rows of tabs at the top of the page, you can launch the tab from a link.  The best way to do this is to put a custom link in your sidebar and to view the tab that way.  </p>
<p><strong>Addendum 2:</strong>  Kudos to Andres G for noting that the ?idtsp=mn version looks like the Salesforce Console&#8211;it absolutely does!  There was a discussion on the developer boards.</p>
<p>Also, <a href="http://www.arrowpointe.com">Scott Hemmeter</a> <a href="http://sfdc.arrowpointe.com/2006/05/12/open-custom-links-in-the-same-window-without-creating-nested-frames/">blogged </a>about this a while back and included some javascript to get around the double-tabs problem.</p>
<p>My next <a href="http://wiki.apexdevnet.com/index.php/Visualforce">Visualforce </a>coding project will be to create this using VF, likely based on <a href="http://wiki.apexdevnet.com/index.php/Account_recordType">Ron Hess&#8217; code example</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/08/03/activities-tab-in-salesforce.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress, Akismet, and Web-to-Salesforce</title>
		<link>http://www.x2od.com/2008/07/02/wordpress-akismet-and-web-to-salesforce.html</link>
		<comments>http://www.x2od.com/2008/07/02/wordpress-akismet-and-web-to-salesforce.html#comments</comments>
		<pubDate>Thu, 03 Jul 2008 03:47:50 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Native Application]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Akismet]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Web-to]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=33</guid>
		<description><![CDATA[Scott Hemmeter posted a blog entry about using Akismet and PHP to check Web-to-Lead submissions for spam.  We are going to start an experiment using Akismet in the following scenarios:
-Web-to-Lead with Google AdWords enabled
-Web-to-Case]]></description>
			<content:encoded><![CDATA[<p>We use WordPress to run our blog, which we host on a shared server, and we use Akismet to check comments for spam (though the only comments I&#8217;ve seen on this blog have been my test comments).</p>
<p><a href="http://www.arrowpointe.com">Scott Hemmeter</a> posted a blog entry about using Akismet and PHP to check Web-to-Lead submissions for spam.  We are going to start an experiment using Akismet in the following scenarios:</p>
<ul>
<li>Web-to-Lead with Google AdWords enabled</li>
<li>Web-to-Case</li>
</ul>
<p>Sound good?  We&#8217;ll keep everyone up to speed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/07/02/wordpress-akismet-and-web-to-salesforce.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
