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

<channel>
	<title>Delivered Innovation Blog &#187; VisualForce</title>
	<atom:link href="http://blog.deliveredinnovation.com/tag/visualforce/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.deliveredinnovation.com</link>
	<description>Delivered Innovation Blog</description>
	<lastBuildDate>Tue, 10 Apr 2012 17:22:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Force Feed 2-20-2012</title>
		<link>http://blog.deliveredinnovation.com/2012/02/20/force-feed-2-20-2012/</link>
		<comments>http://blog.deliveredinnovation.com/2012/02/20/force-feed-2-20-2012/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 19:21:02 +0000</pubDate>
		<dc:creator>Delivered Innovation</dc:creator>
				<category><![CDATA[Cloud Architecture]]></category>
		<category><![CDATA[Chatter]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[Spring '12]]></category>
		<category><![CDATA[VisualForce]]></category>

		<guid isPermaLink="false">http://blog.deliveredinnovation.com/?p=2451</guid>
		<description><![CDATA[<a href="http://blogs.developerforce.com/developer-relations/2012/02/build-social-applications-with-the-force-com-toolkit-for-facebook.html" title="Build Social Applications with the Force.com Toolkit for Facebook" target="_blank">Build Social Applications with the Force.com Toolkit for Facebook</a>
<a href="https://twitter.com/#!/metadaddy" title="@metadaddy" target="_blank">@metadaddy</a>
A third release of Force.com Toolkit for Facebook, now allowing you to write a social application for Facebook in Apex Code and deploy it as  force.com Site, a customer portal, or a VisualForce page running in an org.

<a href="http://www.forcetree.com/2012/02/format-salesforce-date-time-fields-in.html" title="Format Salesforce Data Time Fields in Excel" target="_blank">Format Salesforce Data Time Fields in Excel</a>
<a href="https://twitter.com/#!/sfunearthed" title="@sfunearthed" target="_blank">@sfunearthed</a>
Different ways to format Salesforce DateTime fields in Excel.

<a href="http://www.tehnrd.com/multi-file-uploader-for-salesforce-oh-ya-and-progress-bars-too/" title="Multi File Uploader for Salesforce" target="_blank">Multi File Uploader for Salesforce</a>
<a href="https://twitter.com/#!/TehNrd" title="@TehNrd" target="_blank">@TehNrd</a>
Upload multiple files to Salesforce at one time with the first release of Multi File Uploader Tool.

<a href="http://blogs.developerforce.com/tech-pubs/2012/02/new-and-updated-developer-documentation-for-spring-12.html" title="New and Updated Developer Documentation for Spring '12" target="_blank">New and Updated Developer Documentation for Spring '12</a>
<a href="https://twitter.com/#!/forcedotcom" title="@forcedotcom" target="_blank">@forcedotcom</a>
Developer documentation on developer.salesforce.com and database.com are now updated to reflect the new Spring '12 Salesforce release. 

<a href="http://buttonclickadmin.com/2012/02/20/monday-am-admin-get-your-chatter-cation/" title="Monday AM Admin: Get Your Chatter-cation" target="_blank">Monday AM Admin: Get your Chatter-cation</a>
<a href="https://twitter.com/#!/MikeGerholdt" title="@MikeGerholdt" target="_blank">@MikeGerholdt</a>
Get your organization more excited about using Chatter with these insights and suggestions.]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.developerforce.com/developer-relations/2012/02/build-social-applications-with-the-force-com-toolkit-for-facebook.html" title="Build Social Applications with the Force.com Toolkit for Facebook" target="_blank">Build Social Applications with the Force.com Toolkit for Facebook</a><br />
<a href="https://twitter.com/#!/metadaddy" title="@metadaddy" target="_blank">@metadaddy</a><br />
A third release of Force.com Toolkit for Facebook, now allowing you to write a social application for Facebook in Apex Code and deploy it as  Force.com Site, a customer portal, or a VisualForce page running in an org.</p>
<p><a href="http://www.forcetree.com/2012/02/format-salesforce-date-time-fields-in.html" title="Format Salesforce Data Time Fields in Excel" target="_blank">Format Salesforce Data Time Fields in Excel</a><br />
<a href="https://twitter.com/#!/sfunearthed" title="@sfunearthed" target="_blank">@sfunearthed</a><br />
Different ways to format Salesforce DateTime fields in Excel.</p>
<p><a href="http://www.tehnrd.com/multi-file-uploader-for-salesforce-oh-ya-and-progress-bars-too/" title="Multi File Uploader for Salesforce" target="_blank">Multi File Uploader for Salesforce</a><br />
<a href="https://twitter.com/#!/TehNrd" title="@TehNrd" target="_blank">@TehNrd</a><br />
Upload multiple files to Salesforce at one time with the first release of Multi File Uploader Tool.</p>
<p><a href="http://blogs.developerforce.com/tech-pubs/2012/02/new-and-updated-developer-documentation-for-spring-12.html" title="New and Updated Developer Documentation for Spring '12" target="_blank">New and Updated Developer Documentation for Spring &#8217;12</a><br />
<a href="https://twitter.com/#!/forcedotcom" title="@forcedotcom" target="_blank">@forcedotcom</a><br />
Developer documentation on developer.salesforce.com and database.com are now updated to reflect the new Spring &#8217;12 Salesforce release. </p>
<p><a href="http://buttonclickadmin.com/2012/02/20/monday-am-admin-get-your-chatter-cation/" title="Monday AM Admin: Get Your Chatter-cation" target="_blank">Monday AM Admin: Get your Chatter-cation</a><br />
<a href="https://twitter.com/#!/MikeGerholdt" title="@MikeGerholdt" target="_blank">@MikeGerholdt</a><br />
Get your organization more excited about using Chatter with these insights and suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2012/02/20/force-feed-2-20-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force Feed 12-12-2011</title>
		<link>http://blog.deliveredinnovation.com/2011/12/12/foce-feed-12-12-2011/</link>
		<comments>http://blog.deliveredinnovation.com/2011/12/12/foce-feed-12-12-2011/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 17:35:59 +0000</pubDate>
		<dc:creator>Delivered Innovation</dc:creator>
				<category><![CDATA[Cloud Architecture]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[MVP program]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[VisualForce]]></category>

		<guid isPermaLink="false">http://forcearchitects.deliveredinnovation.com/?p=2257</guid>
		<description><![CDATA[<strong>The top must-read articles on Force.com and Salesforce from the past week.</strong>

<a href="http://blogs.developerforce.com/developer-relations/2011/12/apex-runtime-update-for-de-orgs.html" title="Apex Runtime Update for Developer Edition Orgs" target="_blank">Apex Runtime Update for Developer Edition Orgs</a>
<a href="https://twitter.com/#!/sbob909" title="@sbob909" target="_blank">@sbob909</a>
Force.com Developer Edition organizations now have a new Apex runtime that compiles directly to Java bytecode.

<a href="http://blogs.developerforce.com/dana-le/2011/12/force-com-mvp-nominations-are-open.html" title="Force.com MVP Nominations Are Open!" target="_blank">Force.com MVP Nominations Are Open!</a>
<a href="https://twitter.com/#!/forcedotcom" title="@forcedotcom" target="_blank">@forcedotcom</a>
The Force.com MVP program is now accepting applications until January 6th. Email your nominations to info[at]developerforce.com.

<a href="http://blogs.developerforce.com/developer-relations/2011/12/visualforce-html5-mobile.html" title="Visualforce + HTML5 + Mobile" target="_blank">Visualforce + HTML5 + Mobile</a>
<a href="https://twitter.com/#!/cloudysan" title="@cloudysan" target="_blank">@cloudysan</a>
A few tips on how to use HTML5 and Visualforce for building mobile web applications.

<a href="http://buttonclickadmin.com/2011/12/09/friday-am-admin-how-to-get-ready-for-a-salesforce-user-group-meeting/" title="How to Get Ready for a Salesforce User Group Meeting" target="_blank">How to Get Ready for a Salesforce User Group Meeting</a>
<a href="https://twitter.com/#!/mikegerholdt" title="@mikegerholdt" target="_blank">@mikegerholdt</a>
Tips include make a list of questions, don't be afraid to speak up, have a mobile device or laptop to take notes on or refer to, bring plenty of business cards, and offer an extra hand at volunteering during the meeting.

<a href="http://www.tgerm.com/2011/12/apex-javascript-remoting-google-charts.html" title="Easy Visualforce Charts with Javascript Remoting and Google Charts API" target="_blank">Easy Visualforce Charts with Javascript Remoting and Google Charts API</a>
<a href="https://twitter.com/#!/abhinavguptas" title="@abhinavguptas" target="_blank">@abhinavguptas</a>
Native visualforce charting is coming soon to Force.com, and Gupta offers an example to render charts using Javascript remoting and Google Charts API.]]></description>
			<content:encoded><![CDATA[<p><strong>The top must-read articles on Force.com and Salesforce from the past week.</strong></p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/12/apex-runtime-update-for-de-orgs.html" title="Apex Runtime Update for Developer Edition Orgs" target="_blank">Apex Runtime Update for Developer Edition Orgs</a><br />
<a href="https://twitter.com/#!/sbob909" title="@sbob909" target="_blank">@sbob909</a><br />
Force.com Developer Edition organizations now have a new Apex runtime that compiles directly to Java bytecode.</p>
<p><a href="http://blogs.developerforce.com/dana-le/2011/12/force-com-mvp-nominations-are-open.html" title="Force.com MVP Nominations Are Open!" target="_blank">Force.com MVP Nominations Are Open!</a><br />
<a href="https://twitter.com/#!/forcedotcom" title="@forcedotcom" target="_blank">@forcedotcom</a><br />
The Force.com MVP program is now accepting applications until January 6th. Email your nominations to info[at]developerforce.com.</p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/12/visualforce-html5-mobile.html" title="Visualforce + HTML5 + Mobile" target="_blank">Visualforce + HTML5 + Mobile</a><br />
<a href="https://twitter.com/#!/cloudysan" title="@cloudysan" target="_blank">@cloudysan</a><br />
A few tips on how to use HTML5 and Visualforce for building mobile web applications.</p>
<p><a href="http://buttonclickadmin.com/2011/12/09/friday-am-admin-how-to-get-ready-for-a-salesforce-user-group-meeting/" title="How to Get Ready for a Salesforce User Group Meeting" target="_blank">How to Get Ready for a Salesforce User Group Meeting</a><br />
<a href="https://twitter.com/#!/mikegerholdt" title="@mikegerholdt" target="_blank">@mikegerholdt</a><br />
Tips include make a list of questions, don&#8217;t be afraid to speak up, have a mobile device or laptop to take notes on or refer to, bring plenty of business cards, and offer an extra hand at volunteering during the meeting.</p>
<p><a href="http://www.tgerm.com/2011/12/apex-javascript-remoting-google-charts.html" title="Easy Visualforce Charts with Javascript Remoting and Google Charts API" target="_blank">Easy Visualforce Charts with Javascript Remoting and Google Charts API</a><br />
<a href="https://twitter.com/#!/abhinavguptas" title="@abhinavguptas" target="_blank">@abhinavguptas</a><br />
Native visualforce charting is coming soon to Force.com, and Gupta offers an example to render charts using Javascript remoting and Google Charts API.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2011/12/12/foce-feed-12-12-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a Custom Web Form Handler With Force.com Sites</title>
		<link>http://blog.deliveredinnovation.com/2011/12/02/create-a-custom-web-form-handler-with-force-com-sites/</link>
		<comments>http://blog.deliveredinnovation.com/2011/12/02/create-a-custom-web-form-handler-with-force-com-sites/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 21:27:22 +0000</pubDate>
		<dc:creator>Michael Topalovich</dc:creator>
				<category><![CDATA[Force.com Platform Tips]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[Force.com Sites]]></category>
		<category><![CDATA[form handler]]></category>
		<category><![CDATA[JavaScript forms]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[VisualForce]]></category>
		<category><![CDATA[web form]]></category>
		<category><![CDATA[Web-to-Case]]></category>
		<category><![CDATA[Web-to-Lead]]></category>

		<guid isPermaLink="false">http://forcearchitects.deliveredinnovation.com/?p=2219</guid>
		<description><![CDATA[No doubt you’ve run into this also…we needed a form handler that captured data for sObjects other than Cases or Leads (e.g. custom objects), we did not want to redirect visitors to a new page upon form submission, and our functional requirements were more complex than what the standard Salesforce form handlers could support. The standard Salesforce Web-to-Lead and Web-to-Case form handlers were not an option, so we had to create our own custom web form handler. And because we wanted to keep everything on Force.com, we decided to build this solution using VisualForce pages and an Apex controller served by Force.com Sites. We developed an alternative solution and wanted to share it with the community in the event it could help others.
<h3>Use case</h3>
<strong></strong>You want to capture form data directly in Salesforce from either a VisualForce page served Force.com Sites or from an externally hosted page, but the standard Web-to-Lead or Web-to-Case web handlers do not meet your exact requirements. You may also be using custom JavaScript forms that post data using AJAX, and do not want to blindly pass data to a form handler that will not provide a return to indicate success or exceptions.

Ultimately, we wanted to expose our form handler so it could also be accessed by any of our forms on the web (Force.com Sites as well as others such as our Wordpress blog, which uses an HTML / PHP-based form to collect data).
<h3>So, here’s what we did</h3>
To begin, you need to ensure that Force.com Sites is setup correctly if it is not already.  You can find information on creating and maintaining Force.com Sites <a href="https://help.salesforce.com/apex/HTViewHelpDoc?id=sites_overview.htm" target="_blank">here</a> or <a href="http://developer.force.com/sites" target="_blank">here</a>.  In our case, we created a “utility” Force.com Site so that we could keep the pages separate from our main Force.com Sites web pages.  We also concealed the Force.com Sites utility subdomain in our custom Site.URLRewriter implementation to avoid AJAX cross-domain issues, but that is a discussion for a future post.

You will need to code up a VisualForce Page and an Apex class to serve as a custom controller to capture the form data and cast values to specific fields in the target sObject.  The VisualForce page itself is very simple in its construct…essentially it will serve two purposes:
<ol>
	<li>Perform a specific Action that calls a PageReference method in the custom controller when the page is invoked.</li>
	<li>Return a value in a format that the process calling the form handler is expecting.  In our case, our AJAX method is expecting a JSON object with the result of the form submission (success or otherwise).</li>
</ol>
This is what the VisualForce page for the form handler that we use for www.deliveredinnovation.com looks like:
<pre><span style="color: #000080;">&#60;apex:page cache="false" controller="formHandlerSample" action="{!processForm}"  showheader="false" contentType="application/jsonrequest" &#62;</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;"> { success: {!success} }</span></pre>
<pre><span style="color: #000080;"> &#60;/apex:page&#62;</span></pre>
<pre><span style="color: #000080;">
</span></pre>
<h5>The elements of this page to take note of:</h5>
<ol>
	<li>The 'controller' attribute is the custom Apex class that contains the logic that will process the contents of the web form</li>
	<li>The 'action' attribute is the PageReference method contained in the Apex class that will process the form data and generate the required return string</li>
	<li>Because our AJAX script is looking for a JSON object to be returned, we declared the contentType of "application/jsonrequest." You may find that you need to return XML, HTML, or other text, so update this attribute to suit your specific requirements.</li>
</ol>
<h4>The form handler code:</h4>
<pre><span style="color: #000080;">public class formHandlerSample {</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public Map&#60;String, String&#62; urlParams;</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public String Error {get; set;}</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public Lead formLead = new Lead();</span></pre>
<pre><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal; color: #000080;">   </span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public formHandlerSample() {</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">urlParams = ApexPages.currentPage().getParameters();</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public Boolean Success {</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">get {<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;"> </span></span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">if(Success == null) {<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;"> </span></span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">Success = false;</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">return Success;<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;"> </span></span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">}<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;"> </span></span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">set;</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public void processLead(Map&#60;String, String&#62; formFields) {</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">if(formFields.size() &#62; 0) {</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">try {</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">for(String fieldKey : formFields.keySet()){</span></pre>
<pre style="padding-left: 150px;"><span style="color: #000080;">if(fieldKey != null &#38;&#38; fieldKey != 'null'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'FirstName'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.FirstName = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'LastName'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.LastName = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'Title'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.Title = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'Company'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.Company = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'Phone'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.Phone = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'Email'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.Email = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'Description'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.Description = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 150px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">upsert formLead;</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">Success = true;</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">catch(System.Exception e) {</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">System.debug('Houston, you have a problem: ' + e);</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">Success = false;</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">Error = String.ValueOf(e);</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">else {</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">Success = false;</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">Error = 'No form fields received';</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public PageReference processForm(){</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">processLead(urlParams);</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">return null;</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">}</span></pre>
<pre><span style="color: #000080;">}</span></pre>
Questions?  Suggestions?  Leave us a comment or email us directly at Blog [at] DeliveredInnovation.com.
<pre><span style="color: #000080;">
</span></pre>]]></description>
			<content:encoded><![CDATA[<p>No doubt you’ve run into this also…we needed a form handler that captured data for sObjects other than Cases or Leads (e.g. custom objects), we did not want to redirect visitors to a new page upon form submission, and our functional requirements were more complex than what the standard Salesforce form handlers could support. The standard Salesforce Web-to-Lead and Web-to-Case form handlers were not an option, so we had to create our own custom web form handler. And because we wanted to keep everything on Force.com, we decided to build this solution using VisualForce pages and an Apex controller served by Force.com Sites. We developed an alternative solution and wanted to share it with the community in the event it could help others.</p>
<h3>Use case</h3>
<p><strong></strong>You want to capture form data directly in Salesforce from either a VisualForce page served Force.com Sites or from an externally hosted page, but the standard Web-to-Lead or Web-to-Case web handlers do not meet your exact requirements. You may also be using custom JavaScript forms that post data using AJAX, and do not want to blindly pass data to a form handler that will not provide a return to indicate success or exceptions.</p>
<p>Ultimately, we wanted to expose our form handler so it could also be accessed by any of our forms on the web (Force.com Sites as well as others such as our WordPress blog, which uses an HTML / PHP-based form to collect data).</p>
<h3>So, here’s what we did</h3>
<p>To begin, you need to ensure that Force.com Sites is setup correctly if it is not already.  You can find information on creating and maintaining Force.com Sites <a href="https://help.salesforce.com/apex/HTViewHelpDoc?id=sites_overview.htm" target="_blank">here</a> or <a href="http://developer.force.com/sites" target="_blank">here</a>.  In our case, we created a “utility” Force.com Site so that we could keep the pages separate from our main Force.com Sites web pages.  We also concealed the Force.com Sites utility subdomain in our custom Site.URLRewriter implementation to avoid AJAX cross-domain issues, but that is a discussion for a future post.</p>
<p>You will need to code up a VisualForce Page and an Apex class to serve as a custom controller to capture the form data and cast values to specific fields in the target sObject.  The VisualForce page itself is very simple in its construct…essentially it will serve two purposes:</p>
<ol>
<li>Perform a specific Action that calls a PageReference method in the custom controller when the page is invoked.</li>
<li>Return a value in a format that the process calling the form handler is expecting.  In our case, our AJAX method is expecting a JSON object with the result of the form submission (success or otherwise).</li>
</ol>
<p>This is what the VisualForce page for the form handler that we use for www.deliveredinnovation.com looks like:</p>
<pre><span style="color: #000080;">&lt;apex:page cache="false" controller="formHandlerSample" action="{!processForm}"  showheader="false" contentType="application/jsonrequest" &gt;</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;"> { success: {!success} }</span></pre>
<pre><span style="color: #000080;"> &lt;/apex:page&gt;</span></pre>
<pre><span style="color: #000080;">
</span></pre>
<h5>The elements of this page to take note of:</h5>
<ol>
<li>The &#8216;controller&#8217; attribute is the custom Apex class that contains the logic that will process the contents of the web form</li>
<li>The &#8216;action&#8217; attribute is the PageReference method contained in the Apex class that will process the form data and generate the required return string</li>
<li>Because our AJAX script is looking for a JSON object to be returned, we declared the contentType of &#8221;application/jsonrequest.&#8221; You may find that you need to return XML, HTML, or other text, so update this attribute to suit your specific requirements.</li>
</ol>
<h4>The form handler code:</h4>
<pre><span style="color: #000080;">public class formHandlerSample {</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public Map&lt;String, String&gt; urlParams;</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public String Error {get; set;}</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public Lead formLead = new Lead();</span></pre>
<pre><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal; color: #000080;">   </span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public formHandlerSample() {</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">urlParams = ApexPages.currentPage().getParameters();</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public Boolean Success {</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">get {<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;"> </span></span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">if(Success == null) {<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;"> </span></span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">Success = false;</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">return Success;<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;"> </span></span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">}<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;"> </span></span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">set;</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public void processLead(Map&lt;String, String&gt; formFields) {</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">if(formFields.size() &gt; 0) {</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">try {</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">for(String fieldKey : formFields.keySet()){</span></pre>
<pre style="padding-left: 150px;"><span style="color: #000080;">if(fieldKey != null &amp;&amp; fieldKey != 'null'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'FirstName'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.FirstName = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'LastName'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.LastName = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'Title'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.Title = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'Company'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.Company = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'Phone'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.Phone = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'Email'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.Email = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">if(fieldKey == 'Description'){</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">formLead.Description = formFields.get(fieldKey);</span></pre>
<pre style="padding-left: 180px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 150px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">upsert formLead;</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">Success = true;</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">catch(System.Exception e) {</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">System.debug('Houston, you have a problem: ' + e);</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">Success = false;</span></pre>
<pre style="padding-left: 120px;"><span style="color: #000080;">Error = String.ValueOf(e);</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">else {</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">Success = false;</span></pre>
<pre style="padding-left: 90px;"><span style="color: #000080;">Error = 'No form fields received';</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">}</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">public PageReference processForm(){</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">processLead(urlParams);</span></pre>
<pre style="padding-left: 60px;"><span style="color: #000080;">return null;</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">}</span></pre>
<pre><span style="color: #000080;">}</span></pre>
<p>Questions?  Suggestions?  Leave us a comment or email us directly at Blog [at] DeliveredInnovation.com.</p>
<pre><span style="color: #000080;">
</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2011/12/02/create-a-custom-web-form-handler-with-force-com-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force Feed 10-31-2011</title>
		<link>http://blog.deliveredinnovation.com/2011/10/31/force-feed-10-31-2011/</link>
		<comments>http://blog.deliveredinnovation.com/2011/10/31/force-feed-10-31-2011/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 17:34:42 +0000</pubDate>
		<dc:creator>Delivered Innovation</dc:creator>
				<category><![CDATA[Cloud Architecture]]></category>
		<category><![CDATA[#df11]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[VisualForce]]></category>
		<category><![CDATA[Winter '12]]></category>

		<guid isPermaLink="false">http://forcearchitects.deliveredinnovation.com/?p=2106</guid>
		<description><![CDATA[<strong>List of all the Salesforce and Force.com posts from the previous week!
</strong>
<a href="tp://blogs.developerforce.com/developer-relations/2011/10/df11-recap-blazing-fast-visualforce.html" target="_blank">#DF11 Recap: Blazing Fast Visualforce</a>
<a href="http://twitter.com/#!/joshbirk" target="_blank">@joshbirk</a>
Josh Birk suggests checking out the DF11 youtube video, Blazing Fast Visualforce Pages to help with your Visualforce understanding/development.

<a href="http://blogs.developerforce.com/developer-relations/2011/10/dynamic-visualforce-and-visual-workflow-with-rerender.html" target="_blank">Dynamic Visualforce and Visual Workflow with Rerender</a>
<a href="http://twitter.com/#!/metadaddy" target="_blank">@metadaddy</a>
Patterson walks us through how a Flow embedded in a Visualforce page can interact with other elements on the page in Cloud Flow Designer. 

<a href="http://blogs.developerforce.com/tech-pubs/2011/10/winter-12-release-notes-whats-new-for-the-week-of-october-24th.html" target="_blank">Winter '12 Release Notes- What's New for the Week of October 24th</a>
<a href="http://twitter.com/#!/forcedotcom" target="_blank">@forcedotcom</a>
Information about new Winter '12 features such as encrypted fields enabled, changes to granting login access, Chatter REST API enhancements, and more.

<a href="http://blogs.developerforce.com/developer-relations/2011/10/please-dont-screen-scrape-visualforce.html" target="_blank">Please Don't Screen Scrape Visualforce</a>
<a href="http://twitter.com/#!/metadaddy" target="_blank">@metadaddy</a>
How to retrieve a Visualforce page from server side code for the purpose of screen scraping it to extract data. 

<a href="http://blogs.developerforce.com/developer-relations/2011/10/publishing-real-time-updates-from-apex-with-pusher.html" target="_blank">Publishing Real-time Updates from Apex with Pusher</a>
<a href="http://twitter.com/#!/metadaddy" target="_blank">@metadaddy</a>
Trying out Pusher and code for Visualforce page. 

<a href="http://www.embracingthecloud.com/2011/10/31/SalesforceOracleIntegrationBeyondClosedWon.aspx" target="_blank">Salesforce Oracle Integration: Beyond Closed Won</a>
<a href="http://twitter.com/#!/dlog" target="_blank">@dlog</a>
A reliable integration process with Salesforce and Oracle Financials. 

<a href="http://www.tgerm.com/2011/10/upgrade-forcecom-ide-winter12.html?" target="_blank">Easy Upgrade Eclipse (Helios) Force.com IDE to Winter '12 Release</a>
<a href="https://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a>
Gupta's preferred way to update in Eclipse Helios.

<a href="http://buttonclickadmin.com/2011/10/31/monday-am-admin-merging-salesforce-orgs-5-tips-to-ensure-success/" target="_blank">Merging Salesforce orgs- 5 Tips to Ensure Success</a>
<a href="http://twitter.com/#!/MikeGerholdt" target="_blank">@MikeGerholdt</a>
How to create custom links in Salesforce.

<a href="http://buttonclickadmin.com/2011/10/31/monday-am-admin-merging-salesforce-orgs-5-tips-to-ensure-success/" target="_blank">Merging Salesforce Orgs- 5 Tips to Ensure Success</a>
<a href="http://twitter.com/#!/MikeGerholdt" target="_blank">@MikeGerholdt</a>
Tips include know what you're getting into, consider the data, users, and tools, and visualize the change process for leaders. ]]></description>
			<content:encoded><![CDATA[<p><strong>List of all the Salesforce and Force.com posts from the previous week!<br />
</strong><br />
<a href="tp://blogs.developerforce.com/developer-relations/2011/10/df11-recap-blazing-fast-visualforce.html" target="_blank">#DF11 Recap: Blazing Fast Visualforce</a><br />
<a href="http://twitter.com/#!/joshbirk" target="_blank">@joshbirk</a><br />
Josh Birk suggests checking out the DF11 youtube video, Blazing Fast Visualforce Pages to help with your Visualforce understanding/development.</p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/10/dynamic-visualforce-and-visual-workflow-with-rerender.html" target="_blank">Dynamic Visualforce and Visual Workflow with Rerender</a><br />
<a href="http://twitter.com/#!/metadaddy" target="_blank">@metadaddy</a><br />
Patterson walks us through how a Flow embedded in a Visualforce page can interact with other elements on the page in Cloud Flow Designer. </p>
<p><a href="http://blogs.developerforce.com/tech-pubs/2011/10/winter-12-release-notes-whats-new-for-the-week-of-october-24th.html" target="_blank">Winter &#8217;12 Release Notes- What&#8217;s New for the Week of October 24th</a><br />
<a href="http://twitter.com/#!/forcedotcom" target="_blank">@forcedotcom</a><br />
Information about new Winter &#8217;12 features such as encrypted fields enabled, changes to granting login access, Chatter REST API enhancements, and more.</p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/10/please-dont-screen-scrape-visualforce.html" target="_blank">Please Don&#8217;t Screen Scrape Visualforce</a><br />
<a href="http://twitter.com/#!/metadaddy" target="_blank">@metadaddy</a><br />
How to retrieve a Visualforce page from server side code for the purpose of screen scraping it to extract data. </p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/10/publishing-real-time-updates-from-apex-with-pusher.html" target="_blank">Publishing Real-time Updates from Apex with Pusher</a><br />
<a href="http://twitter.com/#!/metadaddy" target="_blank">@metadaddy</a><br />
Trying out Pusher and code for Visualforce page. </p>
<p><a href="http://www.embracingthecloud.com/2011/10/31/SalesforceOracleIntegrationBeyondClosedWon.aspx" target="_blank">Salesforce Oracle Integration: Beyond Closed Won</a><br />
<a href="http://twitter.com/#!/dlog" target="_blank">@dlog</a><br />
A reliable integration process with Salesforce and Oracle Financials. </p>
<p><a href="http://www.tgerm.com/2011/10/upgrade-forcecom-ide-winter12.html?" target="_blank">Easy Upgrade Eclipse (Helios) Force.com IDE to Winter &#8217;12 Release</a><br />
<a href="https://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a><br />
Gupta&#8217;s preferred way to update in Eclipse Helios.</p>
<p><a href="http://buttonclickadmin.com/2011/10/31/monday-am-admin-merging-salesforce-orgs-5-tips-to-ensure-success/" target="_blank">Merging Salesforce orgs- 5 Tips to Ensure Success</a><br />
<a href="http://twitter.com/#!/MikeGerholdt" target="_blank">@MikeGerholdt</a><br />
How to create custom links in Salesforce.</p>
<p><a href="http://buttonclickadmin.com/2011/10/31/monday-am-admin-merging-salesforce-orgs-5-tips-to-ensure-success/" target="_blank">Merging Salesforce Orgs- 5 Tips to Ensure Success</a><br />
<a href="http://twitter.com/#!/MikeGerholdt" target="_blank">@MikeGerholdt</a><br />
Tips include know what you&#8217;re getting into, consider the data, users, and tools, and visualize the change process for leaders. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2011/10/31/force-feed-10-31-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force Feed 10-17-2011</title>
		<link>http://blog.deliveredinnovation.com/2011/10/17/force-feed-10-17-2011/</link>
		<comments>http://blog.deliveredinnovation.com/2011/10/17/force-feed-10-17-2011/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 18:30:24 +0000</pubDate>
		<dc:creator>Delivered Innovation</dc:creator>
				<category><![CDATA[Cloud Architecture]]></category>
		<category><![CDATA[Chatter]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[VisualForce]]></category>
		<category><![CDATA[Winter '12]]></category>

		<guid isPermaLink="false">http://forcearchitects.deliveredinnovation.com/?p=1996</guid>
		<description><![CDATA[<strong>A quick roundup of all the Salesforce and Force.com articles from the previous week.
</strong>
<a href="http://www.tgerm.com/2011/10/crudfls-security-visualforce-salesforce.html" target="_blank">Visualforce RelatedList CRUD FLS Security Tip</a>
<a href="http://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a>
Post highlights a common mistake performed by developers in Visualforce.

<a href="http://www.tgerm.com/2011/10/visualforce-templates-snippets-forcecom.html" target="_blank">Visualforce Code Templates/Snippets for Force.com IDE!</a>
<a href="http://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a>
Using Force.com IDE with Eclipse.

<a href="http://raydehler.com/cloud/clod/sqlforce-an-option-for-select-distinct-in-salesforce.html" target="_blank">SQLForce: An Option for Select Distinct in Salesforce</a>
<a href="http://twitter.com/#!/rdehler" target="_blank">@rdehler</a>
A command for using SQLForce.

<a href="http://blogs.developerforce.com/tech-pubs/2011/10/watch-and-learn-new-platform-developer-videos-in-winter-12.html" target="_blank">Watch and Learn- New Platform &#38; Developer Videos in Winter '12</a>
<a href="http://twitter.com/#!/forcedotcom" target="_blank">@Forcedotcom</a>
Winter '12 developer videos such as Building a Website with Siteforce, Editing and Managing Content with Siteforce, and Introducing Database.com.

<a href="http://blogs.developerforce.com/developer-relations/2011/10/winter-12-efficient-manageable-security-policies-with-permission-sets.html" target="_blank">Winter '12: Efficient, Manageable Security Policies with Permission Sets</a>
<a href="http://twitter.com/#!/sbob909" target="_blank">@sbob909</a>
Now in Winter '12, permission sets complement profiles.

<a href="http://www.tgerm.com/2011/10/winter12-jsonparser-serialize.html" target="_blank">Parse JSON by one line of code using Winter '12 JSON API</a>
<a href="http://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a>
JsonParser is a new API addition to Apex Stack. Post explains how to simplify JSON operations using System.JSON API.

<a href="http://blogs.developerforce.com/developer-relations/2011/10/visualforce-charting-in-winter-12.html" target="_blank">Visualforce Charting in Winter '12</a>
<a href="http://twitter.com/#!/cloudysan" target="_blank">@cloudysan</a>
More about Visualforce Charting, which allows you to develop custom and complex charts using standard Visualforce components.

<a href="http://www.tgerm.com/2011/10/winter12-chatter-approval-salesforce.html" target="_blank">Winter '12 Social Approving of Records Using 'Chatter Approvals'</a>
<a href="http://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a>
How Chatter Approvals can be social and fun.]]></description>
			<content:encoded><![CDATA[<p><strong>A quick roundup of all the Salesforce and Force.com articles from the previous week.<br />
</strong><br />
<a href="http://www.tgerm.com/2011/10/crudfls-security-visualforce-salesforce.html" target="_blank">Visualforce RelatedList CRUD FLS Security Tip</a><br />
<a href="http://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a><br />
Post highlights a common mistake performed by developers in Visualforce.</p>
<p><a href="http://www.tgerm.com/2011/10/visualforce-templates-snippets-forcecom.html" target="_blank">Visualforce Code Templates/Snippets for Force.com IDE!</a><br />
<a href="http://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a><br />
Using Force.com IDE with Eclipse.</p>
<p><a href="http://raydehler.com/cloud/clod/sqlforce-an-option-for-select-distinct-in-salesforce.html" target="_blank">SQLForce: An Option for Select Distinct in Salesforce</a><br />
<a href="http://twitter.com/#!/rdehler" target="_blank">@rdehler</a><br />
A command for using SQLForce.</p>
<p><a href="http://blogs.developerforce.com/tech-pubs/2011/10/watch-and-learn-new-platform-developer-videos-in-winter-12.html" target="_blank">Watch and Learn- New Platform &amp; Developer Videos in Winter &#8217;12</a><br />
<a href="http://twitter.com/#!/forcedotcom" target="_blank">@Forcedotcom</a><br />
Winter &#8217;12 developer videos such as Building a Website with Siteforce, Editing and Managing Content with Siteforce, and Introducing Database.com.</p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/10/winter-12-efficient-manageable-security-policies-with-permission-sets.html" target="_blank">Winter &#8217;12: Efficient, Manageable Security Policies with Permission Sets</a><br />
<a href="http://twitter.com/#!/sbob909" target="_blank">@sbob909</a><br />
Now in Winter &#8217;12, permission sets complement profiles.</p>
<p><a href="http://www.tgerm.com/2011/10/winter12-jsonparser-serialize.html" target="_blank">Parse JSON by one line of code using Winter &#8217;12 JSON API</a><br />
<a href="http://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a><br />
JsonParser is a new API addition to Apex Stack. Post explains how to simplify JSON operations using System.JSON API.</p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/10/visualforce-charting-in-winter-12.html" target="_blank">Visualforce Charting in Winter &#8217;12</a><br />
<a href="http://twitter.com/#!/cloudysan" target="_blank">@cloudysan</a><br />
More about Visualforce Charting, which allows you to develop custom and complex charts using standard Visualforce components.</p>
<p><a href="http://www.tgerm.com/2011/10/winter12-chatter-approval-salesforce.html" target="_blank">Winter &#8217;12 Social Approving of Records Using &#8216;Chatter Approvals&#8217;</a><br />
<a href="http://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a><br />
How Chatter Approvals can be social and fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2011/10/17/force-feed-10-17-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force Feed 10-3-2011</title>
		<link>http://blog.deliveredinnovation.com/2011/10/03/force-feed-6/</link>
		<comments>http://blog.deliveredinnovation.com/2011/10/03/force-feed-6/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 20:19:17 +0000</pubDate>
		<dc:creator>Delivered Innovation</dc:creator>
				<category><![CDATA[Cloud Architecture]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Salesforce.com]]></category>
		<category><![CDATA[VisualForce]]></category>
		<category><![CDATA[Winter '12]]></category>

		<guid isPermaLink="false">http://forcearchitects.deliveredinnovation.com/?p=1971</guid>
		<description><![CDATA[<strong>Overview of last week's Force.com and Salesforce articles.</strong> 

<a href="http://blogs.developerforce.com/tech-pubs/2011/09/new-object-reference-in-winter-12-release.html" target="_blank">New Object Reference in Winter '12 Release</a>
<a href="http://twitter.com/#!/forcedotcom" target="_blank">@forcedotcom</a>
Winter 12 release has new Object Reference to help you more easily find information about objects and fields. Preview it through the article.

<a href="http://blogs.developerforce.com/developer-relations/2011/09/using-binary-data-with-rest.html" target="_blank">Using Binary Data with REST</a>
<a href="http://twitter.com/#!/cloudysan" target="_blank">@cloudysan</a>
How to process binary data with Apex REST. 

<a href="http://www.tgerm.com/2011/09/connection-issues-with-salesforce.html" target="_blank">Fixing Connection Issues with Salesforce Servers in Browser &#038; Force.com IDE</a>
<a href="https://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a>
When working from various locations, sometimes connecting to Salesforce can be difficult. Try executing this command to flush the DNS cache (at least for Mac OS) to fix the problem. 

<a href="http://blogs.developerforce.com/developer-relations/2011/09/new-visualforce-features-in-winter-’12.html" target="_blank">New Visualforce Features in Winter '12</a>
<a href="http://twitter.com/#!/joshbirk" target="_blank">@joshbirk</a>
New Visualforce features in Winter 12 such as Visualforce Charting, JavaScript Remoting, and Custom Doctype. 

<a href="http://techblog.appirio.com/2011/09/make-any-salesforce-sobject-rest.html" target="_blank">Make Any Salesforce sObject REST-enabled</a>
<a href="http://twitter.com/#!/jeffdonthemic" target="_blank">@jeffdonthemic</a>
A short video outlining how to make any Salesforce sObject REST-enabled.

<a href="http://blogs.developerforce.com/developer-relations/2011/10/winter-12-updates-to-force-com-rest-and-streaming-apis.html" target="_blank">Winter '12 Updates to Force.com REST and Streaming APIs</a>
<a href="http://twitter.com/#!/metadaddy" target="_blank">@metadaddy</a>
Key changes in Winter 12 with REST API, JavaScript, and Streaming APIs. 

<a href="http://blogs.developerforce.com/developer-relations/2011/10/an-erd-is-worth-a-thousand-words-schema-builder-in-winter-12.html" target="_blank">An ERD is Worth a Thousand Words: Schema Builder in Winter '12</a>
<a href="http://twitter.com/#!/sbob909" target="_blank">@sbob909</a>
Schema Builder will be officially available in Winter 12, which makes visualizing and documenting Force.com and Database.com schemas easier.]]></description>
			<content:encoded><![CDATA[<p><strong>Overview of last week&#8217;s Force.com and Salesforce articles.</strong> </p>
<p><a href="http://blogs.developerforce.com/tech-pubs/2011/09/new-object-reference-in-winter-12-release.html" target="_blank">New Object Reference in Winter &#8217;12 Release</a><br />
<a href="http://twitter.com/#!/forcedotcom" target="_blank">@forcedotcom</a><br />
Winter 12 release has new Object Reference to help you more easily find information about objects and fields. Preview it through the article.</p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/09/using-binary-data-with-rest.html" target="_blank">Using Binary Data with REST</a><br />
<a href="http://twitter.com/#!/cloudysan" target="_blank">@cloudysan</a><br />
How to process binary data with Apex REST. </p>
<p><a href="http://www.tgerm.com/2011/09/connection-issues-with-salesforce.html" target="_blank">Fixing Connection Issues with Salesforce Servers in Browser &#038; Force.com IDE</a><br />
<a href="https://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a><br />
When working from various locations, sometimes connecting to Salesforce can be difficult. Try executing this command to flush the DNS cache (at least for Mac OS) to fix the problem. </p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/09/new-visualforce-features-in-winter-’12.html" target="_blank">New Visualforce Features in Winter &#8217;12</a><br />
<a href="http://twitter.com/#!/joshbirk" target="_blank">@joshbirk</a><br />
New Visualforce features in Winter 12 such as Visualforce Charting, JavaScript Remoting, and Custom Doctype. </p>
<p><a href="http://techblog.appirio.com/2011/09/make-any-salesforce-sobject-rest.html" target="_blank">Make Any Salesforce sObject REST-enabled</a><br />
<a href="http://twitter.com/#!/jeffdonthemic" target="_blank">@jeffdonthemic</a><br />
A short video outlining how to make any Salesforce sObject REST-enabled.</p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/10/winter-12-updates-to-force-com-rest-and-streaming-apis.html" target="_blank">Winter &#8217;12 Updates to Force.com REST and Streaming APIs</a><br />
<a href="http://twitter.com/#!/metadaddy" target="_blank">@metadaddy</a><br />
Key changes in Winter 12 with REST API, JavaScript, and Streaming APIs. </p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/10/an-erd-is-worth-a-thousand-words-schema-builder-in-winter-12.html" target="_blank">An ERD is Worth a Thousand Words: Schema Builder in Winter &#8217;12</a><br />
<a href="http://twitter.com/#!/sbob909" target="_blank">@sbob909</a><br />
Schema Builder will be officially available in Winter 12, which makes visualizing and documenting Force.com and Database.com schemas easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2011/10/03/force-feed-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force Feed 9-26-2011</title>
		<link>http://blog.deliveredinnovation.com/2011/09/26/force-feed-5/</link>
		<comments>http://blog.deliveredinnovation.com/2011/09/26/force-feed-5/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 16:26:03 +0000</pubDate>
		<dc:creator>Delivered Innovation</dc:creator>
				<category><![CDATA[Cloud Architecture]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[VisualForce]]></category>
		<category><![CDATA[Winter '12]]></category>

		<guid isPermaLink="false">http://forcearchitects.deliveredinnovation.com/?p=1955</guid>
		<description><![CDATA[<strong>A snapshot of all the Force.com and Salesforce related articles from the previous week.
</strong>

<a href="http://mysalesforcecode.blogspot.com/2011/09/validation-rules-using-and-or.html" target="_blank">Validation Rules Using 'AND' 'OR' Functionality Within Salesforce.com</a>
How to use 'and' and 'or' functionality within the Validation rule. 

<a href="http://www.tgerm.com/2011/09/apex-crud-fls-security-salesforce.html" target="_blank">Adding More CRUD FLS Security to Your Salesforce Apps with New "Validator" API</a>
<a href="https://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a>
Gupta discusses the a new Apex API, "Apex CRUD FLS Validator."

<a href="http://www.tgerm.com/2011/09/apex-systemrunas-different-profiles.html" target="_blank">Is Apex System.runAS() Not Resetting the Context for CRUD/FLS Changes in Profile?</a>
<a href="https://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a>
A possible bug in System.runAS().

<a href="http://blog.jeffdouglas.com/2011/09/24/video-connect-your-clouds-with-force-com-from-dreamforce-11/" target="_blank">Video-Connect Your Clouds with Force.com from Dreamforce 11</a>
<a href="http://twitter.com/#!/jeffdonthemic" target="_blank">@jeffdonthemic</a>
A video of Jeff Douglas's Dreamforce presentation about integrating Force.com apps with other cloud platforms. 

<a href="http://www.tgerm.com/2011/09/testing-apex-webservice-callout.html" target="_blank">Dependency Injection for Ease in Testing Apex WebService Callouts</a>
<a href="https://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a>
If you use Http Restful classes, testing the callouts is not allowed in Apex. Here are some ways to handle the restriction. 

<a href="http://www.forcetree.com/2011/09/sf-uploadify-cool-way-to-upload.html" target="_blank">SF Uploadify- A Cool Way to Upload Multiple Files in Salesforce</a>
<a href="http://twitter.com/#!/sfunearthed" target="_blank">@sfunearthed</a>
Uploadify is a great way to upload multiple files in Salesforce. 

<a href="http://blogs.developerforce.com/developer-relations/2011/09/search-suggestions-available-now-on-the-force-com-discusion-boards.html" target="_blank">Search Suggestions Available Now on the Force.com Discussion Boards</a>
<a href="http://twitter.com/#!/forcedotcom" target="_blank">@forcedotcom</a>
New search feature on the Force.com Discussion Board. 

<a href="http://forcebehindtheforce.com/2011/09/23/oh-the-weather-outside-hmm-not-quite-frightful/" target="_blank">Oh the Weather Outside... hmm, Not Quite Frightful...</a>
<a href="http://twitter.com/#!/sfdc_nerd" target="_blank">@sfdc_nerd</a>
A quick overview of new features in the Winter '12 release. 

<a href="http://blogs.developerforce.com/developer-relations/2011/09/using-oauth-2-0-with-visualforce-in-winter-12.html" target="_blank">Using OAuth 2.0 with Visualforce in Winter '12</a>
<a href="http://twitter.com/#!/cloudysan" target="_blank">@cloudysan</a>
Important OAuth 2.0 changes in Winter '12. 

<a href="http://blogs.salesforce.com/company/2011/09/salesforcecom-sustainability-named-in-2011-carbon-disclosure-leadership-index.html" target="_blank">Salesforce.com Sustainability Named in 2011 Carbon Disclosure Leadership Index</a>
<a href="http://twitter.com/#!/sue_amar" target="_blank">@sue_amar</a>
Salesforce received a score of 85 after reporting their carbon emissions to the Carbon Disclosure Project, and as a result were highlighted as a leader in mitigating climate change.

<a href="http://blogs.developerforce.com/developer-relations/2011/09/developing-visualforce-with-your-browser.html" target="_blank">Developing Visualforce with Your Browser</a>
<a href="http://twitter.com/#!/joshbirk" target="_blank">@joshbirk</a>
How to create a Visualforce page using just your browser.
]]></description>
			<content:encoded><![CDATA[<p><strong>A snapshot of all the Force.com and Salesforce related articles from the previous week.<br />
</strong></p>
<p><a href="http://mysalesforcecode.blogspot.com/2011/09/validation-rules-using-and-or.html" target="_blank">Validation Rules Using &#8216;AND&#8217; &#8216;OR&#8217; Functionality Within Salesforce.com</a><br />
How to use &#8216;and&#8217; and &#8216;or&#8217; functionality within the Validation rule. </p>
<p><a href="http://www.tgerm.com/2011/09/apex-crud-fls-security-salesforce.html" target="_blank">Adding More CRUD FLS Security to Your Salesforce Apps with New &#8220;Validator&#8221; API</a><br />
<a href="https://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a><br />
Gupta discusses the a new Apex API, &#8220;Apex CRUD FLS Validator.&#8221;</p>
<p><a href="http://www.tgerm.com/2011/09/apex-systemrunas-different-profiles.html" target="_blank">Is Apex System.runAS() Not Resetting the Context for CRUD/FLS Changes in Profile?</a><br />
<a href="https://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a><br />
A possible bug in System.runAS().</p>
<p><a href="http://blog.jeffdouglas.com/2011/09/24/video-connect-your-clouds-with-force-com-from-dreamforce-11/" target="_blank">Video-Connect Your Clouds with Force.com from Dreamforce 11</a><br />
<a href="http://twitter.com/#!/jeffdonthemic" target="_blank">@jeffdonthemic</a><br />
A video of Jeff Douglas&#8217;s Dreamforce presentation about integrating Force.com apps with other cloud platforms. </p>
<p><a href="http://www.tgerm.com/2011/09/testing-apex-webservice-callout.html" target="_blank">Dependency Injection for Ease in Testing Apex WebService Callouts</a><br />
<a href="https://twitter.com/#!/abhinavguptas" target="_blank">@abhinavguptas</a><br />
If you use Http Restful classes, testing the callouts is not allowed in Apex. Here are some ways to handle the restriction. </p>
<p><a href="http://www.forcetree.com/2011/09/sf-uploadify-cool-way-to-upload.html" target="_blank">SF Uploadify- A Cool Way to Upload Multiple Files in Salesforce</a><br />
<a href="http://twitter.com/#!/sfunearthed" target="_blank">@sfunearthed</a><br />
Uploadify is a great way to upload multiple files in Salesforce. </p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/09/search-suggestions-available-now-on-the-force-com-discusion-boards.html" target="_blank">Search Suggestions Available Now on the Force.com Discussion Boards</a><br />
<a href="http://twitter.com/#!/forcedotcom" target="_blank">@forcedotcom</a><br />
New search feature on the Force.com Discussion Board. </p>
<p><a href="http://forcebehindtheforce.com/2011/09/23/oh-the-weather-outside-hmm-not-quite-frightful/" target="_blank">Oh the Weather Outside&#8230; hmm, Not Quite Frightful&#8230;</a><br />
<a href="http://twitter.com/#!/sfdc_nerd" target="_blank">@sfdc_nerd</a><br />
A quick overview of new features in the Winter &#8217;12 release. </p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/09/using-oauth-2-0-with-visualforce-in-winter-12.html" target="_blank">Using OAuth 2.0 with Visualforce in Winter &#8217;12</a><br />
<a href="http://twitter.com/#!/cloudysan" target="_blank">@cloudysan</a><br />
Important OAuth 2.0 changes in Winter &#8217;12. </p>
<p><a href="http://blogs.salesforce.com/company/2011/09/salesforcecom-sustainability-named-in-2011-carbon-disclosure-leadership-index.html" target="_blank">Salesforce.com Sustainability Named in 2011 Carbon Disclosure Leadership Index</a><br />
<a href="http://twitter.com/#!/sue_amar" target="_blank">@sue_amar</a><br />
Salesforce received a score of 85 after reporting their carbon emissions to the Carbon Disclosure Project, and as a result were highlighted as a leader in mitigating climate change.</p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/09/developing-visualforce-with-your-browser.html" target="_blank">Developing Visualforce with Your Browser</a><br />
<a href="http://twitter.com/#!/joshbirk" target="_blank">@joshbirk</a><br />
How to create a Visualforce page using just your browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2011/09/26/force-feed-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force Feed 9-19-2011</title>
		<link>http://blog.deliveredinnovation.com/2011/09/19/force-feed-4/</link>
		<comments>http://blog.deliveredinnovation.com/2011/09/19/force-feed-4/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 15:59:35 +0000</pubDate>
		<dc:creator>Delivered Innovation</dc:creator>
				<category><![CDATA[Cloud Architecture]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[VisualForce]]></category>
		<category><![CDATA[Winter '12]]></category>

		<guid isPermaLink="false">http://forcearchitects.deliveredinnovation.com/?p=1929</guid>
		<description><![CDATA[<strong>A quick, straightforward summary of all the Force.com and Salesforce posts from the previous week.
</strong>
<a href="http://blogs.developerforce.com/tech-pubs/2011/09/introducing-visualforce-charting.html" target="_blank">A Quick Look at Visualforce Charting</a>
<a href="http://twitter.com/#!/Alderete_SFDC" target="_blank">@Alderete_SFDC</a>
A look at Visualforce charting, a way for you to create custom business charts (pie, line, and chart) on your Visualforce pages. 

<a href="http://blogs.developerforce.com/developer-relations/2011/09/new-developer-console-in-winter-12.html" target="_blank">New Developer Console in Winter 12</a>
<a href="http://twitter.com/#!/cloudysan" target="_blank">@cloudysan</a>
It's a new edition of salesforce.com, and the developer console looks different.


<a href="http://www.forcedotcom.com/2011/09/forcecom-quick-access-menu-winter-12.html" target="_blank">Force.com Quick Access Menu- Winter '12</a>
Salesforce released Winter '12 this weekend. Force.com Quick Access Menu is a new feature which offers shortcuts to customization features. 

<a href="http://www.forcetree.com/2011/09/radiobutton-in-datatable-in-visualforce.html" target="_blank">Radiobutton in a Datatable in Visualforce Page</a>
<a href="http://twitter.com/#!/sfunearthed" target="_blank">@sfunearthed</a>
An example of using radio button in a visualforce table that allows you to select one of the records in the table.

<a href="http://www.forcetree.com/2011/09/how-to-embed-chatter-in-visualforce.html" target="_blank">How to Embed Chatter in a Visualforce Page or as a Sidebar Component?</a>
<a href="http://twitter.com/#!/sfunearthed" target="_blank">@sfunearthed</a>
A sample Visualforce page using the Chatter component. 

<a href="http://www.forcetree.com/2011/09/how-to-fetch-page-paramters-directly-in.html" target="_blank">How to Fetch Page Paramters Directly in Visualforce Page?</a>
<a href="http://twitter.com/#!/sfunearthed" target="_blank">@sfunearthed</a>
Forcetree is on top of the tips this week. How to fetch the parameter value directly in your Visualforce page instead of getting it from the controller.]]></description>
			<content:encoded><![CDATA[<p><strong>A quick, straightforward summary of all the Force.com and Salesforce posts from the previous week.<br />
</strong><br />
<a href="http://blogs.developerforce.com/tech-pubs/2011/09/introducing-visualforce-charting.html" target="_blank">A Quick Look at Visualforce Charting</a><br />
<a href="http://twitter.com/#!/Alderete_SFDC" target="_blank">@Alderete_SFDC</a><br />
A look at Visualforce charting, a way for you to create custom business charts (pie, line, and chart) on your Visualforce pages. </p>
<p><a href="http://blogs.developerforce.com/developer-relations/2011/09/new-developer-console-in-winter-12.html" target="_blank">New Developer Console in Winter 12</a><br />
<a href="http://twitter.com/#!/cloudysan" target="_blank">@cloudysan</a><br />
It&#8217;s a new edition of salesforce.com, and the developer console looks different.</p>
<p><a href="http://www.forcedotcom.com/2011/09/forcecom-quick-access-menu-winter-12.html" target="_blank">Force.com Quick Access Menu- Winter &#8217;12</a><br />
Salesforce released Winter &#8217;12 this weekend. Force.com Quick Access Menu is a new feature which offers shortcuts to customization features. </p>
<p><a href="http://www.forcetree.com/2011/09/radiobutton-in-datatable-in-visualforce.html" target="_blank">Radiobutton in a Datatable in Visualforce Page</a><br />
<a href="http://twitter.com/#!/sfunearthed" target="_blank">@sfunearthed</a><br />
An example of using radio button in a visualforce table that allows you to select one of the records in the table.</p>
<p><a href="http://www.forcetree.com/2011/09/how-to-embed-chatter-in-visualforce.html" target="_blank">How to Embed Chatter in a Visualforce Page or as a Sidebar Component?</a><br />
<a href="http://twitter.com/#!/sfunearthed" target="_blank">@sfunearthed</a><br />
A sample Visualforce page using the Chatter component. </p>
<p><a href="http://www.forcetree.com/2011/09/how-to-fetch-page-paramters-directly-in.html" target="_blank">How to Fetch Page Paramters Directly in Visualforce Page?</a><br />
<a href="http://twitter.com/#!/sfunearthed" target="_blank">@sfunearthed</a><br />
Forcetree is on top of the tips this week. How to fetch the parameter value directly in your Visualforce page instead of getting it from the controller. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2011/09/19/force-feed-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DI Launches New Force.com Sites Website, Built and Hosted on the Force.com Platform</title>
		<link>http://blog.deliveredinnovation.com/2011/03/11/di-launches-new-force-com-sites-website-built-and-hosted-on-the-force-com-platform/</link>
		<comments>http://blog.deliveredinnovation.com/2011/03/11/di-launches-new-force-com-sites-website-built-and-hosted-on-the-force-com-platform/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 20:34:32 +0000</pubDate>
		<dc:creator>Delivered Innovation</dc:creator>
				<category><![CDATA[Delivered Innovation News & Events]]></category>
		<category><![CDATA[Salesforce Architecture]]></category>
		<category><![CDATA[Apex code]]></category>
		<category><![CDATA[Chatter]]></category>
		<category><![CDATA[Delivered Innovation News]]></category>
		<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[Force.com Sites]]></category>
		<category><![CDATA[Salesforce.com]]></category>
		<category><![CDATA[VisualForce]]></category>

		<guid isPermaLink="false">http://forcearchitects.deliveredinnovation.com/?p=1414</guid>
		<description><![CDATA[<div>
<h2>Delivered Innovation Launches New Force.com Sites Website, Built and Hosted on the Force.com Platform</h2>
<a title="Salesforce, Force.com, and Cloud Computing system design" href="http://www.deliveredinnovation.com" target="_blank">Delivered Innovation</a>, a salesforce.com Registered Consulting Partner and Force.com ISV Partner, has launched a new company website designed and developed exclusively on the Force.com cloud computing platform. <a title="Force.com Sites" href="http://www.deliveredinnovation.com/delivered-innovation-salesforce-force-com-cloud-architecture-design/siteforce-website-force-com-sites-extjs" target="_blank">Force.com Sites</a> enables companies like DI to design, build, and host their own websites on the Force.com platform from salesforce.com. DI made the decision to move its company website to Force.com Sites to create a showcase for Salesforce and Force.com design and development that we can provide for our growing customer base.

The site leverages Force.com technology such as VisualForce, Apex code, and a content management system (CMS) designed using a custom Force.com data model. The user interface was designed using the ExtJS framework to create a rich cross-browser user experience. All of the content is written in 140-character “tweets” that include #hashtags and @mentions to not only create an experience that will be familiar to Twitter and Chatter users, but to keep content brief and to the point.

Force.com platform technology used in the new <a href="http://www.deliveredinnovation.com/">deliveredinnovation.com</a> includes:
<ul>
	<li>Force.com Sites for hosting <a href="http://www.deliveredinnovation.com/">deliveredinnovation.com</a></li>
	<li>Force.com Sites for URL redirects</li>
	<li>Force.com Custom Objects for the content management system</li>
	<li>One VisualForce Page to render all pages in the site</li>
	<li>Custom controller written in Apex</li>
	<li>Apex URL rewrite class to generate search engine-friendly URLs</li>
	<li>Apex custom web form handler class to collect and process leads generated by website</li>
	<li>Apex custom RSS feed reader class</li>
	<li>Custom Apex class and VisualForce page to render XML Sitemap</li>
</ul>
The custom user user interface was created using the <a title="ExtJS" href="http://www.sencha.com/products/extjs/" target="_blank" rel="nofollow">ExtJS 3.3</a> rich Internet application framework from Sencha, Inc. Delivered Innovation has standardized on ExtJS for building custom Salesforce and Force.com application user interfaces.
<h5>About Delivered Innovation</h5>
<ul>
	<li>Our mission is to help you leverage the power of cloud computing to generate new business and do business in new ways.</li>
	<li>DI works with innovative companies that understand cloud computing drives breakthrough business results and provides a competitive edge.</li>
	<li>We were founded in 2006 by CTO Michael Topalovich and have completed over 100 successful projects for customers worldwide.</li>
</ul>
<h5>About salesforce.com</h5>
<ul>
	<li>Salesforce.com is the leading enterprise cloud computing company, with products such as Salesforce CRM (customer relationship management) and the Force.com platform.</li>
	<li>Salesforce enables the Sales Cloud and the Service Cloud, applications for sales, customer service and CRM.</li>
</ul>
<h5>Additional Resources</h5>
<ul>
	<li>Visit the new Delivered Innovation website: <a href="http://www.deliveredinnovation.com" target="_blank">http://www.deliveredinnovation.com</a></li>
	<li>Follow DI on Twitter: <a href="http://www.deliveredinnovation.com/twitter" target="_blank">http://www.deliveredinnovation.com/twitter</a></li>
	<li>Follow DI on Tumblr: <a href="http://www.deliveredinnovation.com/tumblr" target="_blank">http://www.deliveredinnovation.com/tumblr</a></li>
	<li>Like DI on Facebook: <a href="http://www.deliveredinnovation.com/facebook" target="_blank">http://www.deliveredinnovation.com/facebook</a></li>
	<li>For more information about salesforce.com, visit: <a href="http://www.salesforce.com/company/"target="_blank" rel="nofollow">http://www.salesforce.com/company/</a></li>
	<li>For more information about Force.com, visit: <a href="http://www.salesforce.com/platform/"target="_blank" rel="nofollow">http://www.salesforce.com/platform/</a></li>
</ul>
To learn more about our experience with Force.com Sites, please visit the new website at <a href="http://www.deliveredinnovation.com/">http://www.deliveredinnovation.com</a> and click the ‘Contact DI’ button, send us a DM @<a href="http://twitter.com/forcearchitects" target="_blank">forcearchitects</a>, drop us an email at info [at] deliveredinnovation.com, or call us at 888.645.2604. Our CTO, Michael Topalovich, will be posting a lessons learned post mortem piece on the blog within the next few weeks.

</div>]]></description>
			<content:encoded><![CDATA[<div>
<h2>Delivered Innovation Launches New Force.com Sites Website, Built and Hosted on the Force.com Platform</h2>
<p><a title="Salesforce, Force.com, and Cloud Computing system design" href="http://www.deliveredinnovation.com" target="_blank">Delivered Innovation</a>, a salesforce.com Registered Consulting Partner and Force.com ISV Partner, has launched a new company website designed and developed exclusively on the Force.com cloud computing platform. <a title="Force.com Sites" href="http://www.deliveredinnovation.com/delivered-innovation-salesforce-force-com-cloud-architecture-design/siteforce-website-force-com-sites-extjs" target="_blank">Force.com Sites</a> enables companies like DI to design, build, and host their own websites on the Force.com platform from salesforce.com. DI made the decision to move its company website to Force.com Sites to create a showcase for Salesforce and Force.com design and development that we can provide for our growing customer base.</p>
<p>The site leverages Force.com technology such as VisualForce, Apex code, and a content management system (CMS) designed using a custom Force.com data model. The user interface was designed using the ExtJS framework to create a rich cross-browser user experience. All of the content is written in 140-character “tweets” that include #hashtags and @mentions to not only create an experience that will be familiar to Twitter and Chatter users, but to keep content brief and to the point.</p>
<p>Force.com platform technology used in the new <a href="http://www.deliveredinnovation.com/">deliveredinnovation.com</a> includes:</p>
<ul>
<li>Force.com Sites for hosting <a href="http://www.deliveredinnovation.com/">deliveredinnovation.com</a></li>
<li>Force.com Sites for URL redirects</li>
<li>Force.com Custom Objects for the content management system</li>
<li>One VisualForce Page to render all pages in the site</li>
<li>Custom controller written in Apex</li>
<li>Apex URL rewrite class to generate search engine-friendly URLs</li>
<li>Apex custom web form handler class to collect and process leads generated by website</li>
<li>Apex custom RSS feed reader class</li>
<li>Custom Apex class and VisualForce page to render XML Sitemap</li>
</ul>
<p>The custom user user interface was created using the <a title="ExtJS" rel="nofollow" href="http://www.sencha.com/products/extjs/" target="_blank">ExtJS 3.3</a> rich Internet application framework from Sencha, Inc. Delivered Innovation has standardized on ExtJS for building custom Salesforce and Force.com application user interfaces.</p>
<h5>About Delivered Innovation</h5>
<ul>
<li>Our mission is to help you leverage the power of cloud computing to generate new business and do business in new ways.</li>
<li>DI works with innovative companies that understand cloud computing drives breakthrough business results and provides a competitive edge.</li>
<li>We were founded in 2006 by CTO Michael Topalovich and have completed over 100 successful projects for customers worldwide.</li>
</ul>
<h5>About salesforce.com</h5>
<ul>
<li>Salesforce.com is the leading enterprise cloud computing company, with products such as Salesforce CRM (customer relationship management) and the Force.com platform.</li>
<li>Salesforce enables the Sales Cloud and the Service Cloud, applications for sales, customer service and CRM.</li>
</ul>
<h5>Additional Resources</h5>
<ul>
<li>Visit the new Delivered Innovation website: <a href="http://www.deliveredinnovation.com" target="_blank">http://www.deliveredinnovation.com</a></li>
<li>Follow DI on Twitter: <a href="http://www.deliveredinnovation.com/twitter" target="_blank">http://www.deliveredinnovation.com/twitter</a></li>
<li>Follow DI on Tumblr: <a href="http://www.deliveredinnovation.com/tumblr" target="_blank">http://www.deliveredinnovation.com/tumblr</a></li>
<li>Like DI on Facebook: <a href="http://www.deliveredinnovation.com/facebook" target="_blank">http://www.deliveredinnovation.com/facebook</a></li>
<li>For more information about salesforce.com, visit: <a rel="nofollow" href="http://www.salesforce.com/company/" target="_blank">http://www.salesforce.com/company/</a></li>
<li>For more information about Force.com, visit: <a rel="nofollow" href="http://www.salesforce.com/platform/" target="_blank">http://www.salesforce.com/platform/</a></li>
</ul>
<p>To learn more about our experience with Force.com Sites, please visit the new website at <a href="http://www.deliveredinnovation.com/">http://www.deliveredinnovation.com</a> and click the ‘Contact DI’ button, send us a DM @<a href="http://twitter.com/forcearchitects" target="_blank">forcearchitects</a>, drop us an email at info [at] deliveredinnovation.com, or call us at 888.645.2604. Our CTO, Michael Topalovich, will be posting a lessons learned post mortem piece on the blog within the next few weeks.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2011/03/11/di-launches-new-force-com-sites-website-built-and-hosted-on-the-force-com-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Render VisualForce Components Dynamically Based on Object Level Security</title>
		<link>http://blog.deliveredinnovation.com/2011/02/05/render-visualforce-components-dynamically-based-on-object-level-security/</link>
		<comments>http://blog.deliveredinnovation.com/2011/02/05/render-visualforce-components-dynamically-based-on-object-level-security/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 07:36:20 +0000</pubDate>
		<dc:creator>Michael Topalovich</dc:creator>
				<category><![CDATA[Force.com Platform Tips]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Salesforce.com]]></category>
		<category><![CDATA[VisualForce]]></category>

		<guid isPermaLink="false">http://forcearchitects.deliveredinnovation.com/?p=1239</guid>
		<description><![CDATA[We recently came across an interesting situation that I'm sure many Force.com developers have faced at one point or another:  While using VisualForce with standard controllers in the context of a single object gives you access to a fair number of useful standard components exposed by the platform, when you venture beyond the single object or require functionality beyond what the platform gives you "out-of-the-box," the custom code can pile up fast.

The specific use case that we had to address dealt with dynamically exposing components on the VisualForce page based on the object level security of the logged in user's profile - in this case, it was buttons (<strong><em>apex:commandButton</em></strong>) and links (<strong><em>apex:commandLink</em></strong>). Because we were displaying input fields (<strong><em>apex:inputField</em></strong>) and output fields (<strong><em>apex:outputField</em></strong>) from a number of different custom objects, and because the actions corresponding to these buttons and links were custom PageReference methods that did a lot of data manipulation, we couldn't simply reference standard actions such as <em><strong>{!save}</strong></em>.  And because not every user had access to the CRUD function associated with a given custom button or link, we wanted to only show them buttons and links that corresponded to an action that they could actually perform, rather than leading the user down a path that would ultimately throw an exception and frustrate them.

We knew we could write a fairly complex set of sObject describe methods that would populate boolean variables which we could then reference in the <strong><em>redered="xxxx"</em></strong> attribute of the button and link definitions, but there had to be a better solution - we weren't looking for a shortcut, but we didn't want to leave the client with a ton of code that would be difficult to maintain and update over time. The solution ended up being elegant and straightforward, and leveraged a VisualForce global variable called <em><strong>$ObjectType</strong></em> that we didn't realize was as powerful as it turned out to be.

The VisualForce documentation doesn't do $ObjectType justice:
<blockquote>A global merge field type to use when referencing standard or custom objects such as accounts, cases, or opportunities as well as the value of a field on that object.</blockquote>
What salesforce.com should state in the documentation is that the $ObjectType is essentially a way to perform sObject describes natively in the context of the VisualForce page, without having to write a single line of custom controller or controller extension code.  It's a pretty powerful function, and the only reason we went down the path of using it as a replacement for complex sObject describe methods is that we came across<strong> <a href="http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_controller_std_checking_accessibility.htm?SearchType=Stem" target="_blank">this page</a></strong> in the VisualForce Developer's Guide, and thought to ourselves that if we could check object accessibility using <strong><em>$ObjectType.accessible</em></strong>, which looks a lot like the '<strong><em>isAccessible</em></strong>' sObject describe result method, then we might be able to use the similar nomenclature to check for object editability, deletability, etc.  This turned out to be the case, and we had our solution.

So let's say you want to have a 'New' button on your VisualForce page that corresponded to a custom PageReference method called 'newRecord', and you only wanted that button to be visible to users that had 'Create' access on the corresponding standard or custom object.  What you want to do is something like this:
<span style="font-family: monospace;">
<code>&#60;apex:commandButton action="{!newRecord}" value="New" rendered="{!$ObjectType.myCustomObject__c.createable}" /&#62;</code>
</span>
Using $ObjectType.objectName.createable returns a boolean (true/false) value that tells you whether the logged in user has the ability to create (the 'C' in CRUD) new records for the 'myCustomObject__c' custom object.  If the user does not have the necessary object level security, the expression will return 'False' and the component will not render.  If the user does have Create access, then the button will render because the expression will return 'True.'

While we did not test this method with every possible sObject describe method, we did use it to create an 'Action' column to mimic the standard 'Edit  &#124;  Del' pattern that you see on standard Salesforce list views, so we know for sure that you can check the ability to access, create, edit, and delete records for a given object.  The VisualForce code looks something like this:

<span style="font-family: monospace;">
</span>

<code>
<div id="_mcePaste">&#60;apex:pageBlockTable value="{!getSomeRecords}" var="r" cellpadding="8"&#62;</div>
<div id="_mcePaste">&#60;apex:column width="10%" &#62;</div>
<div id="_mcePaste" style="padding-left: 30px;">&#60;apex:facet name="header"&#62;&#60;b&#62;Action&#60;/b&#62;&#60;/apex:facet&#62;</div>
<div id="_mcePaste" style="padding-left: 30px;">&#60;apex:commandLink action="{!myCustomEditLink}" rendered="<span style="color: #ff0000;">{!$ObjectType.myCustomObject__c.updateable}</span>"&#62;</div>
<div id="_mcePaste" style="padding-left: 60px;">&#60;apex:outputText value="Edit"/&#62;</div>
<div id="_mcePaste" style="padding-left: 60px;">&#60;apex:param name="editId" value="{!r.id}"/&#62;</div>
<div id="_mcePaste" style="padding-left: 30px;">&#60;/apex:commandLink&#62;</div>
<div id="_mcePaste" style="padding-left: 30px;">&#60;apex:outputText value=" &#124; " rendered="<span style="color: #ff0000;">{!$ObjectType.myCustomObject__c.updateable &#38;&#38; $ObjectType.myCustomObject__c.deletable}</span>"/&#62;</div>
<div id="_mcePaste" style="padding-left: 30px;">&#60;apex:commandLink action="{!deploymentDelete}" onclick="return confirm('Are you sure?');" rendered="<span style="color: #ff0000;">{!$ObjectType.Deployments__c.deletable}</span>"&#62;</div>
<div id="_mcePaste" style="padding-left: 60px;">&#60;apex:outputText value="Del" /&#62;</div>
<div id="_mcePaste" style="padding-left: 60px;">&#60;apex:param name="deleteId" value="{!r.id}"/&#62;</div>
<div id="_mcePaste" style="padding-left: 30px;">&#60;/apex:commandLink&#62;</div>
<div id="_mcePaste">&#60;/apex:column&#62;</div>
</code>

<code><strong><em>and so on...</em></strong></code>

As you can see, we were able to dynamically render the 'Edit' and 'Del' links, as well as the ' &#124; ' spacing character all based on the CRUD / object level access of the user accessing the VisualForce page.  This saved us a lot of time, and will be fairly straightforward to maintain and update over time.

Here's a little cheat sheet:

Show a component only if the user has '<strong><em>Create</em></strong>' access to an object:

<span style="font-family: monospace;">&#60;apex:commandButton action="{!newRecord}" value="New" rendered="{!$ObjectType.myCustomObject__c.createable}" /&#62;</span>

Show a component only if the user has '<strong><em>Edit</em></strong>' access to an object:

<span style="font-family: monospace;">&#60;apex:commandButton action="{!editRecord}" value="Edit" rendered="{!$ObjectType.myCustomObject__c.updateable}" /&#62;</span>

Show a component only if the user has '<strong><em>Delete</em></strong>' access to an object:

<span style="font-family: monospace;">&#60;apex:commandButton action="{!deleteRecord}" value="Delete" rendered="{!$ObjectType.myCustomObject__c.deletable}" /&#62;</span>

Note: An alternative solution can be found<strong> <a href="http://wiki.developerforce.com/index.php/Enforcing_CRUD_and_FLS" target="_blank">here</a></strong>.]]></description>
			<content:encoded><![CDATA[<p>We recently came across an interesting situation that I&#8217;m sure many Force.com developers have faced at one point or another:  While using VisualForce with standard controllers in the context of a single object gives you access to a fair number of useful standard components exposed by the platform, when you venture beyond the single object or require functionality beyond what the platform gives you &#8220;out-of-the-box,&#8221; the custom code can pile up fast.</p>
<p>The specific use case that we had to address dealt with dynamically exposing components on the VisualForce page based on the object level security of the logged in user&#8217;s profile &#8211; in this case, it was buttons (<strong><em>apex:commandButton</em></strong>) and links (<strong><em>apex:commandLink</em></strong>). Because we were displaying input fields (<strong><em>apex:inputField</em></strong>) and output fields (<strong><em>apex:outputField</em></strong>) from a number of different custom objects, and because the actions corresponding to these buttons and links were custom PageReference methods that did a lot of data manipulation, we couldn&#8217;t simply reference standard actions such as <em><strong>{!save}</strong></em>.  And because not every user had access to the CRUD function associated with a given custom button or link, we wanted to only show them buttons and links that corresponded to an action that they could actually perform, rather than leading the user down a path that would ultimately throw an exception and frustrate them.</p>
<p>We knew we could write a fairly complex set of sObject describe methods that would populate boolean variables which we could then reference in the <strong><em>redered=&#8221;xxxx&#8221;</em></strong> attribute of the button and link definitions, but there had to be a better solution &#8211; we weren&#8217;t looking for a shortcut, but we didn&#8217;t want to leave the client with a ton of code that would be difficult to maintain and update over time. The solution ended up being elegant and straightforward, and leveraged a VisualForce global variable called <em><strong>$ObjectType</strong></em> that we didn&#8217;t realize was as powerful as it turned out to be.</p>
<p>The VisualForce documentation doesn&#8217;t do $ObjectType justice:</p>
<blockquote><p>A global merge field type to use when referencing standard or custom objects such as accounts, cases, or opportunities as well as the value of a field on that object.</p></blockquote>
<p>What salesforce.com should state in the documentation is that the $ObjectType is essentially a way to perform sObject describes natively in the context of the VisualForce page, without having to write a single line of custom controller or controller extension code.  It&#8217;s a pretty powerful function, and the only reason we went down the path of using it as a replacement for complex sObject describe methods is that we came across<strong> <a href="http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_controller_std_checking_accessibility.htm?SearchType=Stem" target="_blank">this page</a></strong> in the VisualForce Developer&#8217;s Guide, and thought to ourselves that if we could check object accessibility using <strong><em>$ObjectType.accessible</em></strong>, which looks a lot like the &#8216;<strong><em>isAccessible</em></strong>&#8216; sObject describe result method, then we might be able to use the similar nomenclature to check for object editability, deletability, etc.  This turned out to be the case, and we had our solution.</p>
<p>So let&#8217;s say you want to have a &#8216;New&#8217; button on your VisualForce page that corresponded to a custom PageReference method called &#8216;newRecord&#8217;, and you only wanted that button to be visible to users that had &#8216;Create&#8217; access on the corresponding standard or custom object.  What you want to do is something like this:<br />
<span style="font-family: monospace;"><br />
<code>&lt;apex:commandButton action="{!newRecord}" value="New" rendered="{!$ObjectType.myCustomObject__c.createable}" /&gt;</code><br />
</span><br />
Using $ObjectType.objectName.createable returns a boolean (true/false) value that tells you whether the logged in user has the ability to create (the &#8216;C&#8217; in CRUD) new records for the &#8216;myCustomObject__c&#8217; custom object.  If the user does not have the necessary object level security, the expression will return &#8216;False&#8217; and the component will not render.  If the user does have Create access, then the button will render because the expression will return &#8216;True.&#8217;</p>
<p>While we did not test this method with every possible sObject describe method, we did use it to create an &#8216;Action&#8217; column to mimic the standard &#8216;Edit  |  Del&#8217; pattern that you see on standard Salesforce list views, so we know for sure that you can check the ability to access, create, edit, and delete records for a given object.  The VisualForce code looks something like this:</p>
<p><span style="font-family: monospace;"><br />
</span></p>
<p><code></p>
<div id="_mcePaste">&lt;apex:pageBlockTable value="{!getSomeRecords}" var="r" cellpadding="8"&gt;</div>
<div id="_mcePaste">&lt;apex:column width="10%" &gt;</div>
<div id="_mcePaste" style="padding-left: 30px;">&lt;apex:facet name="header"&gt;&lt;b&gt;Action&lt;/b&gt;&lt;/apex:facet&gt;</div>
<div id="_mcePaste" style="padding-left: 30px;">&lt;apex:commandLink action="{!myCustomEditLink}" rendered="<span style="color: #ff0000;">{!$ObjectType.myCustomObject__c.updateable}</span>"&gt;</div>
<div id="_mcePaste" style="padding-left: 60px;">&lt;apex:outputText value="Edit"/&gt;</div>
<div id="_mcePaste" style="padding-left: 60px;">&lt;apex:param name="editId" value="{!r.id}"/&gt;</div>
<div id="_mcePaste" style="padding-left: 30px;">&lt;/apex:commandLink&gt;</div>
<div id="_mcePaste" style="padding-left: 30px;">&lt;apex:outputText value=" | " rendered="<span style="color: #ff0000;">{!$ObjectType.myCustomObject__c.updateable &amp;&amp; $ObjectType.myCustomObject__c.deletable}</span>"/&gt;</div>
<div id="_mcePaste" style="padding-left: 30px;">&lt;apex:commandLink action="{!deploymentDelete}" onclick="return confirm('Are you sure?');" rendered="<span style="color: #ff0000;">{!$ObjectType.Deployments__c.deletable}</span>"&gt;</div>
<div id="_mcePaste" style="padding-left: 60px;">&lt;apex:outputText value="Del" /&gt;</div>
<div id="_mcePaste" style="padding-left: 60px;">&lt;apex:param name="deleteId" value="{!r.id}"/&gt;</div>
<div id="_mcePaste" style="padding-left: 30px;">&lt;/apex:commandLink&gt;</div>
<div id="_mcePaste">&lt;/apex:column&gt;</div>
<p></code></p>
<p><code><strong><em>and so on...</em></strong></code></p>
<p>As you can see, we were able to dynamically render the &#8216;Edit&#8217; and &#8216;Del&#8217; links, as well as the &#8216; | &#8216; spacing character all based on the CRUD / object level access of the user accessing the VisualForce page.  This saved us a lot of time, and will be fairly straightforward to maintain and update over time.</p>
<p>Here&#8217;s a little cheat sheet:</p>
<p>Show a component only if the user has &#8216;<strong><em>Create</em></strong>&#8216; access to an object:</p>
<p><span style="font-family: monospace;">&lt;apex:commandButton action=&#8221;{!newRecord}&#8221; value=&#8221;New&#8221; rendered=&#8221;{!$ObjectType.myCustomObject__c.createable}&#8221; /&gt;</span></p>
<p>Show a component only if the user has &#8216;<strong><em>Edit</em></strong>&#8216; access to an object:</p>
<p><span style="font-family: monospace;">&lt;apex:commandButton action=&#8221;{!editRecord}&#8221; value=&#8221;Edit&#8221; rendered=&#8221;{!$ObjectType.myCustomObject__c.updateable}&#8221; /&gt;</span></p>
<p>Show a component only if the user has &#8216;<strong><em>Delete</em></strong>&#8216; access to an object:</p>
<p><span style="font-family: monospace;">&lt;apex:commandButton action=&#8221;{!deleteRecord}&#8221; value=&#8221;Delete&#8221; rendered=&#8221;{!$ObjectType.myCustomObject__c.deletable}&#8221; /&gt;</span></p>
<p>Note: An alternative solution can be found<strong> <a href="http://wiki.developerforce.com/index.php/Enforcing_CRUD_and_FLS" target="_blank">here</a></strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2011/02/05/render-visualforce-components-dynamically-based-on-object-level-security/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create VisualForce Tab to Display Static List View for Standard or Custom Object</title>
		<link>http://blog.deliveredinnovation.com/2010/06/01/create-visualforce-tab-to-display-static-list-view-for-standard-or-custom-object/</link>
		<comments>http://blog.deliveredinnovation.com/2010/06/01/create-visualforce-tab-to-display-static-list-view-for-standard-or-custom-object/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 16:19:53 +0000</pubDate>
		<dc:creator>Michael Topalovich</dc:creator>
				<category><![CDATA[Force.com Platform Tips]]></category>
		<category><![CDATA[Custom Tab]]></category>
		<category><![CDATA[Custom View]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[Salesforce.com]]></category>
		<category><![CDATA[VisualForce]]></category>

		<guid isPermaLink="false">http://www.forcetips.com/?p=45</guid>
		<description><![CDATA[<strong>Use Case:</strong>

<strong> </strong>You would like to create a custom tab to display a specific list view for a standard or custom object rather than use the standard tab view that only displays recently viewed records.

<strong>Solution:</strong>
<ol>
	<li>From the standard or custom object tab, Edit an existing view or 'Create New View.'</li>
	<li>Ensure that you give the view a Name, that you specify filter criteria, that you select the fields to display, and that you restrict visibility as necessary.</li>
	<li>When the view has been saved and you are returned to the tab, select the view from the dropdown.</li>
	<li>Copy the 15-character view ID in the URL and paste it to Notepad, or write it down.</li>
	<li>Create a new VisualForce page (Setup / App Setup / Develop / Pages) using the sample code provided below.</li>
	<li>Create a new VisualForce tab (Setup / App Setup / Create / Tabs) and select the VisualForce Page created in Step #5, provide a Tab Label, Tab Name, and Tab Style, and then apply the desired profile visibility for the new tab.</li>
	<li>Optional - hide the tab for the standard or custom object if your new tab is a replacement for the default tab.</li>
	<li>If you want to change the View that is displayed in the tab at any time, simply navigate back to the standard tab for the object and Edit the view to meet requirements.</li>
</ol>
<h2>The VisualForce Page code:</h2>
<div id="_mcePaste"><em>Note: Replace "</em><span style="font-family: 'Courier New', Courier, monospace; line-height: 18px; color: #ff0000;"><em>xxxxxxxxxxxxxxx</em></span><em>" with the 15-character ID of the View that you captured in Step #4 above.  You can adjust the 'height', 'customizable', and 'rowsPerPage' values as desired.</em></div>
<code> </code>

<code>
<div>&#60;apex:page &#62;</div>
<div id="_mcePaste" style="padding-left: 30px;">&#60;apex:enhancedList listId="<span style="font-family: 'Courier New', Courier, monospace; line-height: 18px; color: #ff0000;">xxxxxxxxxxxxxxx</span>" height="600" customizable="false" rowsPerPage="25"/&#62;</div>
<div id="_mcePaste">&#60;/apex:page&#62;</div>
</code>

<strong>Tip submitted by:</strong>

<a title="Michael Topalovich" href="http://www.linkedin.com/in/topalovich" target="_blank">Michael Topalovich</a>
<a title="Force.com application design &#38; architecture" href="http://www.deliveredinnovation.com" target="_blank">Delivered Innovation</a>

<a title="Force.com application architecture and design" href="http://www.deliveredinnovation.com" target="_blank"><img title="Force.com application architecture and design" src="http://forcearchitects.deliveredinnovation.com/wp-content/uploads/2010/06/Delivered_Innovation_234_100.png" alt="" width="234" height="100" /></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Use Case:</strong></p>
<p><strong> </strong>You would like to create a custom tab to display a specific list view for a standard or custom object rather than use the standard tab view that only displays recently viewed records.</p>
<p><strong>Solution:</strong></p>
<ol>
<li>From the standard or custom object tab, Edit an existing view or &#8216;Create New View.&#8217;</li>
<li>Ensure that you give the view a Name, that you specify filter criteria, that you select the fields to display, and that you restrict visibility as necessary.</li>
<li>When the view has been saved and you are returned to the tab, select the view from the dropdown.</li>
<li>Copy the 15-character view ID in the URL and paste it to Notepad, or write it down.</li>
<li>Create a new VisualForce page (Setup / App Setup / Develop / Pages) using the sample code provided below.</li>
<li>Create a new VisualForce tab (Setup / App Setup / Create / Tabs) and select the VisualForce Page created in Step #5, provide a Tab Label, Tab Name, and Tab Style, and then apply the desired profile visibility for the new tab.</li>
<li>Optional &#8211; hide the tab for the standard or custom object if your new tab is a replacement for the default tab.</li>
<li>If you want to change the View that is displayed in the tab at any time, simply navigate back to the standard tab for the object and Edit the view to meet requirements.</li>
</ol>
<h2>The VisualForce Page code:</h2>
<div id="_mcePaste"><em>Note: Replace &#8220;</em><span style="font-family: 'Courier New', Courier, monospace; line-height: 18px; color: #ff0000;"><em>xxxxxxxxxxxxxxx</em></span><em>&#8221; with the 15-character ID of the View that you captured in Step #4 above.  You can adjust the &#8216;height&#8217;, &#8216;customizable&#8217;, and &#8216;rowsPerPage&#8217; values as desired.</em></div>
<p><code> </code></p>
<p><code></p>
<div>&lt;apex:page &gt;</div>
<div id="_mcePaste" style="padding-left: 30px;">&lt;apex:enhancedList listId="<span style="font-family: 'Courier New', Courier, monospace; line-height: 18px; color: #ff0000;">xxxxxxxxxxxxxxx</span>" height="600" customizable="false" rowsPerPage="25"/&gt;</div>
<div id="_mcePaste">&lt;/apex:page&gt;</div>
<p></code></p>
<p><strong>Tip submitted by:</strong></p>
<p><a title="Michael Topalovich" href="http://www.linkedin.com/in/topalovich" target="_blank">Michael Topalovich</a><br />
<a title="Force.com application design &amp; architecture" href="http://www.deliveredinnovation.com" target="_blank">Delivered Innovation</a></p>
<p><a title="Force.com application architecture and design" href="http://www.deliveredinnovation.com" target="_blank"><img title="Force.com application architecture and design" src="http://forcearchitects.deliveredinnovation.com/wp-content/uploads/2010/06/Delivered_Innovation_234_100.png" alt="" width="234" height="100" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2010/06/01/create-visualforce-tab-to-display-static-list-view-for-standard-or-custom-object/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Force.com Tip: &#8216;New&#8217; Button Override to Assign VisualForce Page to Specific Record Type Using Native Apex Code</title>
		<link>http://blog.deliveredinnovation.com/2009/08/09/force-com-tip-new-button-override-to-assign-visualforce-page-to-specific-record-type-using-native-apex-code/</link>
		<comments>http://blog.deliveredinnovation.com/2009/08/09/force-com-tip-new-button-override-to-assign-visualforce-page-to-specific-record-type-using-native-apex-code/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 03:38:30 +0000</pubDate>
		<dc:creator>Michael Topalovich</dc:creator>
				<category><![CDATA[Force.com Platform Tips]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Salesforce.com]]></category>
		<category><![CDATA[VisualForce]]></category>

		<guid isPermaLink="false">http://saaskatoon.deliveredinnovation.com/?p=389</guid>
		<description><![CDATA[<p><span style="color: #ff0000;">* Updated 8.14.09 with a link to a similar post by Jeff Douglas and refactored code that is more applicable to a broader audience using Apex PageReference methods rather than the original string concatenation that was used for human (non-Salesforce developer) readability</span></p>
<p>You&#8217;ve probably come across this before&#8230;you need to create a custom VisualForce page for a specific Record Type, but overriding the &#8216;New&#8217; or &#8216;Edit&#8217; button seems to be an all-or-nothing proposition (i.e. you can do a single VisualForce page and embed the Page Layout using Apex:Detail, but you can&#8217;t mix custom pages with standard Page Layouts). We came across this recently at <a title="Force.com SaaS application design and development" href="http://www.deliveredinnovation.com/salesforce-force.com-application-development/"  target="_blank">Delivered Innovation</a>, and we want to share our solution with the community. This specific example involves the Saleforce Case object, but can be applied to any Standard or Custom Object.</p>
<p><strong>Use Case:</strong> Client has multiple call centers supporting various product lines; support team &#8216;A&#8217; requires a custom Wizard to rapidly search for and collect details for the Case record that the standard Salesforce search interface cannot provide.</p>
<p><strong>Solution:</strong> While you can assign a specific Page Layout to a specific Record Type and embed VisualForce pages in the object Detail view, currently salesforce.com does not support embedded VisualForce Pages in the Edit view of a Page Layout; likewise, salesforce.com does not support custom VisualForce pages for specific Record Types.  The solution is to &#8220;intercept&#8221; the command to create a new record in an Object before Salesforce processes it, and this is accomplished with a 1-line VisualForce page and a StandardController extension that pulls and analyzes certain URL parameters to enhance the out-of-the-box process routing capabilities of Salesforce.</p>
<hr />
<h2>The VisualForce Page code:</h2>
<p><code>&#60;apex:page standardController="Case" extensions="caseRedirect" tabStyle="Case" showheader="true" action="{!redirect}" /&#62;</code></p>
<h2>The Apex controller extension:</h2>
<p><code>public with sharing class caseRedirect {</code></p>
<p><code> </code></p>
<p><code>private ApexPages.StandardController controller;<br />
public String retURL {get; set;}<br />
public String saveNewURL {get; set;}<br />
public String rType {get; set;}<br />
public String cancelURL {get; set;}<br />
public String ent {get; set;}<br />
public String confirmationToken {get; set;}<br />
public String accountID {get; set;}<br />
public String contactID {get; set;}</code></p>
<p>public caseRedirect(ApexPages.StandardController controller) {</p>
<p>this.controller = controller;</p>
<p>retURL = ApexPages.currentPage().getParameters().get('retURL');<br />
rType = ApexPages.currentPage().getParameters().get('RecordType');<br />
cancelURL = ApexPages.currentPage().getParameters().get('cancelURL');<br />
ent = ApexPages.currentPage().getParameters().get('ent');<br />
confirmationToken = ApexPages.currentPage().getParameters().get('_CONFIRMATIONTOKEN');<br />
saveNewURL = ApexPages.currentPage().getParameters().get('save_new_url');<br />
accountID = ApexPages.currentPage().getParameters().get('def_account_id');<br />
contactID = ApexPages.currentPage().getParameters().get('def_contact_id');</p>
<p>}</p>
<p>public PageReference redirect(){</p>
<p>PageReference returnURL;</p>
<p>// Redirect if Record Type corresponds to custom VisualForce page</p>
<p>IF(rType == '<span style="color: #ff0000;">xxxxxxxxxxxxxxx</span>') {</p>
<p>returnURL = new PageReference('/apex/<span style="color: #ff0000;">insert_VF_Page_Here</span>');<br />
}</p>
<p>ELSE {</p>
<p>returnURL = new PageReference('/500/e');</p>
<p>}</p>
<p>returnURL.getParameters().put('retURL', retURL);<br />
returnURL.getParameters().put('RecordType', rType);<br />
returnURL.getParameters().put('cancelURL', cancelURL);<br />
returnURL.getParameters().put('ent', ent);<br />
returnURL.getParameters().put('_CONFIRMATIONTOKEN', confirmationToken);<br />
returnURL.getParameters().put('save_new_url', saveNewURL);<br />
returnURL.getParameters().put('nooverride', '1');</p>
<p>IF (accountID != null){</p>
<p>returnURL.getParameters().put('def_account_id', accountID);</p>
<p>}</p>
<p>IF (contactID != null){</p>
<p>returnURL.getParameters().put('def_contact_id', contactID);</p>
<p>}</p>
<p>returnURL.setRedirect(true);<br />
return returnURL;</p>
<p>}</p>
<p></p>
<p><code>}</code></p>
<h2 style="font-size: 1.5em;">Original code (prior to refactoring):</h2>
<p><span style="font-family: -webkit-monospace; "><span style="text-decoration: line-through;">public with sharing class caseRedirect {</span></span></p>
<p><code><span style="text-decoration: line-through;">private ApexPages.StandardController controller;<br />
public String retURL {get; set;}<br />
public String rType {get; set;}<br />
public String cancelURL {get; set;}<br />
public String ent {get; set;}<br />
public String confirmationToken {get; set;}</span></code></p>
<p><code><span style="text-decoration: line-through;">public caseRedirect(ApexPages.StandardController controller) {</span></code></p>
<p><code><span style="text-decoration: line-through;">this.controller = controller;</span></code></p>
<p><code><span style="text-decoration: line-through;">retURL = ApexPages.currentPage().getParameters().get('retURL');<br />
rType = ApexPages.currentPage().getParameters().get('RecordType');<br />
cancelURL = ApexPages.currentPage().getParameters().get('cancelURL');<br />
ent = ApexPages.currentPage().getParameters().get('ent');<br />
confirmationToken = ApexPages.currentPage().getParameters().get('_CONFIRMATIONTOKEN');</span></code></p>
<p><code><span style="text-decoration: line-through;">}</span></code></p>
<p><code><span style="text-decoration: line-through;">public PageReference redirect(){</span></code></p>
<p><code><span style="text-decoration: line-through;">PageReference returnURL;</span></code></p>
<p><code><span style="text-decoration: line-through;">// Redirect if the Record Type with custom VF page has been selected</span></code></p>
<p><code><span style="text-decoration: line-through;">// Note, rType represents 15-charater ID for Record Type</span></code></p>
<p><code><span style="text-decoration: line-through;">IF(rType == '</span><span style="color: #ff6600;"><span style="text-decoration: line-through;">xxxxxxxxxxxxxxx</span></span><span style="text-decoration: line-through;">'){</span></code></p>
<p><code><span style="text-decoration: line-through;"> </span></code></p>
<p><code><span style="text-decoration: line-through;">returnURL = new PageReference('/apex/</span><span style="color: #ff6600;"><span style="text-decoration: line-through;">(insert VF page here)</span></span><span style="text-decoration: line-through;">' + '?' + 'retURL=' + retURL + '&#38;' + 'RecordType=' + rType + '&#38;' + 'cancelURL=' + cancelURL + '&#38;' +<br />
'ent=' + ent + '&#38;' + 'nooverride=1' + '&#38;' + '_CONFIRMATIONTOKEN=' + confirmationToken);</span></code></p>
<p><code> </code></p>
<p><code><span style="text-decoration: line-through;">}</span></code></p>
<p><code><span style="text-decoration: line-through;">// Now we need to tell Salesforce what to do in the event that this is not the Record Type we're looking for</span></code></p>
<p><code><span style="text-decoration: line-through;">ELSE{</span></code></p>
<p><code><span style="text-decoration: line-through;"> </span></code></p>
<p><code><span style="text-decoration: line-through;">returnURL = new PageReference('/500/e' + '?' + 'retURL=' + retURL + '&#38;' + 'RecordType=' + rType + '&#38;' + 'cancelURL=' + cancelURL + '&#38;' +<br />
'ent=' + ent + '&#38;' + 'nooverride=1' + '&#38;' + '_CONFIRMATIONTOKEN=' + confirmationToken);</span></code></p>
<p><code> </code></p>
<p><code><span style="text-decoration: line-through;">}</span></code></p>
<p><span style="text-decoration: line-through;">returnURL.setRedirect(true);<br />
return returnURL;</span></p>
<p><span style="text-decoration: line-through;">}</span></p>
<p></p>
<p><code><span style="text-decoration: line-through;">}</span></code></p>
<p>Now for the important part &#8211; in order for this to work when Salesforce users create new Case records, you need to override the &#8216;New&#8217; button for the &#8216;Case&#8217; Standard Object.  This can be accomplished by selecting &#8216;Setup / Customize / Cases / Buttons and Links / &#8216;Override&#8217; on &#8216;New&#8217;.  Select &#8216;VisualForce Page&#8217; for &#8220;Content Type,&#8221; and then select the VisualForce page you created using your modification of the code above in the &#8220;Content Name&#8221; dropdown list, and you&#8217;re set.  The &#8220;Comment&#8221; area is optional. Don&#8217;t forget to set the security for this VisualForce page to provide the required Profiles with access.</p>
<p>Jeff Douglas has provided another method for achieving automated redirection to VisualForce pages on his blog.  You can find the link <a href="http://blog.jeffdouglas.com/2008/11/14/redirecting-users-to-different-visualforce-pages">here</a>.</p>
<p>Questions? Suggestions? Leave us a comment, or email me directly at blog[at]deliveredinnovation.com.</p>
<p>Mike Topalovich, CTO<br />
<a title="Force.com application design" href="http://www.deliveredinnovation" target="_blank">Delivered Innovation</a></p>]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;">* Updated 8.14.09 with a link to a similar post by Jeff Douglas and refactored code that is more applicable to a broader audience using Apex PageReference methods rather than the original string concatenation that was used for human (non-Salesforce developer) readability</span></p>
<p>You&#8217;ve probably come across this before&#8230;you need to create a custom VisualForce page for a specific Record Type, but overriding the &#8216;New&#8217; or &#8216;Edit&#8217; button seems to be an all-or-nothing proposition (i.e. you can do a single VisualForce page and embed the Page Layout using Apex:Detail, but you can&#8217;t mix custom pages with standard Page Layouts). We came across this recently at <a title="Force.com SaaS application design and development" href="http://www.deliveredinnovation.com/salesforce-force.com-application-development/" target="_blank">Delivered Innovation</a>, and we want to share our solution with the community. This specific example involves the Salesforce Case object, but can be applied to any Standard or Custom Object.</p>
<p><strong>Use Case:</strong> Client has multiple call centers supporting various product lines; support team &#8216;A&#8217; requires a custom Wizard to rapidly search for and collect details for the Case record that the standard Salesforce search interface cannot provide.</p>
<p><strong>Solution:</strong> While you can assign a specific Page Layout to a specific Record Type and embed VisualForce pages in the object Detail view, currently salesforce.com does not support embedded VisualForce Pages in the Edit view of a Page Layout; likewise, salesforce.com does not support custom VisualForce pages for specific Record Types.  The solution is to &#8220;intercept&#8221; the command to create a new record in an Object before Salesforce processes it, and this is accomplished with a 1-line VisualForce page and a StandardController extension that pulls and analyzes certain URL parameters to enhance the out-of-the-box process routing capabilities of Salesforce.</p>
<p><span id="more-389"></span></p>
<h2>The VisualForce Page code:</h2>
<p><code>&lt;apex:page standardController="Case" extensions="caseRedirect" tabStyle="Case" showheader="true" action="{!redirect}" /&gt;</code></p>
<h2>The Apex controller extension:</h2>
<p><code>public with sharing class caseRedirect {</code></p>
<p><code> </code></p>
<p><code>private ApexPages.StandardController controller;<br />
public String retURL {get; set;}<br />
public String saveNewURL {get; set;}<br />
public String rType {get; set;}<br />
public String cancelURL {get; set;}<br />
public String ent {get; set;}<br />
public String confirmationToken {get; set;}<br />
public String accountID {get; set;}<br />
public String contactID {get; set;}</code></p>
<p><code>public caseRedirect(ApexPages.StandardController controller) {</code></p>
<p><code> </code></p>
<p><code>this.controller = controller;</p>
<p>retURL = ApexPages.currentPage().getParameters().get('retURL');<br />
rType = ApexPages.currentPage().getParameters().get('RecordType');<br />
cancelURL = ApexPages.currentPage().getParameters().get('cancelURL');<br />
ent = ApexPages.currentPage().getParameters().get('ent');<br />
confirmationToken = ApexPages.currentPage().getParameters().get('_CONFIRMATIONTOKEN');<br />
saveNewURL = ApexPages.currentPage().getParameters().get('save_new_url');<br />
accountID = ApexPages.currentPage().getParameters().get('def_account_id');<br />
contactID = ApexPages.currentPage().getParameters().get('def_contact_id');</p>
<p>}</p>
<p>public PageReference redirect(){</p>
<p>PageReference returnURL;</p>
<p>// Redirect if Record Type corresponds to custom VisualForce page</p>
<p>IF(rType == '<span style="color: #ff0000;">xxxxxxxxxxxxxxx</span>') {</p>
<p>returnURL = new PageReference('/apex/<span style="color: #ff0000;">insert_VF_Page_Here</span>');<br />
}</p>
<p>ELSE {</p>
<p>returnURL = new PageReference('/500/e');</p>
<p>}</p>
<p>returnURL.getParameters().put('retURL', retURL);<br />
returnURL.getParameters().put('RecordType', rType);<br />
returnURL.getParameters().put('cancelURL', cancelURL);<br />
returnURL.getParameters().put('ent', ent);<br />
returnURL.getParameters().put('_CONFIRMATIONTOKEN', confirmationToken);<br />
returnURL.getParameters().put('save_new_url', saveNewURL);<br />
returnURL.getParameters().put('nooverride', '1');</p>
<p>IF (accountID != null){</p>
<p>returnURL.getParameters().put('def_account_id', accountID);</p>
<p>}</p>
<p>IF (contactID != null){</p>
<p>returnURL.getParameters().put('def_contact_id', contactID);</p>
<p>}</p>
<p>returnURL.setRedirect(true);<br />
return returnURL;</p>
<p>}</p>
<p></code></p>
<p><code>}</code></p>
<h2 style="font-size: 1.5em;">Original code (prior to refactoring):</h2>
<p><span style="font-family: -webkit-monospace; "><span style="text-decoration: line-through;">public with sharing class caseRedirect {</span></span></p>
<p><code><span style="text-decoration: line-through;">private ApexPages.StandardController controller;<br />
public String retURL {get; set;}<br />
public String rType {get; set;}<br />
public String cancelURL {get; set;}<br />
public String ent {get; set;}<br />
public String confirmationToken {get; set;}</span></code></p>
<p><code><span style="text-decoration: line-through;">public caseRedirect(ApexPages.StandardController controller) {</span></code></p>
<p><code><span style="text-decoration: line-through;">this.controller = controller;</span></code></p>
<p><code><span style="text-decoration: line-through;">retURL = ApexPages.currentPage().getParameters().get('retURL');<br />
rType = ApexPages.currentPage().getParameters().get('RecordType');<br />
cancelURL = ApexPages.currentPage().getParameters().get('cancelURL');<br />
ent = ApexPages.currentPage().getParameters().get('ent');<br />
confirmationToken = ApexPages.currentPage().getParameters().get('_CONFIRMATIONTOKEN');</span></code></p>
<p><code><span style="text-decoration: line-through;">}</span></code></p>
<p><code><span style="text-decoration: line-through;">public PageReference redirect(){</span></code></p>
<p><code><span style="text-decoration: line-through;">PageReference returnURL;</span></code></p>
<p><code><span style="text-decoration: line-through;">// Redirect if the Record Type with custom VF page has been selected</span></code></p>
<p><code><span style="text-decoration: line-through;">// Note, rType represents 15-charater ID for Record Type</span></code></p>
<p><code><span style="text-decoration: line-through;">IF(rType == '</span><span style="color: #ff6600;"><span style="text-decoration: line-through;">xxxxxxxxxxxxxxx</span></span><span style="text-decoration: line-through;">'){</span></code></p>
<p><code><span style="text-decoration: line-through;"> </span></code></p>
<p><code><span style="text-decoration: line-through;">returnURL = new PageReference('/apex/</span><span style="color: #ff6600;"><span style="text-decoration: line-through;">(insert VF page here)</span></span><span style="text-decoration: line-through;">' + '?' + 'retURL=' + retURL + '&amp;' + 'RecordType=' + rType + '&amp;' + 'cancelURL=' + cancelURL + '&amp;' +<br />
'ent=' + ent + '&amp;' + 'nooverride=1' + '&amp;' + '_CONFIRMATIONTOKEN=' + confirmationToken);</span></code></p>
<p><code> </code></p>
<p><code><span style="text-decoration: line-through;">}</span></code></p>
<p><code><span style="text-decoration: line-through;">// Now we need to tell Salesforce what to do in the event that this is not the Record Type we're looking for</span></code></p>
<p><code><span style="text-decoration: line-through;">ELSE{</span></code></p>
<p><code><span style="text-decoration: line-through;"> </span></code></p>
<p><code><span style="text-decoration: line-through;">returnURL = new PageReference('/500/e' + '?' + 'retURL=' + retURL + '&amp;' + 'RecordType=' + rType + '&amp;' + 'cancelURL=' + cancelURL + '&amp;' +<br />
'ent=' + ent + '&amp;' + 'nooverride=1' + '&amp;' + '_CONFIRMATIONTOKEN=' + confirmationToken);</span></code></p>
<p><code> </code></p>
<p><code><span style="text-decoration: line-through;">}</span></code></p>
<p><code><span style="text-decoration: line-through;">returnURL.setRedirect(true);<br />
return returnURL;</span></code></p>
<p><code> </code></p>
<p><code><span style="text-decoration: line-through;">}</span></p>
<p></code></p>
<p><code><span style="text-decoration: line-through;">}</span></code></p>
<p>Now for the important part &#8211; in order for this to work when Salesforce users create new Case records, you need to override the &#8216;New&#8217; button for the &#8216;Case&#8217; Standard Object.  This can be accomplished by selecting &#8216;Setup / Customize / Cases / Buttons and Links / &#8216;Override&#8217; on &#8216;New&#8217;.  Select &#8216;VisualForce Page&#8217; for &#8220;Content Type,&#8221; and then select the VisualForce page you created using your modification of the code above in the &#8220;Content Name&#8221; dropdown list, and you&#8217;re set.  The &#8220;Comment&#8221; area is optional. Don&#8217;t forget to set the security for this VisualForce page to provide the required Profiles with access.</p>
<p>Jeff Douglas has provided another method for achieving automated redirection to VisualForce pages on his blog.  You can find the link <a href="http://blog.jeffdouglas.com/2008/11/14/redirecting-users-to-different-visualforce-pages" target="_blank">here</a>.</p>
<p>Questions? Suggestions? Leave us a comment, or email me directly at blog[at]deliveredinnovation.com.</p>
<p>Mike Topalovich, CTO<br />
<a title="Force.com application design" href="http://www.deliveredinnovation" target="_blank">Delivered Innovation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.deliveredinnovation.com/2009/08/09/force-com-tip-new-button-override-to-assign-visualforce-page-to-specific-record-type-using-native-apex-code/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

