<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>X-Squared On Demand LLC Blog</title>
	
	<link>http://www.x2od.com</link>
	<description>Salesforce Configuration, Administration, and Development</description>
	<lastBuildDate>Thu, 16 Jul 2009 14:50:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license><image><link>http://www.x2od.com</link><url>http://www.x2od.com/favicon.ico</url></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/x2od_wp" type="application/rss+xml" /><feedburner:emailServiceId>x2od_wp</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Email Inbox Version 2</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/FyrWcNMxFjI/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; action=&#34;{!ViewData}&#34;&#62;
 [...]]]></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!  
<p><a href="http://feedads.g.doubleclick.net/~a/wLTHe5c25B31YdhYeES529jNdeM/0/da"><img src="http://feedads.g.doubleclick.net/~a/wLTHe5c25B31YdhYeES529jNdeM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/wLTHe5c25B31YdhYeES529jNdeM/1/da"><img src="http://feedads.g.doubleclick.net/~a/wLTHe5c25B31YdhYeES529jNdeM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=FyrWcNMxFjI:Sngub02Ut6s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=FyrWcNMxFjI:Sngub02Ut6s:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=FyrWcNMxFjI:Sngub02Ut6s:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=FyrWcNMxFjI:Sngub02Ut6s:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=FyrWcNMxFjI:Sngub02Ut6s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/FyrWcNMxFjI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/07/15/email-inbox-version-2.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2009/07/15/email-inbox-version-2.html</feedburner:origLink></item>
		<item>
		<title>Visualforce Email Inbox</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/wcYETXiOtxU/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>

		<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>
<p><a href="http://feedads.g.doubleclick.net/~a/veJSPMyY91jsj4I-TU_f9dmfriY/0/da"><img src="http://feedads.g.doubleclick.net/~a/veJSPMyY91jsj4I-TU_f9dmfriY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/veJSPMyY91jsj4I-TU_f9dmfriY/1/da"><img src="http://feedads.g.doubleclick.net/~a/veJSPMyY91jsj4I-TU_f9dmfriY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=wcYETXiOtxU:KD54SzauxRI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=wcYETXiOtxU:KD54SzauxRI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=wcYETXiOtxU:KD54SzauxRI:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=wcYETXiOtxU:KD54SzauxRI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=wcYETXiOtxU:KD54SzauxRI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/wcYETXiOtxU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/07/14/visualforce-email-inbox.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2009/07/14/visualforce-email-inbox.html</feedburner:origLink></item>
		<item>
		<title>Eclipse as a Password Manager</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/6nVJQe7_8Bc/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>

		<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" />
<p><a href="http://feedads.g.doubleclick.net/~a/ITLGnZdhAIA1aB2DLjkxSVJaUIY/0/da"><img src="http://feedads.g.doubleclick.net/~a/ITLGnZdhAIA1aB2DLjkxSVJaUIY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ITLGnZdhAIA1aB2DLjkxSVJaUIY/1/da"><img src="http://feedads.g.doubleclick.net/~a/ITLGnZdhAIA1aB2DLjkxSVJaUIY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=6nVJQe7_8Bc:C6Po4iqp28c:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=6nVJQe7_8Bc:C6Po4iqp28c:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=6nVJQe7_8Bc:C6Po4iqp28c:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=6nVJQe7_8Bc:C6Po4iqp28c:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=6nVJQe7_8Bc:C6Po4iqp28c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/6nVJQe7_8Bc" height="1" width="1"/>]]></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>
		<feedburner:origLink>http://www.x2od.com/2009/07/10/eclipse-as-a-password-manager.html</feedburner:origLink></item>
		<item>
		<title>Checkbox Formula Field in Visualforce</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/3GNueDttwqA/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>
