<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Perspectives on Salesforce.com</title>
	
	<link>http://sfdc.arrowpointe.com</link>
	<description>Authored by Scott Hemmeter of Arrowpointe Corp, this blog is written from the perspective of a Salesforce.com solution provider and contains information on Arrowpointe's AppExchange products as well as tips, findings, sample code, functionality wishes, etc.</description>
	<pubDate>Fri, 31 Oct 2008 20:15:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<geo:lat>33.811566</geo:lat><geo:long>-117.829194</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://sfdc.arrowpointe.com/feed" type="application/rss+xml" /><feedburner:emailServiceId>70989</feedburner:emailServiceId><feedburner:feedburnerHostname>http://www.feedburner.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Fsfdc.arrowpointe.com%2Ffeed" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Fsfdc.arrowpointe.com%2Ffeed" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Fsfdc.arrowpointe.com%2Ffeed" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.rojo.com/add-subscription?resource=http%3A%2F%2Fsfdc.arrowpointe.com%2Ffeed" src="http://blog.rojo.com/RojoWideRed.gif">Subscribe with Rojo</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://sfdc.arrowpointe.com/feed" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fsfdc.arrowpointe.com%2Ffeed" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Fsfdc.arrowpointe.com%2Ffeed" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Fsfdc.arrowpointe.com%2Ffeed" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site.</feedburner:browserFriendly><item>
		<title>Campaign Member Summary using Google Charts</title>
		<link>http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~3/438405442/</link>
		<comments>http://sfdc.arrowpointe.com/2008/10/31/campaign-member-summary-using-google-charts/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 20:15:16 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
		
		<category><![CDATA[APEX Code]]></category>

		<category><![CDATA[Tips]]></category>

		<category><![CDATA[Visualforce]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=461</guid>
		<description><![CDATA[I was inspired by Sam Arjmandi&#8217;s post about embedding Google Charts into VisualForce pages.  I have a use case that requires a little different approach.  I needed to get a quick view of the Campaign Member Statuses for a Campaign.  I went ahead and started with Sam&#8217;s example and tweaked it for my purpose.  Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I was inspired by <a href="http://salesforcesource.blogspot.com/2008/10/how-to-easily-bring-graphical-charts.html" target="_blank">Sam Arjmandi&#8217;s post</a> about embedding Google Charts into VisualForce pages.  I have a use case that requires a little different approach.  I needed to get a quick view of the Campaign Member Statuses for a Campaign.  I went ahead and started with Sam&#8217;s example and tweaked it for my purpose.  Here&#8217;s the result!</p>
<p><img class="aligncenter size-full wp-image-462" title="vfcampaignchart" src="http://sfdc.arrowpointe.com/wp-content/images/vfcampaignchart.png" alt="" width="457" height="238" /></p>
<p>It&#8217;s an embedded VisualForce component in the Results section of my Campaign page.  It shows a quick count for each Member Status that is being used.  To get it going in your org, here&#8217;s what you need.</p>
<p><strong>VisualForce Page</strong></p>
<p>It&#8217;s a simple page containing 1 DIV so that I can set the background color to match that of a Page Layout.  Other than that it&#8217;s just an image returned from <a href="http://code.google.com/apis/chart/">Google Charts</a>.  There is a lot of flexibility with Google Charts.  Therefore, I made it so most of the URL can be tweaked in VisualForce. Only the data values and its labels come from the controller.  This is nice because you can edit VF in a production org, but you can&#8217;t edit Apex.  This will let you change things like width, height, chart colors, chart type, etc.</p>
<pre class="syntax-highlight:html">

&lt;apex:page standardController=&quot;Campaign&quot; extensions=&quot;VFController_CampaignMemberStatusChart&quot;&gt;
    &lt;style&gt;
        #DIV_Container{padding: 0; margin: 0; background-color: #F3F3EC;}
    &lt;/style&gt;
    &lt;div id=&quot;DIV_Container&quot;&gt;
        &lt;!-- See http://code.google.com/apis/chart/ for more info on customizing the chart --&gt;
        &lt;apex:image url=&quot;http://chart.apis.google.com/chart?cht=p3&amp;chs=1000x125&amp;chf=bg,s,F3F3EC&amp;chco=CC9933{!chartData}&quot;&gt;&lt;/apex:image&gt;
    &lt;/div&gt;
&lt;/apex:page&gt;
</pre>
<p><strong>Apex Controller</strong><br />
The controller is an extension of the Campaign standard controller.  This is so the VisualForce page becomes an option to include on a Campaign Page Layout.  The method that does all the work is getChartData.  It gets the available Campaign Member Statuses and then queries the Campaign Member object for that Campaign and adds a data/label value for each one.  It then returns a query string that you include into the Image src on the Visual Force page.</p>
<p>I am bad at Test classes, but there is 1 in there that passes and should be good enough.  This functionality is pretty harmless.</p>
<pre class="syntax-highlight:java">
public class VFController_CampaignMemberStatusChart {

	private final Campaign camp;

	public VFController_CampaignMemberStatusChart(ApexPages.StandardController stdController) {
		this.camp = (Campaign)stdController.getRecord();
	}

	public String getChartData() {

		// The list of chart items
		List&lt;ChartDataItem&gt; items = new List&lt;ChartDataItem&gt;();

		// List of valid Campaign Member Statuses for the Campaign
		List&lt;CampaignMemberStatus&gt; list_cms = [select Id, Label from CampaignMemberStatus where CampaignId = :camp.id];

		// Loop through each Campaign Member Status, get a count of Campaign Members and add it to the items list
		for (CampaignMemberStatus cms:list_cms) {
			integer Count = [select count() from CampaignMember where CampaignId = :camp.id AND Status = :cms.Label];
			if (Count &gt; 0) {
				items.add(new ChartDataItem(cms.Label, Count.format()));
			}
		}

		// Initialize Strings
		String chd = &#039;&#039;; // Data
		String chl = &#039;&#039;; // Labels

		for(ChartDataItem citem : items) {
			chd += citem.ItemValue + &#039;,&#039;;
			chl += citem.Label + &#039; (&#039; + citem.ItemValue + &#039;)|&#039;;
		}

		//remove the last comma or pipe
		if (items.size() &gt; 0) {
			chd = chd.substring(0, chd.length() -1);
			chl = chl.substring(0, chl.length() -1);
		}

		// We are only returning the values and labels. The rest of the URL string is in the VF page
		String result = &#039;&amp;chd=t:&#039; + chd + &#039;&amp;chl=&#039; + chl; // &amp;chl returns with labels pointing to pie pieces
		//String result = &#039;&amp;chd=t:&#039; + chd + &#039;&amp;chdl=&#039; + chl; // &amp;chdl returns with labels in a legend

		return result;
	}

	// Class holding each chart data item
	public class ChartDataItem {
		public String ItemValue {get; set;}
		public String Label {get; set;}

		public ChartDataItem(String Label, String Value)
		{
			this.Label = Label;
			this.ItemValue = Value;
		}
	}

	static testMethod void testVFController_Sidebar_Summary() {

		// Create Campaign
        Campaign c = new Campaign();
        c.Name = &#039;Test Campaign&#039;;
        insert c;

        // Create Lead
        Lead l = new Lead();
        l.LastName = &#039;Last Name&#039;;
        l.Company = &#039;Company&#039;;
        insert l;

        // Create Campaign Member
        CampaignMember cms = new CampaignMember();
        cms.CampaignId = c.id;
        cms.LeadId = l.id;
        insert cms;

		test.startTest();

		ApexPages.StandardController sc = new ApexPages.StandardController(c);
		VFController_CampaignMemberStatusChart controller = new VFController_CampaignMemberStatusChart(sc);
		String s1 = controller.getChartData();

		test.stopTest();
	}

}
</pre>
<p><strong>Page Layout</strong><br />
When you add it to the Page Layout, make the height of the component the same as the height you specified in the VF page&#8217;s image src for Google Charts.  In this example, it&#8217;s 125.  Doing this will ensure the background colors match your Page Layout.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?a=s5Pqm"><img src="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?i=s5Pqm" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~4/438405442" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/10/31/campaign-member-summary-using-google-charts/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=PerspectivesOnSalesforcecom&amp;itemurl=http%3A%2F%2Fsfdc.arrowpointe.com%2F2008%2F10%2F31%2Fcampaign-member-summary-using-google-charts%2F</feedburner:awareness><feedburner:origLink>http://sfdc.arrowpointe.com/2008/10/31/campaign-member-summary-using-google-charts/</feedburner:origLink></item>
		<item>
		<title>Note Wizard (Salesforce + Evernote)</title>
		<link>http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~3/437149530/</link>
		<comments>http://sfdc.arrowpointe.com/2008/10/30/note-wizard-salesforce-evernote/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 17:45:27 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
		
		<category><![CDATA[AppExchange]]></category>

		<category><![CDATA[Innovations]]></category>

		<category><![CDATA[Product Review]]></category>

		<category><![CDATA[The Community]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=449</guid>
		<description><![CDATA[Evernote is a very cool and useful application for taking notes, saving web clippings and archiving images that represent notes (sometimes its faster to just take a picture).  One really great thing about it is that it does OCR on you content (event the text in your images!) and makes it all searchable.  I use [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.evernote.com" target="_blank">Evernote</a> is a very cool and useful application for taking notes, saving web clippings and archiving images that represent notes (sometimes its faster to just take a picture).  One really great thing about it is that it does OCR on you content (event the text in your images!) and makes it all searchable.  I use it all the time and love it.  It can be a bit of a novelty, but if you decide to really use it, you can get a lot of utility out of it.</p>
<p>What if you could save your Notes right into Salesforce?  You can (only as Documents for now)!  Coming soon is integration with standard and custom objects, which would let you do things like take a picture of a business card and import it into an Account/Contact combo.  Maybe take a picture of a whitboard of notes and save it as an Activity.</p>
<p>Steve Buikhuizen has created the <a href="http://notewizard.wordpress.com/" target="_blank">Note Wizard</a> application.  It&#8217;s definitely worth looking into.  It&#8217;s an integration with Salesforce and Evernote all running on Amazon EC2 and S3!</p>
<ul>
<li><a href="http://notewizard.wordpress.com/" target="_blank">Main page</a> for the project</li>
<li><a href="http://notewizard.wordpress.com/getting-started-a-5-minute-screencast/" target="_blank">Videos</a> that explain a lot</li>
<li><a href="http://www.salesforce.com/us/appexchange/detail_overview.jsp?id=a0330000006biFQAAY" target="_blank">AppExchange</a> listing (a private listing for now. This is linked to on the <a href="http://notewizard.wordpress.com/about-note-wizard/" target="_blank">About page</a> of the main site.)</li>
</ul>
<p style="text-align: center;"><img class="size-full wp-image-451 aligncenter" title="notewizard_lists" src="http://sfdc.arrowpointe.com/wp-content/images/notewizard_lists.gif" alt="" width="300" height="139" /></p>
<p style="text-align: center;">
<p style="text-align: center;"><a href="http://sfdc.arrowpointe.com/wp-content/images/notewizard_buscard.jpg"><img class="size-medium wp-image-452 aligncenter" title="notewizard_buscard" src="http://sfdc.arrowpointe.com/wp-content/images/notewizard_buscard.jpg" alt="" width="300" height="196" /></a></p>
<p style="text-align: left;">Good work, Steve!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?a=Sv2nm"><img src="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?i=Sv2nm" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~4/437149530" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/10/30/note-wizard-salesforce-evernote/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=PerspectivesOnSalesforcecom&amp;itemurl=http%3A%2F%2Fsfdc.arrowpointe.com%2F2008%2F10%2F30%2Fnote-wizard-salesforce-evernote%2F</feedburner:awareness><feedburner:origLink>http://sfdc.arrowpointe.com/2008/10/30/note-wizard-salesforce-evernote/</feedburner:origLink></item>
		<item>
		<title>ActevaRSVP Review</title>
		<link>http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~3/437127749/</link>
		<comments>http://sfdc.arrowpointe.com/2008/10/30/actevarsvp-review/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 17:22:18 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
		
		<category><![CDATA[AppExchange]]></category>

		<category><![CDATA[Product Review]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=447</guid>
		<description><![CDATA[The demandblog has been posting some AppExchange application reviews recently.  They did a good one for ActevaRSVP, who has a pretty impressive product.  See their review at http://demandbase.typepad.com/demand/2008/10/dreamforce-prev.html.
Note: ActevaRSVP is a current advertiser on this blog.
]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://demandbase.typepad.com" target="_blank">demandblog</a> has been posting some AppExchange application reviews recently.  They did a good one for ActevaRSVP, who has a pretty impressive product.  See their review at <a href="http://demandbase.typepad.com/demand/2008/10/dreamforce-prev.html" target="_blank">http://demandbase.typepad.com/demand/2008/10/dreamforce-prev.html</a>.</p>
<p><em>Note: ActevaRSVP is a current advertiser on this blog.</em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?a=s91Qm"><img src="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?i=s91Qm" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~4/437127749" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/10/30/actevarsvp-review/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=PerspectivesOnSalesforcecom&amp;itemurl=http%3A%2F%2Fsfdc.arrowpointe.com%2F2008%2F10%2F30%2Factevarsvp-review%2F</feedburner:awareness><feedburner:origLink>http://sfdc.arrowpointe.com/2008/10/30/actevarsvp-review/</feedburner:origLink></item>
		<item>
		<title>Arrowpointe @ Dreamforce 2008</title>
		<link>http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~3/431033526/</link>
		<comments>http://sfdc.arrowpointe.com/2008/10/24/arrowpointe-dreamforce-2008/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 19:34:19 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
		
		<category><![CDATA[Dreamforce 2008]]></category>

		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=429</guid>
		<description><![CDATA[Dreamforce is just around the corner.   If you are already registered, be sure to visit the Attendee Portal to create a calendar of the sessions to attend.  Also, if you are so inclined, it&#8217;s a great opportunity to get certified.  Salesforce is offering a voucher for a free certification exam sitting ($200 value).  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dreamforce.com" target="_blank"><img style="float: left; margin: 0 5px 5px; 0" title="Dreamforce 2008" src="http://sfdc.arrowpointe.com/wp-content/images/dreamforce2008.png" alt="Dreamforce 2008" width="150" height="60" /></a>Dreamforce is just around the corner.   If you are already registered, be sure to visit the <a href="https://dreamforcereg.force.com/" target="_blank">Attendee Portal</a> to create a calendar of the sessions to attend.  Also, if you are so inclined, it&#8217;s a great opportunity to get certified.  Salesforce is offering a voucher for a free certification exam sitting ($200 value).  Go <a href="http://www.salesforce.com/dreamforce/DF08/develop.jsp" target="_blank">here</a> for more information.</p>
<p>One session you won&#8217;t want to miss is the one I am speaking at!</p>
<p style="padding-left: 30px; font-size: 85%;"><strong>Enhancing Your Force Platform Apps with Google Geo &amp; Maps APIs</strong><br />
You&#8217;ve seen basic Google Maps mashups, but did you know there are new API capabilities that support Flash-based maps, Google Earth, geo-coding, and other advanced visualizations? Join experts from the Google Geo API team as they show you how to implement new types of geo-enabled Force Platform apps.</p>
<p style="padding-left: 30px; font-size: 85%;">Wednesday, November 5<br />
11:30 a.m. - 12:30 p.m.</p>
<p style="padding-left: 30px; font-size: 85%;"><span style="text-decoration: underline;">Presented By</span><br />
Ron Hess, Salesforce.com<br />
Billy Rutledge, Google Inc.<br />
Ossama Alami, Google Inc.<br />
Scott Hemmeter, Arrowpointe Corp.</p>
<p>It is on the <a href="http://www.salesforce.com/dreamforce/DF08/develop.jsp" target="_blank">Tour De Force</a> track.  <strong>In that session, I will be making an exciting announcement. </strong>If you are familiar with <a href="http://www.arrowpointe.com/maps" target="_blank">Arrowpointe Maps</a>, you can probably guess what that announcement will be.</p>
<p>Arrowpointe does not have a booth this year, but I will all around the convention, primarily attending the developer track sessions.  If you would like to try and meet up, contact me.  If we don&#8217;t have each other&#8217;s contact information, please submit your&#8217;s <a href="http://www.arrowpointe.com/contact/df-2008/" target="_blank">here</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?a=gaUgm"><img src="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?i=gaUgm" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~4/431033526" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/10/24/arrowpointe-dreamforce-2008/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=PerspectivesOnSalesforcecom&amp;itemurl=http%3A%2F%2Fsfdc.arrowpointe.com%2F2008%2F10%2F24%2Farrowpointe-dreamforce-2008%2F</feedburner:awareness><feedburner:origLink>http://sfdc.arrowpointe.com/2008/10/24/arrowpointe-dreamforce-2008/</feedburner:origLink></item>
		<item>
		<title>Arrowpointe Maps 1.2.1</title>
		<link>http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~3/411722434/</link>
		<comments>http://sfdc.arrowpointe.com/2008/10/05/arrowpointe-maps-121/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 07:47:05 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
		
		<category><![CDATA[Arrowpointe Maps]]></category>

		<category><![CDATA[Arrowpointe Products]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=422</guid>
		<description><![CDATA[Version 1.2.1 of Arrowpointe Maps was just released.  You can read about all the improvements on the Change History page.
The changes most applicable to end users are:

Search Nearby now includes the ability to start from an arbitrary address.  The Other Tools section of the front page now has a &#8220;Search Nearby&#8221; link.  This link [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.arrowpointe.com/products/arrowpointe-maps/change-history/" target="_blank">Version 1.2.1</a> of <a href="http://www.arrowpointe.com/maps" target="_blank">Arrowpointe Maps</a> was just released.  You can read about all the improvements on the <a href="http://www.arrowpointe.com/products/arrowpointe-maps/change-history/" target="_blank">Change History</a> page.</p>
<p>The changes most applicable to end users are:</p>
<ul>
<li>Search Nearby now includes the ability to start from an arbitrary address.  The Other Tools section of the front page now has a &#8220;Search Nearby&#8221; link.  This link will let you search for a Lead, Account or Contact or you can manually enter an address.  When in the midst of a Search Nearby process, clicking the Start Over button will also bring you to this page.</li>
<li>You can now assign specific icons/colors to your Data Sets.  Edit your Data Set and select a Data Set Image.  You can see the image used for each Data Set by viewing your list of Data Sets in the Admin Area of the application.</li>
<li>The Company/Account Name is automatically included for Lead/Contact Search Nearby searches.</li>
<li>The first 3 fields configured for a Data Set will now appear in the table of results.  All configured fields still appear in the map marker bubble on the map.</li>
<li>Search Nearby queries now allow you to use decimal amounts for a range (e.g. 0.25 miles)</li>
<li>Number fields on Map Pages now accept decimal amounts.</li>
<li>You can now see a list of the records that failed to map.  On a result set, you currently see something like &#8220;29 of 30 records successfully mapped&#8221;.  If there is an errored record, a link that says &#8220;Show Unmappable Records&#8221; will appear and you can click it to see a list of the records that did not map properly.</li>
<li>The Color Markers By parameter now saves with each Map Report run and will be automatically set for users when that report is mapped the next time.</li>
<li>The Language and Unit of Measure (miles vs. kilometers) on the Routing screen are now saved as a user preference.</li>
<li>The last Data Set, Range and Unit of Measure (miles vs. kilometers) used in a Search Nearby query are now saved as a user preference.</li>
<li>Improved performance on the initial load of the Routing screen.  This improvement also fixes the issue with IE6 and its sporadic inability to load routed records.</li>
</ul>
<p><strong>NOTE</strong>: This upgrade was automatically completed for all users.  It does not require any changes to the AppExchange installation.</p>
<h6>About Arrowpointe Maps</h6>
<p>Arrowpointe Maps is an <span style="text-decoration: underline;">on-demand mapping platform</span> that facilitates a conversation between <strong>Salesforce.com &amp; MapQuest</strong> allowing for easy deployment of mapping capabilities in your organization and providing end-users a simple means for mapping their data. Arrowpointe Maps is configurable and can be tailored to your organization, so that your users can work with their information in a meaningful way.</p>
<p>The official location for information on Arrowpointe Maps is its product page at <a href="http://www.arrowpointe.com/maps" target="_blank"><strong>http://www.arrowpointe.com/maps</strong></a>. There, you will find answers to the most frequently asked questions, screencasts and links to its <a href="http://www.arrowpointe.com/getmaps" target="_blank">AppExchange page</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?a=HMoJm"><img src="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?i=HMoJm" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~4/411722434" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/10/05/arrowpointe-maps-121/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=PerspectivesOnSalesforcecom&amp;itemurl=http%3A%2F%2Fsfdc.arrowpointe.com%2F2008%2F10%2F05%2Farrowpointe-maps-121%2F</feedburner:awareness><feedburner:origLink>http://sfdc.arrowpointe.com/2008/10/05/arrowpointe-maps-121/</feedburner:origLink></item>
		<item>
		<title>“Salesforce User Community 3.0″ on Facebook</title>
		<link>http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~3/408456838/</link>
		<comments>http://sfdc.arrowpointe.com/2008/10/01/salesforce-user-community-30-on-facebook/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 17:45:50 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
		
		<category><![CDATA[The Community]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=418</guid>
		<description><![CDATA[A new Facebook Group popped up recently called &#8220;Salesforce User Community 3.0&#8220;.  The group moderator, Pete Fife, asked me to communicate the following note to my readers:
Do you wonder if Salesforce.com listens to their customers and what they want from the user community? Take it from me, they do even if it takes a little [...]]]></description>
			<content:encoded><![CDATA[<p>A new Facebook Group popped up recently called &#8220;<a href="http://www.new.facebook.com/group.php?gid=26018154108" target="_blank">Salesforce User Community 3.0</a>&#8220;.  The group moderator, Pete Fife, asked me to communicate the following note to my readers:</p>
<blockquote><p>Do you wonder if Salesforce.com listens to their customers and what they want from the user community? Take it from me, they do even if it takes a little squeaking to get their ear. Join me, Pete Fife, to discuss taking the Salesforce.com community beyond disucssion boards and into the new world of social commuinty. I started the customer salesforce user groups back in 2003 and although we have come a long way since then, there is a long way to go to really enable us customers to define our own vision of the Salesforce.com Community. Take advantage of the chance to bring our collective wishes for the user community to the ears of Salesforce.com. They are our captive audience and ready to listen.</p>
<p>Join the Facebook group Salesforce User Community 3.0 to stay up to date and find out when and were we&#8217;ll meet at Dreamforce.</p>
<p>FB group link: <a onmousedown="UntrustedLink.bootstrap($(this), &quot;e12e4d9a9b9c12cea9b2af59ecdf9b2c&quot;, event)" rel="nofollow" href="http://www.new.facebook.com/group.php?gid=26018154108" target="_blank"><span>http://www.new.facebook.co</span><span>m/group.php?gid=2601815410</span>8</a></p></blockquote>
<p>Please join the group if you wish to participate in the community.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?a=Dwjlm"><img src="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?i=Dwjlm" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~4/408456838" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/10/01/salesforce-user-community-30-on-facebook/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=PerspectivesOnSalesforcecom&amp;itemurl=http%3A%2F%2Fsfdc.arrowpointe.com%2F2008%2F10%2F01%2Fsalesforce-user-community-30-on-facebook%2F</feedburner:awareness><feedburner:origLink>http://sfdc.arrowpointe.com/2008/10/01/salesforce-user-community-30-on-facebook/</feedburner:origLink></item>
		<item>
		<title>Sidebar Summary using Visualforce</title>
		<link>http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~3/395929028/</link>
		<comments>http://sfdc.arrowpointe.com/2008/09/17/sidebar-summary-using-visualforce/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 06:11:41 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
		
		<category><![CDATA[APEX Code]]></category>

		<category><![CDATA[API]]></category>

		<category><![CDATA[Arrowpointe Products]]></category>

		<category><![CDATA[Configuration]]></category>

		<category><![CDATA[Sidebar Summary]]></category>

		<category><![CDATA[Tips]]></category>

		<category><![CDATA[Visualforce]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=395</guid>
		<description><![CDATA[About a year ago, I posted about the Sidebar Summary.  The Sidebar Summary exists in the Salesforce.com sidebar and displays the counts of some important queries.  The counts are also hyperlinks to a view or report representing that query.  It&#8217;s a very handy thing to have in your sidebar and I use it all the [...]]]></description>
			<content:encoded><![CDATA[<p>About a year ago, I posted about the <a href="http://sfdc.arrowpointe.com/2007/08/28/sidebar-summary/" target="_self">Sidebar Summary</a>.  The Sidebar Summary exists in the Salesforce.com sidebar and displays the counts of some important queries.  The counts are also hyperlinks to a view or report representing that query.  It&#8217;s a very handy thing to have in your sidebar and I use it all the time for my own work.  However, because it&#8217;s an s-Control, it runs a little slow.  In fact, it ran slow enough to make me uncheck the user interface option &#8220;Show Custom Sidebar Components on All Pages&#8221;.</p>
<p style="text-align: center;"><img class="size-full wp-image-398 aligncenter" title="sidebarsummary" src="http://sfdc.arrowpointe.com/wp-content/images/sidebarsummary.png" alt="" width="353" height="310" /></p>
<p>I changed it into a Visualforce page with a custom Apex controller and now it runs super fast and I am able to keep the &#8220;Show Custom Sidebar Components on All Pages&#8221; option turned on and see it on every page I go to.  There&#8217;s a bit of hardcoding in here, but it gets the job done pretty well.  Bye bye s-Control.</p>
<p><span style="text-decoration: underline;"><strong>Visualforce</strong></span></p>
<p>The Page is almost all raw HTML.  The only dynamic thing in there are the count values.  Each one retrieves the value from a specific &#8220;get&#8221; method in the controller.  If you like the queries I use, then the only thing you&#8217;ll need to confirm are the URLs that get linked to.  The first 2 go to Views in my Org and the last 2 go to Reports in my Org.  You&#8217;ll need to change those URLs.</p>
<p>I named the VF Page &#8220;<span id="j_id0:theTemplate:j_id7:j_id8:j_id16:j_id17">SidebarSummary&#8221;.</span></p>
<pre class="syntax-highlight:html">

&lt;apex:page controller=&quot;VFController_Sidebar_Summary&quot; sidebar=&quot;false&quot; showHeader=&quot;false&quot; standardStylesheets=&quot;true&quot;&gt;
&lt;style type=&quot;text/css&quot; media=&quot;all&quot;&gt;
body{margin: 0; padding: 0; color: #000000; background-color: #E8E8E8;}
#DIV_Container {background-color: #F3F3EC;}
&lt;/style&gt;
&lt;div id=&quot;DIV_Container&quot;&gt;
&lt;table&gt;
&lt;tr&gt;&lt;td&gt;&lt;em&gt;Unread Leads&lt;/em&gt;:  &lt;/td&gt;&lt;td&gt;&lt;a href=&quot;/00Q?fcf=00B30000005JhsT&quot; target=&quot;_parent&quot;&gt;&lt;b&gt;{!UnreadLeads}&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;em&gt;Leads - Not Contacted&lt;/em&gt;:  &lt;/td&gt;&lt;td&gt;&lt;a href=&quot;/00Q?fcf=00B30000005Jhru&quot; target=&quot;_parent&quot;&gt;&lt;b&gt;{!NotContactedLeads}&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;em&gt;Oppty - Next 30 Days&lt;/em&gt;:  &lt;/td&gt;&lt;td&gt;&lt;a href=&quot;/00O30000001aEHV&quot; target=&quot;_parent&quot;&gt;&lt;b&gt;{!Next30DayOppty}&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;em&gt;Oppty - Past Due&lt;/em&gt;:  &lt;/td&gt;&lt;td&gt;&lt;a href=&quot;/00O30000001aEHV&quot; target=&quot;_parent&quot;&gt;&lt;b&gt;{!PastDueOppty}&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/apex:page&gt;
</pre>
<p><span style="text-decoration: underline;"><strong>Apex</strong></span></p>
<p>The controller has a method for each query to be run.  Each query is a count() query and returns an Integer.  At the end is a really lame Test method, but it does get 100% of the code covered.  I am certain the code works, so I didn&#8217;t do too much with the Test method.  Salesforce just requires the code to be tested.</p>
<pre class="syntax-highlight:java">

public class VFController_Sidebar_Summary {

public Integer getUnreadLeads() {
return [
select count() from Lead
where IsConverted = False
AND IsUnreadByOwner = TRUE
];
}

public Integer getNotContactedLeads() {
return [
select count() from Lead
where IsConverted = False
AND Status = &#039;Open - Not Contacted&#039;
];
}

public Integer getNext30DayOppty() {
return [
select count() from Opportunity
where IsClosed = False
AND (CloseDate = Next_N_DAYS:30 OR CloseDate = TODAY)
];
}

public Integer getPastDueOppty() {
return [
select count() from Opportunity
where IsClosed = False
AND CloseDate &lt; TODAY
];
}

static testMethod void testVFController_Sidebar_Summary() {
Test.setCurrentPageReference(new PageReference(&#039;Page.SidebarSummary&#039;));
VFController_Sidebar_Summary controller = new VFController_Sidebar_Summary();
Integer i1 = controller.getUnreadLeads();
Integer i2 = controller.getNotContactedLeads();
Integer i3 = controller.getNext30DayOppty();
Integer i4 = controller.getPastDueOppty();
}

}
</pre>
<p><span style="text-decoration: underline;"><strong>Homepage HTML Component</strong></span></p>
<p>I created a component for the Narrow side and put the following HTML into the editor.  Essentially, you create an IFRAME and embed the VF page into it.  I found a (unsupported) trick on the forums to remove the developer bar from a page.  Just add <strong>?core.apexpages.devmode.url=1</strong> to the URL.  This will turn off development mode when that page is rendered.  This is important for this little iFrame page on the sidebar.  From what I&#8217;ve gathered, this hack is not supported and could change at any time.</p>
<p>The code below should work for you.  The only thing you might need to change is the Page URL if you didn&#8217;t name your page SidebarSummary and the height of it.</p>
<pre class="syntax-highlight:html">

&lt;iframe src=&quot;/apex/SidebarSummary?core.apexpages.devmode.url=1&quot; frameborder=&quot;0&quot; height=&quot;100&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;
</pre>
<p>Let me know what you think.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?a=R0cAl"><img src="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?i=R0cAl" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~4/395929028" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/09/17/sidebar-summary-using-visualforce/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=PerspectivesOnSalesforcecom&amp;itemurl=http%3A%2F%2Fsfdc.arrowpointe.com%2F2008%2F09%2F17%2Fsidebar-summary-using-visualforce%2F</feedburner:awareness><feedburner:origLink>http://sfdc.arrowpointe.com/2008/09/17/sidebar-summary-using-visualforce/</feedburner:origLink></item>
		<item>
		<title>Winter 09 Release (links)</title>
		<link>http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~3/392912484/</link>
		<comments>http://sfdc.arrowpointe.com/2008/09/14/winter-09-release-links/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 05:33:37 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
		
		<category><![CDATA[Releases]]></category>

		<category><![CDATA[Winter '09]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=388</guid>
		<description><![CDATA[Links are below to learn about the Winter 09 release.

Winter 09 Wiki
Winter 09 Ideas
Release Notes (PDF)
Admin Preview (PDF)
Preview Page
Get a Winter 09 Trial Org
Release Schedule. The schedule as of now is:

Sandbox: September 19
NA1 &#38; NA6: October 3
NA2, NA3, NA4, NA5: October 10
NA0, AP0, EU0, CS1 (Sandbox): October 11



]]></description>
			<content:encoded><![CDATA[<p>Links are below to learn about the Winter 09 release.</p>
<ul>
<li><a href="http://wiki.apexdevnet.com/index.php/Winter_09" target="_blank">Winter 09 Wiki</a></li>
<li><a href="http://ideas.salesforce.com/popular/coming_in_winter_09" target="_blank">Winter 09 Ideas</a></li>
<li><a href="https://na1.salesforce.com/help/doc/en/salesforce_winter09_release_notes.pdf" target="_blank">Release Notes (PDF)</a></li>
<li><a href="http://www.salesforce.com/assets/pdf/misc/winter09_release_preview.pdf" target="_blank">Admin Preview (PDF)</a></li>
<li><a href="http://www.salesforce.com/products/previews/winter09/" target="_blank">Preview Page</a></li>
<li><a href="https://prerelwww.pre.salesforce.com/form/trial/prerelease_winter09.jsp" target="_blank">Get a Winter 09 Trial Org</a></li>
<li><a href="http://trust.salesforce.com/trust/status/maintenance.html" target="_blank">Release Schedule</a>. The schedule as of now is:
<ul>
<li>Sandbox: September 19</li>
<li>NA1 &amp; NA6: October 3</li>
<li>NA2, NA3, NA4, NA5: October 10</li>
<li>NA0, AP0, EU0, CS1 (Sandbox): October 11</li>
</ul>
</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?a=yPppl"><img src="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?i=yPppl" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~4/392912484" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/09/14/winter-09-release-links/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=PerspectivesOnSalesforcecom&amp;itemurl=http%3A%2F%2Fsfdc.arrowpointe.com%2F2008%2F09%2F14%2Fwinter-09-release-links%2F</feedburner:awareness><feedburner:origLink>http://sfdc.arrowpointe.com/2008/09/14/winter-09-release-links/</feedburner:origLink></item>
		<item>
		<title>Bulkifying a Trigger (an example)</title>
		<link>http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~3/391874595/</link>
		<comments>http://sfdc.arrowpointe.com/2008/09/13/bulkifying-a-trigger-an-example/#comments</comments>
		<pubDate>Sat, 13 Sep 2008 23:11:11 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
		
		<category><![CDATA[APEX Code]]></category>

		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=372</guid>
		<description><![CDATA[Back in June, I blogged about a trigger I made to auto-create a Campaign Member record for new Leads if the Lead Source value matched the Name of an existing Campaign.  Steve Andersen rightfully commented on that post about the need to bulkify the trigger.  I have been pretty slow in learning Apex and over [...]]]></description>
			<content:encoded><![CDATA[<p>Back in June, I <a href="http://sfdc.arrowpointe.com/2008/06/19/auto-create-campaign-members-for-new-leads/" target="_blank">blogged about</a> a trigger I made to auto-create a Campaign Member record for new Leads if the Lead Source value matched the Name of an existing Campaign.  <a href="http://www.gokubi.com" target="_blank">Steve Andersen</a> rightfully commented on that post about the need to bulkify the trigger.  I have been pretty slow in learning Apex and over the past week or so things have started clicking for me.  I am now (finally) beginning to &#8220;get it&#8221;.  With the help of <a href="http://www.mkpartners.com" target="_blank">Matt Kaufman</a> and a friend at Salesforce, I have come to understand Apex a bit more and can much more easily apply it to my day to day Salesforce work.</p>
<p>Therefore, I thought I should correct the trigger I wrote and make it bulkified.  This should serve as a good before and after example of a trigger that accomplishes the same thing, but is now bulkified.  </p>
<p><strong>The original Trigger</strong><br />
Below is how the trigger looked originally.</p>
<pre class="syntax-highlight:java">
trigger Create_CampaignMember_For_New_Leads on Lead (after insert) {

	try {	

		if (Trigger.new.size() == 1) {

			List &lt;CampaignMember&gt; cm = new list&lt;CampaignMember&gt;();

			for(Lead L : Trigger.new) {

					String cname = L.leadsource;

					// Added for AppExchange Partners that get leads via AppExchange where Salesforce added the &quot;dup-&quot; term to signify a duplicate
					String replaceText2 = &#039;dup-&#039;;
					cname = cname.replace(replaceText2,&#039;&#039;);

					List &lt;Campaign&gt; c = [select id, name from Campaign where name = :cname limit 1];

					if(!c.isEmpty()){
						CampaignMember cml = new CampaignMember();
						cml.campaignid = c[0].id;
						cml.leadid = l.id;
						cm.add(cml);
					}
			}

			if(!cm.isEmpty()){
				insert cm;
			}
		}

	} catch(Exception e) {
		system.debug (&#039;error: &#039; + e.getMessage() );
	}
}
</pre>
<p><strong>Bulkified Trigger</strong><br />
And now a corrected version to be bulkified.</p>
<pre class="syntax-highlight:java">
trigger Create_CampaignMember_For_New_Leads on Lead (after insert) {

	/*
    * Loop through all leads and collect the necessary lists
    */
	list&lt;Lead&gt; theLeads = new list&lt;Lead&gt;(); // List containing each Lead being processed
	list&lt;String&gt; cNames = new list&lt;String&gt;(); // List of Campaign Names
	map&lt;String, String&gt; map_lSource_to_cName = new map&lt;String, String&gt;(); // Mapping Lead Sources to Campaign Names. We have this because we are cleaning up Lead Sources in some cases.
	String wrkText = &#039;&#039;; // Temporary, working variable
	String replaceText = &#039;dup-&#039;; // Text to replace. This is included for ISV partners who want to remove the &quot;-dup&quot; string that is included for duplicate AppExchange Lead Submissions  

		for(Lead l:trigger.new) {
			theLeads.add(l); // add lead to the main lead list
			if (l.leadsource != null) {
				wrkText = l.leadsource;
				wrkText = wrkText.replace(replaceText,&#039;&#039;);
				cNames.add(wrkText); // add to list of Campaign Names
				map_lSource_to_cName.put(l.leadsource,wrkText); // add to map of Lead Sources to Campaign Names
			}
		}

	/*
	* Create a map containing an association of Campaign Names to Campaign IDs
	*/
	list&lt;Campaign&gt; theCampaigns = [SELECT Id, Name FROM Campaign WHERE Name IN :cNames]; // Campaign sObjects we are dealing with
	map&lt;String, ID&gt; map_cName_to_cID = new map&lt;String, ID&gt;(); // Mapping Campaign Names to Campaign IDs

		for (Campaign c:theCampaigns) {
			map_cName_to_cID.put(c.Name,c.Id);
		}

	/*
	* Loop through the main list of Leads
	*/
	list &lt;CampaignMember&gt; theCampaignMembers = new list&lt;CampaignMember&gt;(); // List containing Campaign Member records to be inserted

	for (Lead l:theLeads) {
		if(map_cName_to_cID.get(map_lSource_to_cName.get(l.leadsource)) != null) {
			CampaignMember cml = new CampaignMember();
			cml.leadid = l.id;
			cml.campaignid = map_cName_to_cID.get(map_lSource_to_cName.get(l.leadsource));
			theCampaignMembers.add(cml);
		}

	}

	/*
	* Insert the list of Campaign Members
	*/
	if(!theCampaignMembers.isEmpty()){
		insert theCampaignMembers;
	}

}
</pre>
<p><strong>Updated Test Class (100% code coverage)</strong><br />
I updated the test class too to make it cover 100% of the code.</p>
<pre class="syntax-highlight:java">
public class Create_CampaignMember_For_New_Leads {

	static testMethod void Create_CampaignMember_For_New_Leads() {

		// Create a Campaign to be matched on
		Campaign C1 = new Campaign();
		C1.Name = &#039;Matching Campaign&#039;;
		insert C1;

		// Create a Lead with a Lead Source matching a Campaign
		Lead L1 = new Lead();
		L1.lastname = &#039;Create_CampaignMember_For_New_Leads&#039;;
		L1.firstname = &#039;Test For&#039;;
		L1.company = &#039;Company ABC&#039;;
		L1.leadsource = &#039;Matching Campaign&#039;;

		insert L1;
		String holder = L1.id;

		List &lt;CampaignMember&gt; cm = [select id from CampaignMember where leadid = :holder limit 1];
		system.AssertEquals(1,cm.size());

		// Create a Lead without a Lead Source matching a Campaign
		Lead L2 = new Lead();
		L2.lastname = &#039;Create_CampaignMember_For_New_Leads&#039;;
		L2.firstname = &#039;Test For&#039;;
		L2.company = &#039;Company ABC&#039;;
		L2.leadsource = &#039;No Matching Campaign&#039;;

		insert L2;

		String holder2 = L2.id;

		List &lt;CampaignMember&gt; cm2 = [select id from CampaignMember where leadid = :holder2 limit 1];
		system.AssertEquals(0,cm2.size());

	}

}
</pre>
<p>Feel free to make additional recommendations on this code.  I updated the <a href="http://code.google.com/p/arrowpointe/" target=_blank>Arrowpointe Google Code Site</a> with this code too.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?a=5eaWl"><img src="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?i=5eaWl" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~4/391874595" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/09/13/bulkifying-a-trigger-an-example/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=PerspectivesOnSalesforcecom&amp;itemurl=http%3A%2F%2Fsfdc.arrowpointe.com%2F2008%2F09%2F13%2Fbulkifying-a-trigger-an-example%2F</feedburner:awareness><feedburner:origLink>http://sfdc.arrowpointe.com/2008/09/13/bulkifying-a-trigger-an-example/</feedburner:origLink></item>
		<item>
		<title>Ideas coming in the Winter ‘09 Release</title>
		<link>http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~3/371553014/</link>
		<comments>http://sfdc.arrowpointe.com/2008/08/21/ideas-coming-in-the-winter-09-release/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 04:35:10 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
		
		<category><![CDATA[Releases]]></category>

		<category><![CDATA[Winter '09]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=366</guid>
		<description><![CDATA[I noticed that a recent idea of mine was marked as coming in the Winter &#8216;09 release.  I decided to check if I could craft a URL to see others tagged as such and, sure enough, it worked.
http://ideas.salesforce.com/popular/coming_in_winter_09 
]]></description>
			<content:encoded><![CDATA[<p>I noticed that a <a href="http://ideas.salesforce.com/article/show/10087556/Upload_Document_to_create_Google_Doc" target="_blank">recent idea of mine</a> was marked as coming in the Winter &#8216;09 release.  I decided to check if I could craft a URL to see others tagged as such and, sure enough, it worked.</p>
<p><a href="http://ideas.salesforce.com/popular/coming_in_winter_09" target="_blank">http://ideas.salesforce.com/popular/coming_in_winter_09</a> <a href="http://ideas.salesforce.com/xml/rss?tags_string=coming_in_winter_09&amp;menu_string=hot&amp;skin=null"><img class="alignnone size-full wp-image-326" title="feed-icon-12x12" src="http://sfdc.arrowpointe.com/wp-content/images/feed-icon-12x12.png" alt="" width="12" height="12" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?a=7ahZik"><img src="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?i=7ahZik" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~4/371553014" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/08/21/ideas-coming-in-the-winter-09-release/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=PerspectivesOnSalesforcecom&amp;itemurl=http%3A%2F%2Fsfdc.arrowpointe.com%2F2008%2F08%2F21%2Fideas-coming-in-the-winter-09-release%2F</feedburner:awareness><feedburner:origLink>http://sfdc.arrowpointe.com/2008/08/21/ideas-coming-in-the-winter-09-release/</feedburner:origLink></item>
		<item>
		<title>Auto vCard Usage thru July 08</title>
		<link>http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~3/362402169/</link>
		<comments>http://sfdc.arrowpointe.com/2008/08/11/auto-vcard-usage-thru-july-08/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 23:45:20 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
		
		<category><![CDATA[Arrowpointe Products]]></category>

		<category><![CDATA[Auto vCard]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=355</guid>
		<description><![CDATA[Auto vCard usage continues to grow.  The script received a high of 7425 hits in May 2008 only to drop off in June and July.   If history is an indication, it should pick up again this month.
The stats through July 2008 are below:


Auto vCard consists of 2 custom buttons (one each for Leads [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.salesforce.com/appexchange/detail_overview.jsp?id=a0330000001D8YnAAK" target="_blank">Auto vCard</a> usage continues to grow.  The script received a high of 7425 hits in May 2008 only to drop off in June and July.   If history is an indication, it should pick up again this month.</p>
<p>The stats through July 2008 are below:</p>
<p><img class="alignnone size-full wp-image-356" title="vcard-stats-july-2008" src="http://sfdc.arrowpointe.com/wp-content/images/vcard-stats-july-2008.png" alt="" width="500" height="399" /></p>
<p><img class="alignnone size-full wp-image-357" title="vcard-stats-cumulative-july-2008" src="http://sfdc.arrowpointe.com/wp-content/images/vcard-stats-cumulative-july-2008.png" alt="" width="500" height="399" /></p>
<p>Auto vCard consists of 2 custom buttons (one each for Leads and Contacts) that allow you to create a vCard file for a specific record.  In other words, you click a button in Salesforce to save that contact/lead to Outlook or another PIM.</p>
<ul>
<li><a title="Go to Auto vCard on the App Exchange" href="https://www.salesforce.com/appexchange/detail_overview.jsp?id=a0330000001D8YnAAK" target="_blank">Get Auto vCard</a> from the AppExchange.  It&#8217;s free.</li>
<li>View the <a href="http://www.arrowpointe.com/products/auto-vcard/" target="_blank">Auto vCard product page</a> on arrowpointe.com</li>
<li>Read the Auto vCard <a href="http://www.arrowpointe.com/products/auto-vcard/auto-vcard-privacy-policy/" target="_blank">privacy policy</a> to learn about how your information is handled in this application.</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?a=TlXTbk"><img src="http://feeds.feedburner.com/~f/PerspectivesOnSalesforcecom?i=TlXTbk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PerspectivesOnSalesforcecom/~4/362402169" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/08/11/auto-vcard-usage-thru-july-08/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=PerspectivesOnSalesforcecom&amp;itemurl=http%3A%2F%2Fsfdc.arrowpointe.com%2F2008%2F08%2F11%2Fauto-vcard-usage-thru-july-08%2F</feedburner:awareness><feedburner:origLink>http://sfdc.arrowpointe.com/2008/08/11/auto-vcard-usage-thru-july-08/</feedburner:origLink></item>
	<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetFeedData?uri=PerspectivesOnSalesforcecom</feedburner:awareness></channel>
</rss>
