<?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>Tom&#039;s Blog</title>
	<atom:link href="http://blog.tomheinan.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tomheinan.com</link>
	<description>A tale told by an idiot, full of sound and fury, signifying nothing.</description>
	<lastBuildDate>Tue, 24 Aug 2010 03:11:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Aptela for Google Chrome</title>
		<link>http://blog.tomheinan.com/posts/aptela-for-chrome/</link>
		<comments>http://blog.tomheinan.com/posts/aptela-for-chrome/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 18:42:22 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[aptela]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[voip]]></category>

		<guid isPermaLink="false">http://blog.tomheinan.com/?p=78</guid>
		<description><![CDATA[Do you use Google Chrome? Do you have an Aptela account? If you answered &#8220;yes!&#8221; to both of those questions, then do I have a plugin for you! Introducing Aptela for Google Chrome: What does it do? This handy little extension allows you to leverage the power of VoIP through your web browser, turning all [...]]]></description>
			<content:encoded><![CDATA[<p>Do you use <a href="http://www.google.com/chrome" target="_blank">Google Chrome</a>?  Do you have an <a href="http://www.aptela.com/" target="_blank">Aptela</a> account?  If you answered &#8220;<strong>yes!</strong>&#8221; to both of those questions, then do I have a plugin for you!</p>
<h1>Introducing Aptela for Google Chrome:</h1>
<h2>What does it do?</h2>
<p>This handy little extension allows you to leverage the power of <abbr title="Voice over Internet Protocol">VoIP</abbr> through your web browser, turning all the US phone numbers on the pages you visit into clickable links.  Click on one of those links, and Aptela will connect you to that phone number instantly!</p>
<p>You can also check your new voicemails and faxes right from the browser window &#8211; for anything else, there&#8217;s a convenient link that logs you in to the Aptela application automatically.</p>
<h2>How do I get it?</h2>
<div id="for_chrome">
<p>For more information and a chance to see what other people think of the plugin, you can check out its extension page, which is hosted by Google <a href="https://chrome.google.com/extensions/detail/phhoajolpmepbggcicbaegechknfpphh" target="_blank">here</a>.  Since you&#8217;re already running Chrome, though, you can just click the button below.  When the security bar pops up, click &#8220;Continue.&#8221;</p>
<div style="position: relative;"><a class="custombtn2" href=https://clients2.google.com/service/update2/crx?response=redirect&#038;x=id%3Dphhoajolpmepbggcicbaegechknfpphh%26uc%26lang%3Den-US&#038;prod=chrome&#038;prodversion=5.0.375.126>Install Now</a><span style="position: absolute; float: left; top: 16px;">&nbsp;&nbsp;for Windows, Mac, and Linux</span></div>
</div>
<div id="for_others">
<ol>
<li><a href="http://www.google.com/chrome" target="_blank">Download</a> and install Google Chrome.</li>
<li>In Chrome, visit the <a href="https://chrome.google.com/extensions/detail/phhoajolpmepbggcicbaegechknfpphh" target="_blank">Aptela extension</a> page and click &#8220;Install Now.&#8221;</li>
</ol>
</div>
<p><script type="text/javascript">
var for_chrome = document.getElementById('for_chrome');
var for_others = document.getElementById('for_others');
if (BrowserDetect.browser.toLowerCase() == "chrome") {
	for_chrome.style.display = "block";
	for_others.style.display = "none";
} else {
	for_chrome.style.display = "none";
	for_others.style.display = "block";
}
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tomheinan.com/posts/aptela-for-chrome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ActiveSalesforce on Rails 2.3.8</title>
		<link>http://blog.tomheinan.com/posts/activesalesforce-2-3-8/</link>
		<comments>http://blog.tomheinan.com/posts/activesalesforce-2-3-8/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 12:05:09 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.tomheinan.com/?p=1</guid>
		<description><![CDATA[A brief tutorial on <b>ActiveSalesforce</b>, a gem that allows you to implement the popular <a href="http://www.salesforce.com/" target="_blank">Salesforce <abbr title="Customer Relationship Management">CRM</abbr></a> as a collection of ActiveRecord models in your custom Rails app.]]></description>
			<content:encoded><![CDATA[<h3>First, some tedious backstory:</h3>
<p>A while back, I was tasked with creating an e-commerce application that could interface both with our company&#8217;s Salesforce organization and our own proprietary infrastructure.  <i>Aha</i>, thought I, in my boundless na&iuml;vet&eacute; &#8211; <i>at last, a chance to show off my mad Rails skillz!  Surely there must be some gem that allows me to work effortlessly between Salesforce and Rails.</i></p>
<p>And I was half right &#8211; there was <a href="http://activesfdc.rubyforge.org/" target="_blank">a gem</a>.  And admittedly, once I got it working, it was pretty effortless.  But getting it working was no small task.  For starters, there was next to no useful documentation.  Beyond that, the gem was broken on Rails 2.2.x and higher.</p>
<p>Fortunately for me, a chap by the name of <a href="http://timothynjones.wordpress.com/" target="_blank">Timothy N. Jones</a> posted <a href="http://timothynjones.wordpress.com/2008/12/03/patching-activesalesforce-for-rails-222/" target="_blank">some instructions on his blog</a> for patching the ActiveSalesforce source.  <a href="http://timothynjones.wordpress.com/2008/12/03/patching-activesalesforce-for-rails-222/#comment-2099" target="_blank">In the comments</a> of that post, <a href="http://oldfartdeveloper.blogspot.com/" target="_blank">Scott Smith</a> noted that he had created <a href="http://github.com/oldfartdeveloper/activerecord-activesalesforce-adapter" target="_blank">a repository</a> for the patched gem over on github.  That worked fine for a while, until I recently decided to upgrade my Rails (and therefore ActiveRecord) version to 2.3.8, at which point everything broke again.  Great.  Fortunately, all is not lost.</p>
<h3>Now, the thrilling solution:</h3>
<p>I&#8217;ve <a href="http://github.com/tomheinan/activesalesforce" target="_blank">forked</a> Scott Smith&#8217;s copy of ActiveSalesforce and applied some compatibility fixes, so it should now play nicely with Rails 2.3.8.  Here&#8217;s how to get the revised code up and running:</p>
<h5>1. Clone/build/install the gem.</h5>
<p>Open up the terminal (you <i>are</i> using a UNIX-based system, right?) and type the following:</p>
<pre class="brush: bash;">
git clone git://github.com/tomheinan/activesalesforce.git
cd activesalesforce
gem build activesalesforce.gemspec
sudo gem install activesalesforce.gem
</pre>
<h5>2. Set up your <code>config/database.yml</code> file:</h5>
<p>There are quite a few different ways you can do this.  Here&#8217;s how I have mine set up:</p>
<pre class="brush: plain;">
common: &amp;common
	adapter: activesalesforce

production:
	&lt;&lt;: *common
	username: apiuser@your.org
	password: p4ssw0rd4ndt0k3n

development:
	&lt;&lt;: *common
	url: https://test.salesforce.com
	username: apiuser@your.org.name_of_sandbox
	password: p4ssw0rd4ndt0k3n
</pre>
<h5>3. Go nuts.</h5>
<p>Your Rails app is now configured to implement Salesforce as your data source.  The above <code>database.yml</code> configuration allows you to use <code>RAILS_ENV</code> to specify your environment with regard to your sandbox or production account.  Just be sure not to link a test environment to your production Salesforce account or Bad Things&#0153; <b>will</b> happen.</p>
<p>The full documentation of ActiveSalesforce is beyond the scope of this guide, but if you&#8217;re familiar with ActiveRecord, you&#8217;re already most of the way there.  ActiveSalesforce behaves in a very similar way, so you can create model classes that extend from ActiveSalesforce, set up relationships, add methods, access Salesforce custom objects, etc. and it should all &#8220;just work.&#8221;</p>
<p>In general, the rule is that any field of a Salesforce object can by accessed by a model of the same name.  For example, say we&#8217;ve got a Clients table in Salesforce, and each Client has a field called (using the API name) &#8220;Num_of_Moustachioed_Employees__c&#8221;, then we could do the following (assuming we&#8217;ve got a model called <code>client.rb</code>):</p>
<pre class="brush: bash;">
script/console
Loading development environment (Rails 2.3.8)
&gt;&gt; initech = Client.find_by_id &quot;00XX000000SOMESFID&quot;
=&gt; #&lt;Account id: &quot;0XX000000SOMESFID&quot;, ... bunch of fields ... &gt;
</pre>
<p>Let&#8217;s find out how many employees of Initech are sporting an epic cookie duster:</p>
<pre class="brush: bash;">
&gt;&gt; initech.num_of_moustachioed_employees__c
=&gt; 1
</pre>
<p>And there you have it; easy as pie.</p>
<p>If I&#8217;ve made any egregious oversights or you find some bugs in the code please drop a line in the comments and I&#8217;ll take a look as soon as I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tomheinan.com/posts/activesalesforce-2-3-8/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