<p><a href="http://feedads.g.doubleclick.net/~a/pcCSUgRKAb-ceSXED7Li2Ibu8Ww/0/da"><img src="http://feedads.g.doubleclick.net/~a/pcCSUgRKAb-ceSXED7Li2Ibu8Ww/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/pcCSUgRKAb-ceSXED7Li2Ibu8Ww/1/da"><img src="http://feedads.g.doubleclick.net/~a/pcCSUgRKAb-ceSXED7Li2Ibu8Ww/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=3GNueDttwqA:ErfYHTM2nUE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=3GNueDttwqA:ErfYHTM2nUE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=3GNueDttwqA:ErfYHTM2nUE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=3GNueDttwqA:ErfYHTM2nUE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=3GNueDttwqA:ErfYHTM2nUE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/3GNueDttwqA" height="1" width="1"/>]]></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>
		<feedburner:origLink>http://www.x2od.com/2009/05/21/checkbox-formula-field-in-visualforce.html</feedburner:origLink></item>
		<item>
		<title>Pulling Code Out of Triggers</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/uGnNacR5Dbk/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&lt;Id&gt; ownerIds = new Set&lt;Id&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&lt;Id, User&gt; owners = new Map&lt;Id, User&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&lt;Id&gt; ownerIds = new Set&lt;Id&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&lt;Id, User&gt; owners = new Map&lt;Id, User&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!
<p><a href="http://feedads.g.doubleclick.net/~a/t4y_CkuVj1jvgPpL4NtGjwOoD-c/0/da"><img src="http://feedads.g.doubleclick.net/~a/t4y_CkuVj1jvgPpL4NtGjwOoD-c/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/t4y_CkuVj1jvgPpL4NtGjwOoD-c/1/da"><img src="http://feedads.g.doubleclick.net/~a/t4y_CkuVj1jvgPpL4NtGjwOoD-c/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=uGnNacR5Dbk:2iTQxVBObiw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=uGnNacR5Dbk:2iTQxVBObiw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=uGnNacR5Dbk:2iTQxVBObiw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=uGnNacR5Dbk:2iTQxVBObiw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=uGnNacR5Dbk:2iTQxVBObiw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/uGnNacR5Dbk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/05/18/pulling-code-out-of-triggers.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2009/05/18/pulling-code-out-of-triggers.html</feedburner:origLink></item>
		<item>
		<title>Standard Checkbox Images</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/nTS0AFqpIT4/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–>
<p><a href="http://feedads.g.doubleclick.net/~a/JkmBY8pWXLWgK9br2eAsMckjecY/0/da"><img src="http://feedads.g.doubleclick.net/~a/JkmBY8pWXLWgK9br2eAsMckjecY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/JkmBY8pWXLWgK9br2eAsMckjecY/1/da"><img src="http://feedads.g.doubleclick.net/~a/JkmBY8pWXLWgK9br2eAsMckjecY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=nTS0AFqpIT4:obO04xQ6cQA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=nTS0AFqpIT4:obO04xQ6cQA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=nTS0AFqpIT4:obO04xQ6cQA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=nTS0AFqpIT4:obO04xQ6cQA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=nTS0AFqpIT4:obO04xQ6cQA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/nTS0AFqpIT4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/05/11/standard-checkbox-images.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2009/05/11/standard-checkbox-images.html</feedburner:origLink></item>
		<item>
		<title>Dashboards are Improved AND New in Summer 09</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/NwVfTHN6XLk/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>

<p><a href="http://feedads.g.doubleclick.net/~a/q2pIFY1RFmbsVm79a5EgtI-nYls/0/da"><img src="http://feedads.g.doubleclick.net/~a/q2pIFY1RFmbsVm79a5EgtI-nYls/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/q2pIFY1RFmbsVm79a5EgtI-nYls/1/da"><img src="http://feedads.g.doubleclick.net/~a/q2pIFY1RFmbsVm79a5EgtI-nYls/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=NwVfTHN6XLk:TDgn9Lzu3Gc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=NwVfTHN6XLk:TDgn9Lzu3Gc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=NwVfTHN6XLk:TDgn9Lzu3Gc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=NwVfTHN6XLk:TDgn9Lzu3Gc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=NwVfTHN6XLk:TDgn9Lzu3Gc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/NwVfTHN6XLk" height="1" width="1"/>]]></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>
		<feedburner:origLink>http://www.x2od.com/2009/05/07/dashboards-are-improved-and-new-in-summer-09.html</feedburner:origLink></item>
		<item>
		<title>Salesforce Blackberry Wallpaper</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/68g6DL3r-fU/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>

