<?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>joe-ferraro.com &#187; salesforce</title>
	<atom:link href="http://joe-ferraro.com/tag/salesforcecom/feed/" rel="self" type="application/rss+xml" />
	<link>http://joe-ferraro.com</link>
	<description>adless since 2008</description>
	<lastBuildDate>Thu, 24 Mar 2011 22:22:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>extjs &amp; visualforce</title>
		<link>http://joe-ferraro.com/2009/04/extjs-visualforce/</link>
		<comments>http://joe-ferraro.com/2009/04/extjs-visualforce/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 15:20:59 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[salesforce]]></category>
		<category><![CDATA[visualforce]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[force.com sites]]></category>

		<guid isPermaLink="false">http://joe-ferraro.com/?p=64</guid>
		<description><![CDATA[
I&#8217;m interested to hear how people are utilizing extjs in their visualforce pages.  I&#8217;ve found it very helpful to use Apex to generate the store on the server side, then pass it along to the Visualforce page via a hidden input to be handled on the client side (rather than use the apex:repeat tags).
Note: [...]]]></description>
			<content:encoded><![CDATA[<p>
I&#8217;m interested to hear how people are utilizing extjs in their visualforce pages.  I&#8217;ve found it very helpful to use Apex to generate the store on the server side, then pass it along to the Visualforce page via a hidden input to be handled on the client side (rather than use the apex:repeat tags).</p>
<p>Note: once again, the grid below is a live Visualforce page from my developer Force.com site embedded into this post
</p>
<div>
 <IFRAME src="http://crmmanager-developer-edition.na6.force.com/test/ExtJs_Grid" height="400" width="650" frameborder="0" scrolling="no" ></IFRAME>
</div>
<pre name="code" class="java">

public class Grid_Controller {
	public string store {get;set;}
	public list&lt;QueueItem&gt; queueitems {get;set;}
	string userId = UserInfo.getUserId();

	public Grid_Controller() {
		queueitems = new queueitem[]{};
		for (Custom_Process_Instance__c cpi : [Select Owner.Name, Opportunity__r.Name, Opportunity__r.Id, (Select Id From Custom_Process_Instance_Step__r where Status__c != &#039;Completed&#039; AND Status__c = &#039;Pending&#039; limit 1), Percent_Complete__c, Process_Age__c from Custom_Process_Instance__c where Status__c = &#039;Pending&#039; AND Opportunity__c != null and IsDeleted = false order by CreatedDate asc]) {
            		QueueItem qi = new QueueItem(cpi);
            		queueitems.add(qi);
		}        

		string myDataString = &#039;var myData = [ &#039;;
		for(queueitem q : this.queueitems) {
			string showIcon = &#039;&#039;;
			if (q.ProcessInstance.Custom_Process_Instance_Step__r.size() == 1)
        			showIcon = &#039;yes&#039;;

			string oppId = q.ProcessInstance.Opportunity__c;
			string oppName = q.ProcessInstance.Opportunity__r.Name;
			string launchedby = q.ProcessInstance.Owner.Name;
			double percent = q.ProcessInstance.Percent_Complete__c;
			double ageInMinutes = q.ProcessInstance.Process_Age__c;

			if (q.ProcessInstance.Opportunity__r.Name != null)
				oppName = string.escapeSingleQuotes(q.ProcessInstance.Opportunity__r.Name);
			if (q.ProcessInstance.Owner.Name != null)
				launchedBy = string.escapeSingleQuotes(q.ProcessInstance.Owner.Name);

			myDataString += &#039;[\&#039;&#039;+showIcon+&#039;\&#039;,\&#039;&#039;+oppName+&#039;\&#039;, \&#039;&#039;+oppId+&#039;\&#039;,\&#039;&#039;+launchedBy+&#039;\&#039;,\&#039;&#039;+percent+&#039;\&#039;,\&#039;&#039;+ageInMinutes+&#039;\&#039;],&#039;;
		}

		myDataString += &#039;];&#039;;
		myDataString = myDataString.replace(&#039;,];&#039;, &#039;];&#039;);
		this.store = myDataString;
	}

	public class QueueItem {
		public Custom_Process_Instance__c ProcessInstance {get;set;}
		public QueueItem(Custom_Process_Instance__c cpi) {
			this.ProcessInstance = cpi;
		}
	}
}
</pre>
<pre name="code" class="java">

&lt;script type=&quot;text/javascript&quot;&gt;
	var myDataString = document.getElementById(&#039;{!$Component.myForm.dataStore}&#039;).value;
&lt;/script&gt;
</pre>
<pre name="code" class="java">

&lt;apex:form id=&quot;myForm&quot;&gt;
	&lt;apex:inputHidden value=&quot;{!store}&quot; id=&quot;dataStore&quot;/&gt;
&lt;/apex:form&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://joe-ferraro.com/2009/04/extjs-visualforce/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>copy your current ip address to the clipboard</title>
		<link>http://joe-ferraro.com/2009/01/copy-your-current-external-ip-address-to-the-clipboard/</link>
		<comments>http://joe-ferraro.com/2009/01/copy-your-current-external-ip-address-to-the-clipboard/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 20:58:42 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[butler]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://joe-ferraro.com/?p=57</guid>
		<description><![CDATA[


if you&#8217;ve worked in several different instances of Salesforce.com from several different locations, surely you&#8217;ve run into roadblocks on Salesforce.com Security Boulevard (and yes, I know you can use a security token, but many times I&#8217;m using a client&#8217;s license and he/she will &#8220;inadvertently&#8221; reset the token and lock me out of the org).
when in [...]]]></description>
			<content:encoded><![CDATA[<div>
<img src="http://www.joe-ferraro.com/images/salesforce_ip.png" alt="Salesforce Security Controls" />
</div>
<p>if you&#8217;ve worked in several different instances of <a href="http://www.salesforce.com">Salesforce.com</a> from several different locations, surely you&#8217;ve run into roadblocks on Salesforce.com Security Boulevard (and yes, I know you can use a security token, but many times I&#8217;m using a client&#8217;s license and he/she will &#8220;inadvertently&#8221; reset the token and lock me out of the org).</p>
<p>when in a new location, I used to copy my external ip from <a href="http://www.whatsmyip.com">whatsmyip.com</a>.  well, if you&#8217;re using os x, you can leverage Applescript to make this a bit less painful.</p>
<pre name="code" class="javascript">

set response to do shell script &quot;/usr/bin/curl http://checkip.dyndns.org/&quot;
set ip_address to extract_ip(response)

set the Reply to display dialog &quot;Your IP address is: &quot; &amp;amp; ip_address
set the clipboard to ip_address

-- Function to extract ip from HTML returned by dydns.com
on extract_ip(this_text)
	set clean_ip to &quot;&quot;
	set this_char to &quot;&quot;
	repeat with this_char in this_text
		set this_char to the contents of this_char
		if the this_char is in {&quot;0&quot;, &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;, &quot;6&quot;, &quot;7&quot;, &quot;8&quot;, &quot;9&quot;, &quot;.&quot;} then
			set the clean_ip to the clean_ip &amp;amp; this_char as string
		end if
	end repeat
	return the clean_ip
end extract_ip

-- end script
</pre>
<p> </p>
<p>
if you&#8217;re using <a href="http://www.manytricks.com/butler/">Butler</a>, you can run this applescript with a hot key.  so, whenever I need my external ip, I simply hold command + shift + i and my ip address is copied to my clipboard for handy paste into the trusted ip ranges.
</p>
<div>
<img src="http://joe-ferraro.com/images/Butler_Configuration.png" alt="Butler" />
</div>
<p>hth.</p>
]]></content:encoded>
			<wfw:commentRss>http://joe-ferraro.com/2009/01/copy-your-current-external-ip-address-to-the-clipboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wrapper class and force.com sites</title>
		<link>http://joe-ferraro.com/2008/11/wrapper-class-and-forcecom-sites/</link>
		<comments>http://joe-ferraro.com/2008/11/wrapper-class-and-forcecom-sites/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 20:17:05 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[apex]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[visualforce]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[force.com sites]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://joe-ferraro.com/?p=49</guid>
		<description><![CDATA[Force.com Sites was announced last week at Dreamforce ‘08 and what a game changing announcement it was.  Here’s my foray into Sites development, with nifty sample code...]]></description>
			<content:encoded><![CDATA[<p>Force.com Sites was announced last week at Dreamforce &#8216;08 and what a game changing announcement it was.  Here&#8217;s my foray into Sites development, with nifty sample code (please note the table of opportunity data below is a live Salesforce.com Visualforce page from my development environment embedded into this post):</p>
<div>
 <IFRAME src="http://crmmanager-developer-edition.na6.force.com/test" height="500" width="500" ></IFRAME>
</div>
<div>
<b>Controller</b></p>
<pre name="code" class="java">

public class OpportunityList_Controller {
	public class MyOpportunity {
	    Opportunity o;
	    public MyOpportunity(Opportunity opp) { o = opp; }
	    public Opportunity getOpportunity(){ return o; }

	    public String getColor()  {
		    if (o.Probability &lt; 25) return &#039;#2A73F0&#039;;
		    else if (o.Probability &gt;= 25 &amp;amp;amp;&amp;amp;amp; o.Probability &lt;= 75) return &#039;#E0B60D&#039;;
		    else if (o.Probability &gt; 75) return &#039;#FF0000&#039;;
		    else return &#039;#000000&#039;;
	    }
    }

    public List&lt;MyOpportunity&gt; results = new List&lt;MyOpportunity&gt;{};

	public List&lt;MyOpportunity&gt; getOpportunities() {
		results.clear();
        for (Opportunity o : [Select Id, Name, StageName, Closedate, Probability
From Opportunity where StageName != &#039;Closed Won&#039; order by Name limit 20]) {
        	results.add(new MyOpportunity(o));
        }
		return results;
    }
}
</pre>
</div>
<p></p>
<div>
<b>Visualforce Page</b></p>
<pre name="code" class="java">

&lt;apex:page controller=&quot;OpportunityList_Controller&quot;
tabStyle=&quot;Opportunity&quot; showHeader=&quot;false&quot; sidebar=&quot;false&quot; &gt;
	&lt;apex:form &gt;
		&lt;apex:pageBlock title=&quot;&quot; id=&quot;pageBlock&quot;&gt;
			&lt;apex:pageMessages &gt;&lt;/apex:pageMessages&gt;
			&lt;apex:pageBlockTable value=&quot;{!opportunities}&quot; var=&quot;o&quot;
rendered=&quot;{!NOT(ISNULL(opportunities))}&quot;&gt;
				&lt;apex:column &gt;
					&lt;apex:facet name=&quot;header&quot;&gt;Opportunity Name&lt;/apex:facet&gt;
					&lt;div style=&quot;color:{!o.color};font-weight:bold;text-decoration:underline;cursor:hand;cursor:pointer;&quot;&gt;
					{!o.Opportunity.Name}
					&lt;/div&gt;
				&lt;/apex:column&gt;
				&lt;apex:column value=&quot;{!o.Opportunity.Probability}&quot;&gt;&lt;/apex:column&gt;
				&lt;apex:column value=&quot;{!o.Opportunity.StageName}&quot;&gt;&lt;/apex:column&gt;
				&lt;apex:column value=&quot;{!o.Opportunity.CloseDate}&quot;&gt;&lt;/apex:column&gt;
			&lt;/apex:pageBlockTable&gt;
		&lt;/apex:pageBlock&gt;
	&lt;/apex:form&gt;
&lt;/apex:page&gt;
</pre>
</div>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://joe-ferraro.com/2008/11/wrapper-class-and-forcecom-sites/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>winter &#8216;09 is (almost) here</title>
		<link>http://joe-ferraro.com/2008/09/winter-09-is-almost-here/</link>
		<comments>http://joe-ferraro.com/2008/09/winter-09-is-almost-here/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 01:48:55 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[salesforce]]></category>
		<category><![CDATA[winter09]]></category>

		<guid isPermaLink="false">http://joe-ferraro.com/?p=45</guid>
		<description><![CDATA[
I got the good old scheduled maintenance window message on na1 this week, but I didn&#8217;t expect it to be for the Winter &#8216;09 release. Kudos to SFDC for the early release (a month before Dreamforce).
Release Preview
Release Notes (pdf)
]]></description>
			<content:encoded><![CDATA[<p><img src="http://joe-ferraro.com/images/winter09.png" alt="winter 09" width="183" height="204" /></p>
<p>I got the good old scheduled maintenance window message on na1 this week, but I didn&#8217;t expect it to be for the Winter &#8216;09 release. Kudos to SFDC for the early release (a month before Dreamforce).</p>
<p><a href="http://www.salesforce.com/products/previews/winter09/" target="_blank">Release Preview</a></p>
<p><a href="http://www.salesforce.com/assets/pdf/misc/winter09_release_preview.pdf" target="_blank">Release Notes (pdf)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joe-ferraro.com/2008/09/winter-09-is-almost-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(unofficial) adobe air tasks</title>
		<link>http://joe-ferraro.com/2008/08/adobe-air-tasks/</link>
		<comments>http://joe-ferraro.com/2008/08/adobe-air-tasks/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 01:36:11 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[adobe air]]></category>

		<guid isPermaLink="false">http://joe-ferraro.com/?p=42</guid>
		<description><![CDATA[i'm gauging interest from other consultants that track time in Salesforce.com.  Would you use an AIR app?  See a screencast after the jump...
]]></description>
			<content:encoded><![CDATA[<div><img src="http://www.joe-ferraro.com/images/airtasks1.png" alt="airtasks"/></div>
<p>I got tired of logging into our Salesforce.com instance to log billable activities, so I developed this AIR app&#8230;is this something people would use?<br />
<br />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="350" height="443"><param name="movie" value="http://www.joe-ferraro.com/video/airtasks.swf"></param><param name="quality" value="high"></param><param name="bgcolor" value="#FFFFFF"></param><param name="flashVars" value="thumb=http://content.screencast.com/users/jf317820/folders/Jing/media/cc8c2eb2-32a2-4caf-b6df-23a418e6c0ec/FirstFrame.jpg&#038;content=http://www.joe-ferraro.com/video/airtasks.swf&#038;width=350&#038;height=443"></param><param name="allowFullScreen" value="true"></param><param name="scale" value="showall"></param><param name="allowScriptAccess" value="always"></param>  <embed src="http://www.joe-ferraro.com/video/airtasks.swf" quality="high" bgcolor="#FFFFFF" width="350" height="443" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/jf317820/folders/Jing/media/cc8c2eb2-32a2-4caf-b6df-23a418e6c0ec/FirstFrame.jpg&#038;content=http://www.joe-ferraro.com/video/airtasks.swf&#038;width=350&#038;height=443" allowFullScreen="true" scale="showall"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://joe-ferraro.com/2008/08/adobe-air-tasks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