<p><a href="http://feedads.g.doubleclick.net/~a/ZSnerioZF6KVkrE-ppAxl-GDBdc/0/da"><img src="http://feedads.g.doubleclick.net/~a/ZSnerioZF6KVkrE-ppAxl-GDBdc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ZSnerioZF6KVkrE-ppAxl-GDBdc/1/da"><img src="http://feedads.g.doubleclick.net/~a/ZSnerioZF6KVkrE-ppAxl-GDBdc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=68g6DL3r-fU:Q0JWOCBAvI4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=68g6DL3r-fU:Q0JWOCBAvI4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=68g6DL3r-fU:Q0JWOCBAvI4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=68g6DL3r-fU:Q0JWOCBAvI4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=68g6DL3r-fU:Q0JWOCBAvI4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/68g6DL3r-fU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/04/09/salesforce-blackberry-wallpaper.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2009/04/09/salesforce-blackberry-wallpaper.html</feedburner:origLink></item>
		<item>
		<title>Hacking a Case Comment Trigger</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/UTzXneUh00o/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>

<p><a href="http://feedads.g.doubleclick.net/~a/YxsQVWQ7LEgl48MmGVeuXepJcYY/0/da"><img src="http://feedads.g.doubleclick.net/~a/YxsQVWQ7LEgl48MmGVeuXepJcYY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/YxsQVWQ7LEgl48MmGVeuXepJcYY/1/da"><img src="http://feedads.g.doubleclick.net/~a/YxsQVWQ7LEgl48MmGVeuXepJcYY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=UTzXneUh00o:wrIhb6ZKMNA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=UTzXneUh00o:wrIhb6ZKMNA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=UTzXneUh00o:wrIhb6ZKMNA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=UTzXneUh00o:wrIhb6ZKMNA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=UTzXneUh00o:wrIhb6ZKMNA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/UTzXneUh00o" height="1" width="1"/>]]></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>
		<feedburner:origLink>http://www.x2od.com/2009/04/01/hacking-a-case-comment-trigger.html</feedburner:origLink></item>
		<item>
		<title>Flexible Field Labels</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/-FNJHUEAORc/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;
&#60;apex:pageblocksection&#62;
&#60;apex:outputField value=&#34;{!Account.Name}&#34; [...]]]></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.  :)
<p><a href="http://feedads.g.doubleclick.net/~a/P6z63bSngQlS1kSfd_EBHSWJ99w/0/da"><img src="http://feedads.g.doubleclick.net/~a/P6z63bSngQlS1kSfd_EBHSWJ99w/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/P6z63bSngQlS1kSfd_EBHSWJ99w/1/da"><img src="http://feedads.g.doubleclick.net/~a/P6z63bSngQlS1kSfd_EBHSWJ99w/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=-FNJHUEAORc:OIMUwTi8C2I:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=-FNJHUEAORc:OIMUwTi8C2I:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=-FNJHUEAORc:OIMUwTi8C2I:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=-FNJHUEAORc:OIMUwTi8C2I:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=-FNJHUEAORc:OIMUwTi8C2I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/-FNJHUEAORc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/03/23/flexible-field-labels.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2009/03/23/flexible-field-labels.html</feedburner:origLink></item>
		<item>
		<title>Summer ‘09 Logo Unveiled</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/1D5p9SmocGg/summer-09-logo-unveiled.html</link>
		<comments>http://www.x2od.com/2009/03/20/summer-09-logo-unveiled.html#comments</comments>
		<pubDate>Sat, 21 Mar 2009 05:39:34 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[salesforce.com]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=411</guid>
		<description><![CDATA[The voting is over and we have a winner.
Salesforce has released the official logo for the Summer &#8216;09 (release 160) logo: The sailboat.


To those who voted for the scooter or the pina colada (they call it a coconut, but it&#8217;s really a picture of an alcoholic beverage), better luck next time.
Of course, in true American [...]]]></description>
			<content:encoded><![CDATA[<p>The voting is over and we have a winner.<br />
Salesforce has released the official logo for the Summer &#8216;09 (release 160) logo: The sailboat.<br />
<center><a href="http://www.x2od.com/2009/03/20/summer-09-logo-unveiled.html/summer09logo_final" rel="attachment wp-att-414"><img src="http://www.x2od.com/wp/uploads/summer09logo_final.jpg" alt="The Salesforce CRM Summer 09 final logo" title="The Salesforce CRM Summer 09 final logo" width="400" height="104" class="size-full wp-image-414" border="0" /></a></center><br clear="both"><br />
<span id="more-411"></span><br />
To those who voted for the scooter or the pina colada (they call it a coconut, but it&#8217;s really a picture of an alcoholic beverage), better luck next time.<br />
Of course, in true American democratic fashion, the logo that the people voted for is not the actual logo.<br />
<center><img src="http://www.x2od.com/wp/uploads/summer09logo_initial-300x78.jpg" alt="The Salesforce CRM Summer 09 Logo put up for voting." title="Summer 09 Logo - Version 1" width="300" height="78" class="size-medium wp-image-413" /></center><br clear="both"></p>
<p>Salesforce.com made a few changes</a>, but it&#8217;s something we can all agree is very nice (and, as usual, Northern Hemisphere-centric).<br />
Let the new-feature rumor-mill begin!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/nyqrLWTcD3kTeHdibrUhLngCBY0/0/da"><img src="http://feedads.g.doubleclick.net/~a/nyqrLWTcD3kTeHdibrUhLngCBY0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/nyqrLWTcD3kTeHdibrUhLngCBY0/1/da"><img src="http://feedads.g.doubleclick.net/~a/nyqrLWTcD3kTeHdibrUhLngCBY0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=1D5p9SmocGg:GYyIMF5N5Fo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=1D5p9SmocGg:GYyIMF5N5Fo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=1D5p9SmocGg:GYyIMF5N5Fo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=1D5p9SmocGg:GYyIMF5N5Fo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=1D5p9SmocGg:GYyIMF5N5Fo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/1D5p9SmocGg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/03/20/summer-09-logo-unveiled.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2009/03/20/summer-09-logo-unveiled.html</feedburner:origLink></item>
		<item>
		<title>X-Squared featured in Inc.com article on drop.io</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/F_BMIyuh9VM/inccom-dropio-article.html</link>
		<comments>http://www.x2od.com/2009/03/19/inccom-dropio-article.html#comments</comments>
		<pubDate>Thu, 19 Mar 2009 19:51:22 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[X-Squared On Demand]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=406</guid>
		<description><![CDATA[Howard Greenstein of Inc.com published a story today(”Stop, Collaborate, and Listen“) on drop.io and asked us to comment on how drop.io can help SMBs in service delivery.]]></description>
			<content:encoded><![CDATA[<p>Those who follow us on <a href="http://www.twitter.com">Twitter</a> know that <a href="http://drop.io">drop.io</a> is one of our favorite tools.  We use it to collaborate with clients, to send files without taking up valuable inbox space (companies have been known to enforce miniscule Exchange inbox sizes), and even to share music playlists.<br />
<a href="http://blog.inc.com/start-up/howard_greenstein/">Howard Greenstein</a> of <a href="http://www.inc.com/">Inc.com</a> published a story today(&#8221;<strong><a href="http://blog.inc.com/start-up/2009/03/stop_collaborate_and_listen_1.html">Stop, Collaborate, and Listen</a></strong>&#8220;) on drop.io and asked David to comment on how drop.io can help SMBs in service delivery.<br />
It&#8217;s a good story that outlines the more basic features that drop.io offers.  There is so much more available, both through the front-end and via drop.io&#8217;s <a href="http://api.drop.io">RESTful API</a>.  In fact, David has been working on a Salesforce-drop.io integration that will allow inexpensive file storage and selective file-sharing with clients.<br />
Please read <strong><a href="http://blog.inc.com/start-up/2009/03/stop_collaborate_and_listen_1.html">Howard&#8217;s story</a></strong> and give <a href="http://drop.io">drop.io</a> a shot &#8211; you&#8217;ll enjoy it.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/IX0KKHvW07lJ9--RpASvuOPI9Ig/0/da"><img src="http://feedads.g.doubleclick.net/~a/IX0KKHvW07lJ9--RpASvuOPI9Ig/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/IX0KKHvW07lJ9--RpASvuOPI9Ig/1/da"><img src="http://feedads.g.doubleclick.net/~a/IX0KKHvW07lJ9--RpASvuOPI9Ig/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=F_BMIyuh9VM:PsOCVFhSd2c:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=F_BMIyuh9VM:PsOCVFhSd2c:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=F_BMIyuh9VM:PsOCVFhSd2c:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=F_BMIyuh9VM:PsOCVFhSd2c:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=F_BMIyuh9VM:PsOCVFhSd2c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/F_BMIyuh9VM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/03/19/inccom-dropio-article.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2009/03/19/inccom-dropio-article.html</feedburner:origLink></item>
		<item>
		<title>Zip to City &amp; State Integration – Proof of Concept</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/5tUVdev68Wc/zipintegration_proofofconcept.html</link>
		<comments>http://www.x2od.com/2009/03/11/zipintegration_proofofconcept.html#comments</comments>
		<pubDate>Wed, 11 Mar 2009 19:44:29 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[X-Squared On Demand]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=394</guid>
		<description><![CDATA[




Zip to State &#038; City - Proof of Concept
This is proof that our newest project, an integration to retrieve the State and City based on a postal code, works... sometimes.  Obviously not ready for public consumption yet.

]]></description>
			<content:encoded><![CDATA[<p>

<embed src="http://www.x2od.com/wp/uploads/zipstatecity.swf" width="575" height="532" autostart="false" />



<p class="attachment"><a href="http://www.x2od.com/wp/uploads/zipstatecity.swf"  title='Zip to State &amp; City - Proof of Concept'>Zip to State & City - Proof of Concept</a></p>
<p>This is proof that our newest project, an integration to retrieve the State and City based on a postal code, works... sometimes.  Obviously not ready for public consumption yet.</p>
</p>

<p><a href="http://feedads.g.doubleclick.net/~a/wlKNtW9Wr2uT8Ft0HcUOo_yZtuE/0/da"><img src="http://feedads.g.doubleclick.net/~a/wlKNtW9Wr2uT8Ft0HcUOo_yZtuE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/wlKNtW9Wr2uT8Ft0HcUOo_yZtuE/1/da"><img src="http://feedads.g.doubleclick.net/~a/wlKNtW9Wr2uT8Ft0HcUOo_yZtuE/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/x2od_wp?a=5tUVdev68Wc:diHoCmZzotc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/x2od_wp?i=5tUVdev68Wc:diHoCmZzotc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=5tUVdev68Wc:diHoCmZzotc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=5tUVdev68Wc:diHoCmZzotc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/x2od_wp?a=5tUVdev68Wc:diHoCmZzotc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/x2od_wp?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/5tUVdev68Wc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/03/11/zipintegration_proofofconcept.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2009/03/11/zipintegration_proofofconcept.html</feedburner:origLink></item>
		<item>
		<title>Developer Preview Releases for the Google Visualization API</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/LVAJ7gjTUIE/google-developer-preview-visualization-api.html</link>
		<comments>http://www.x2od.com/2009/02/21/google-developer-preview-visualization-api.html#comments</comments>
		<pubDate>Sat, 21 Feb 2009 19:55:18 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[Winter 09]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[Dreamforce]]></category>
		<category><![CDATA[Eclipse IDE]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=373</guid>
		<description><![CDATA[Google has invited developers to participate in Developer Preview Releases for the Visualization API]]></description>
			<content:encoded><![CDATA[<p>Dreamforce 2008 brought many exciting new features from salesforce.com, both on the CRM/front-end side and the Force.com platform/back-end side.  One of the favorites was the announcement that salesforce.com had released a <a href="http://code.google.com/apis/visualization/">Google Visualization</a> <a href="http://developer.force.com/codeshare/apex/projectpage?id=a06300000030w9LAAQ">code share project</a>.  Google has invited developers to participate in <a href='http://google-code-updates.blogspot.com/2009/02/developer-preview-releases-for.html'>Developer Preview Releases for the Visualization API</a>.</p>
<p>It looks like a pretty cool way to work on <a href="http://wiki.apexdevnet.com/index.php/Force.com_Zillow_Mashup">RESTful</a> integrations while making some pretty pictures for your users.</p>
<p>For those unfamiliar with the Salesforce/Google Visualization toolkit, developer.force.com has a <a href="http://wiki.apexdevnet.com/index.php/Google_Visualizations">great introduction</a>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/1-i2T52GJBkcHUe3kX6cNA8MQXs/0/da"><img src="http://feedads.g.doubleclick.net/~a/1-i2T52GJBkcHUe3kX6cNA8MQXs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/1-i2T52GJBkcHUe3kX6cNA8MQXs/1/da"><img src="http://feedads.g.doubleclick.net/~a/1-i2T52GJBkcHUe3kX6cNA8MQXs/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/x2od_wp?a=KThICJLk"><img src="http://feeds.feedburner.com/~f/x2od_wp?i=KThICJLk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=mMFmC2Mi"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=43" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=TbSosmaj"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=dWFZpeww"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/LVAJ7gjTUIE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/02/21/google-developer-preview-visualization-api.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2009/02/21/google-developer-preview-visualization-api.html</feedburner:origLink></item>
		<item>
		<title>Ubiquity Plugin for developer.force.com</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/Gneh0cCZK7s/ubiquity-plugin-for-developerforce.html</link>
		<comments>http://www.x2od.com/2009/02/05/ubiquity-plugin-for-developerforce.html#comments</comments>
		<pubDate>Thu, 05 Feb 2009 20:34:18 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Just for fun]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[X-Squared On Demand]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=326</guid>
		<description><![CDATA[Inspired by Gina Tripani's release of a Ubiquity plug-in to search Lifehacker via Google, I used her code as a base (thanks, Gina) and created a Ubiquity plug-in to search developer.force.com.]]></description>
			<content:encoded><![CDATA[<p>Inspired by <a href="http://ginatrapani.org">Gina Tripani&#8217;s</a> release of a <a href="http://ginatrapani.org/workshop/ubiquity/lifehacker-search.xhtml">Ubiquity plug-in</a> to search <a href="http://lifehacker.com">Lifehacker</a> via Google, I used her code as a base (thanks, Gina) and created a <a href="http://www.x2od.com/projects/ubiquity/index.xhtml">Ubiquity plug-in to search developer.force.com</a>.</p>
<p>Because <a href="http://developer.force.com">developer<em>f</em>orce</a> uses Google&#8217;s technology to search its own site, I wanted to display the search results within the developer.force.com site instead of using Google to search.  This meant that I could not (in version 1) display results as the user types in a word.  It is still a timesaver, though, as it opens the site and executes the search all-at-once.</p>
<p>To install the plug-in, make sure you have <a href="http://labs.mozilla.com/projects/ubiquity/">Ubiquity</a> installed in Firefox, and then go to the project homeage at <a href="http://www.x2od.com/projects/ubiquity/index.xhtml">http://www.x2od.com/projects/ubiquity/index.xhtml</a>.  Install and you&#8217;re done!  For more tips on using Ubiquity, visit <a href="http://lifehacker.com/5145709/make-ubiquity-your-ultimate-firefox-commander?skyline=true&#038;s=i">Lifehacker</a>.</p>
<p><a href="http://www.x2od.com/projects/ubiquity/index.xhtml"><img alt="" src="http://www.x2od.com/projects/ubiquity/developerforce-ubiquity-search-screenshot.png" title="Developerforce Ubiquity Search Screenshot" class="aligncenter" width="537" height="159" /></a><br />
<br clear="both" /><br />
Enjoy!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/TshX6fzPyeJkSRyk2jLTi1Slfns/0/da"><img src="http://feedads.g.doubleclick.net/~a/TshX6fzPyeJkSRyk2jLTi1Slfns/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/TshX6fzPyeJkSRyk2jLTi1Slfns/1/da"><img src="http://feedads.g.doubleclick.net/~a/TshX6fzPyeJkSRyk2jLTi1Slfns/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/x2od_wp?a=YSKPI1aO"><img src="http://feeds.feedburner.com/~f/x2od_wp?i=YSKPI1aO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=n0XnnyXZ"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=43" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=h5X6pPQc"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=sGFJ2Dd6"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/Gneh0cCZK7s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2009/02/05/ubiquity-plugin-for-developerforce.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2009/02/05/ubiquity-plugin-for-developerforce.html</feedburner:origLink></item>
		<item>
		<title>The Ultimate Visualforce Events Tab – Almost</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/N0pgUT2IaT4/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 &#8216;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!
<p><a href="http://feedads.g.doubleclick.net/~a/vE9oNykIzbwgWPyjmxw6EPRQCp8/0/da"><img src="http://feedads.g.doubleclick.net/~a/vE9oNykIzbwgWPyjmxw6EPRQCp8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/vE9oNykIzbwgWPyjmxw6EPRQCp8/1/da"><img src="http://feedads.g.doubleclick.net/~a/vE9oNykIzbwgWPyjmxw6EPRQCp8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/x2od_wp?a=9j4LZiQU"><img src="http://feeds.feedburner.com/~f/x2od_wp?i=9j4LZiQU" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=u4ddnDjV"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=43" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=C5fJ3hKG"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=V9i2kGsR"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/N0pgUT2IaT4" height="1" width="1"/>]]></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>
		<feedburner:origLink>http://www.x2od.com/2009/01/05/the-ultimate-visualforce-events-tab-almos.html</feedburner:origLink></item>
		<item>
		<title>Force.com Sites Guest User Profile Permissions</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/O5ZYd11JusE/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 [...]]]></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>

<p><a href="http://feedads.g.doubleclick.net/~a/zcpC8pnzZBk3MxqR8EK60vG04WU/0/da"><img src="http://feedads.g.doubleclick.net/~a/zcpC8pnzZBk3MxqR8EK60vG04WU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/zcpC8pnzZBk3MxqR8EK60vG04WU/1/da"><img src="http://feedads.g.doubleclick.net/~a/zcpC8pnzZBk3MxqR8EK60vG04WU/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/x2od_wp?a=LR5D6njD"><img src="http://feeds.feedburner.com/~f/x2od_wp?i=LR5D6njD" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=6QwPeMGS"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=43" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=EHfueZGK"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=3144M1An"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/O5ZYd11JusE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/12/22/sites-guest-profile.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2008/12/22/sites-guest-profile.html</feedburner:origLink></item>
		<item>
		<title>X-Squared Featured in ITA Newsletter</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/hURn7EQnlw0/x-squared-featured-in-ita-newsletter.html</link>
		<comments>http://www.x2od.com/2008/12/08/x-squared-featured-in-ita-newsletter.html#comments</comments>
		<pubDate>Mon, 08 Dec 2008 22:15:00 +0000</pubDate>
		<dc:creator>David Schach</dc:creator>
				<category><![CDATA[X-Squared On Demand]]></category>

		<guid isPermaLink="false">http://www.x2od.com/?p=288</guid>
		<description><![CDATA[This week, X-Squared On Demand was featured in the Illinois Technology Association&#8217;s Industry Weekly newsletter ITA Member Q&#038;A.  
Thank you to the ITA for featuring us!
]]></description>
			<content:encoded><![CDATA[<p>This week, <a href="https://www.illinoistech.org/technologynews.aspx/1735">X-Squared On Demand</a> was featured in the <a href="http://www.illinoistech.org">Illinois Technology Association</a>&#8217;s Industry Weekly newsletter ITA Member Q&#038;A.  </p>
<p>Thank you to the ITA for featuring us!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/jJFUsTdv9MurVw0TLtBZ6KlfOak/0/da"><img src="http://feedads.g.doubleclick.net/~a/jJFUsTdv9MurVw0TLtBZ6KlfOak/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/jJFUsTdv9MurVw0TLtBZ6KlfOak/1/da"><img src="http://feedads.g.doubleclick.net/~a/jJFUsTdv9MurVw0TLtBZ6KlfOak/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/x2od_wp?a=75INoj1I"><img src="http://feeds.feedburner.com/~f/x2od_wp?i=75INoj1I" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=pBeQQY0t"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=43" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=50UOuLfF"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=Weuk266y"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/hURn7EQnlw0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/12/08/x-squared-featured-in-ita-newsletter.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2008/12/08/x-squared-featured-in-ita-newsletter.html</feedburner:origLink></item>
		<item>
		<title>Inline Visualforce Page Layouts!</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/fJP8gcoEXKE/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>

<p><a href="http://feedads.g.doubleclick.net/~a/bPdcKu_IHOxQLD3KSpAQSO_J0dI/0/da"><img src="http://feedads.g.doubleclick.net/~a/bPdcKu_IHOxQLD3KSpAQSO_J0dI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/bPdcKu_IHOxQLD3KSpAQSO_J0dI/1/da"><img src="http://feedads.g.doubleclick.net/~a/bPdcKu_IHOxQLD3KSpAQSO_J0dI/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/x2od_wp?a=kmEOg77N"><img src="http://feeds.feedburner.com/~f/x2od_wp?i=kmEOg77N" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=4jE2HOE9"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=43" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=biogguT1"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=1nBVFcit"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/fJP8gcoEXKE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.x2od.com/2008/11/29/inline-visualforce-page-layouts.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.x2od.com/2008/11/29/inline-visualforce-page-layouts.html</feedburner:origLink></item>
		<item>
		<title>Project: Change Owner Button in Visualforce</title>
		<link>http://feedproxy.google.com/~r/x2od_wp/~3/QgqT1P9BsIc/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=&quot;list&quot; rowClasses=&quot;dataRow&quot; onRowMouseOver=&quot;hiOn(this);&quot; onRowMouseOut=&quot;hiOff(this);&quot;&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>

<p><a href="http://feedads.g.doubleclick.net/~a/B4dkmsbAvSQQMMgVDTt7aNnMdSU/0/da"><img src="http://feedads.g.doubleclick.net/~a/B4dkmsbAvSQQMMgVDTt7aNnMdSU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/B4dkmsbAvSQQMMgVDTt7aNnMdSU/1/da"><img src="http://feedads.g.doubleclick.net/~a/B4dkmsbAvSQQMMgVDTt7aNnMdSU/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/x2od_wp?a=X8jcvfJ6"><img src="http://feeds.feedburner.com/~f/x2od_wp?i=X8jcvfJ6" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=JnXpLEoV"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=43" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=R9iKsRH1"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=52" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/x2od_wp?a=bvl6zWob"><img src="http://feeds.feedburner.com/~f/x2od_wp?d=41" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/x2od_wp/~4/QgqT1P9BsIc" height="1" width="1"/>]]></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>
		<feedburner:origLink>http://www.x2od.com/2008/11/13/project-change-owner-button-in-visualforce.html</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 2.380 seconds. --><!-- Cached page generated by WP-Super-Cache on 2009-07-16 09:07:20 -->
