<?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>Perspectives on Salesforce.com &#187; API</title>
	<atom:link href="http://sfdc.arrowpointe.com/taxonomy/category/API/feed/" rel="self" type="application/rss+xml" />
	<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>
	<lastBuildDate>Thu, 24 Jun 2010 06:02:39 +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>Calling Apex Web Services from PHP</title>
		<link>http://sfdc.arrowpointe.com/2008/12/05/calling-apex-web-services-from-php/</link>
		<comments>http://sfdc.arrowpointe.com/2008/12/05/calling-apex-web-services-from-php/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 21:31:07 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
				<category><![CDATA[APEX Code]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=475</guid>
		<description><![CDATA[Apex Code can be exposed as a Web Service and made available outside of your Salesforce environment (e.g. from a PHP page).  This approach essentially lets you build a personal API into your Salesforce org and eliminates the need for calling standard API methods in PHP code where it is vulnerable to your configuration [...]]]></description>
			<content:encoded><![CDATA[<p>Apex Code can be exposed as a Web Service and made available outside of your Salesforce environment (e.g. from a PHP page).  This approach essentially lets you build a personal API into your Salesforce org and eliminates the need for calling standard API methods in PHP code where it is vulnerable to your configuration changes.</p>
<p>Working with the folks over at <a href="http://www.mkpartners.com" target="_blank">MK Partners</a> on some recent projects, I&#8217;ve learned how to call into Apex Web Services from PHP.  It&#8217;s actually pretty easy.  Special thanks for <a href="http://www.pocketsoap.com" target=_blank>Simon Fell</a> for helping me through a particularly tricky part.</p>
<h6>Apex Web Service Class</h6>
<p>A simple web service class is below.  The method we call from PHP is <strong>myMethod</strong>.  There are 2 inner classes that are used to capture inputs and send back outputs to PHP.</p>
<pre class="brush: java">
global class MyWebService {

    // A class to accept an array of input records (e.g. product/amount combinations)
    global class myInputs{
        webservice Id productId;
        webservice Double amount;
    }

    // A class to send back as an output to PHP
    global class myOutputs{
        webservice String errorMessage;
        webservice Boolean success;
        webservice List&lt;myInputs&gt; inputs;
        webservice Id contactId;
    }

    // The actual web service method we will call
    webservice static myOutputs myMethod(Id contactId, List&lt;myInputs&gt; inputs){

        /*
        * Write a bunch of code here to do all kinds of stuff.
        */

        myOutputs output = new myOutputs();
            output.errorMessage = &#039;No errors here.&#039;;
            output.success = true;
            output.inputs = inputs;
            output.contactId = contactId;
        return output;

    }
}
</pre>
<h6>PHP</h6>
<p>Login like you normally would using the PHP toolkit.  Nothing new here.  The final part is defining some constants for use later when we call the web service.</p>
<pre class="brush: php">
// Include the PHP Toolkit
require_once(&#039;salesforceAPI/SforcePartnerClient.php&#039;);
require_once(&#039;salesforceAPI/SforceHeaderOptions.php&#039;);

// Login
$sfdc = new SforcePartnerClient();
$SoapClient = $sfdc-&gt;createConnection(&#039;salesforceAPI/wsdl.xml&#039;);
$loginResult = false;
$loginResult = $sfdc-&gt;login(&#039;user@domain.com&#039;, &#039;password&#039; . &#039;securitytoken&#039;);

// Define constants for the web service. We&#039;ll use these later
$parsedURL = parse_url($sfdc-&gt;getLocation());
define (&quot;_SFDC_SERVER_&quot;, substr($parsedURL[&#039;host&#039;],0,strpos($parsedURL[&#039;host&#039;], &#039;.&#039;)));
define (&quot;_WS_NAME_&quot;, &#039;MyWebService&#039;);
define (&quot;_WS_WSDL_&quot;, _WS_NAME_ . &#039;.xml&#039;);
define (&quot;_WS_ENDPOINT_&quot;, &#039;https://&#039; . _SFDC_SERVER_ . &#039;.salesforce.com/services/wsdl/class/&#039; . _WS_NAME_);
define (&quot;_WS_NAMESPACE_&quot;, &#039;http://soap.sforce.com/schemas/class/&#039; . _WS_NAME_);
</pre>
<p>Next we will call the web service.  First thing to do is setup a Soap Client and modify the headers.  Then we are setting up some fake data that maps to the expected inputs of the myMethod method in the web service.  Then we actually call the web service.</p>
<pre class="brush: php">
// SOAP Client for Web Service
$client = new SoapClient(_WS_WSDL_);
$sforce_header = new SoapHeader(_WS_NAMESPACE_, &quot;SessionHeader&quot;, array(&quot;sessionId&quot; =&gt; $sfdc-&gt;getSessionId()));
$client-&gt;__setSoapHeaders(array($sforce_header));

// Setup fake data to send into the web service
$prodAmtArray = array();
	$prodAmtArray[] = array(&#039;productId&#039;=&gt;&#039;01t60000000lvBN&#039;,&#039;amount&#039;=&gt;100);
	$prodAmtArray[] = array(&#039;productId&#039;=&gt;&#039;01t60000000lvBS&#039;,&#039;amount&#039;=&gt;200);

$wrkArray = array(
				&#039;contactId&#039;=&gt;&#039;0036000000nVtpT&#039;,
				&#039;inputs&#039;=&gt;$prodAmtArray
				);

// Call the web service
$response = $client-&gt;myMethod($wrkArray);

// Output results to browser
echo &quot;&lt;p&gt;&lt;pre&gt;&quot; . print_r($response, true) . &quot;&lt;/pre&gt;&lt;/p&gt;&quot;;
echo &quot;Contact Id is &quot; . $response-&gt;result-&gt;contactId;
</pre>
<h6>Results</h6>
<p>Below displays what those 2 echo statements output.</p>
<pre style='line-height:1.2em; font-size: 1.3em;'>
stdClass Object
(
    [result] => stdClass Object
        (
            [contactId] => 0036000000nVtpTAAS
            [errorMessage] => No errors here.
            [inputs] => Array
                (
                    [0] => stdClass Object
                        (
                            [amount] => 100
                            [productId] => 01t60000000lvBNAAY
                        )
                    [1] => stdClass Object
                        (
                            [amount] => 200
                            [productId] => 01t60000000lvBSAAY
                        )
                )
            [success] => 1
        )
)
Contact Id is 0036000000nVtpTAAS
</pre>
<h6>One last little trick</h6>
<p>One annoyance during the development of Apex Web Services is having to continually generate a WSDL for the web service.  When testing, I would find that I would continually need to put a new WSDL on the web server.  I decided to automate this where I could add a variable to the queryString and have PHP refresh the WSDL on my web server.  You need the cURL module for this, but most PHP installs have it.</p>
<pre class="brush: php">
$ch = curl_init();
	$fp = fopen(_WS_WSDL_, &quot;w&quot;);
	curl_setopt($ch, CURLOPT_URL, _WS_ENDPOINT_);
	curl_setopt($ch, CURLOPT_FILE, $fp);
	curl_setopt($ch, CURLOPT_HEADER, 0);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt($ch, CURLOPT_COOKIE, &#039;sid=&#039;.$sfdc-&gt;getSessionId());
	setcookie(&quot;sid&quot;, $sfdc-&gt;getSessionId(), 0, &quot;/&quot;, &quot;.salesforce.com&quot;, 0);
	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
	curl_exec($ch);
	fclose($fp);
curl_close($ch);
</pre>
<p>If you have experience with this kind of integration, please comment here on other tips &#038; tricks.</p>
<img src="http://sfdc.arrowpointe.com/?ak_action=api_record_view&id=475&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/12/05/calling-apex-web-services-from-php/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Sidebar Summary using Visualforce</title>
		<link>http://sfdc.arrowpointe.com/2008/09/17/sidebar-summary-using-visualforce/</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="brush: 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="brush: 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="brush: 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>
<img src="http://sfdc.arrowpointe.com/?ak_action=api_record_view&id=395&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/09/17/sidebar-summary-using-visualforce/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Getting Standard Object Meta Data into the Force.com IDE</title>
		<link>http://sfdc.arrowpointe.com/2008/06/26/getting-standard-object-meta-data-into-the-forcecom-ide/</link>
		<comments>http://sfdc.arrowpointe.com/2008/06/26/getting-standard-object-meta-data-into-the-forcecom-ide/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 20:03:00 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/?p=315</guid>
		<description><![CDATA[Salesforce on Rails has an interesting post on how you can get the meta data for standard objects into the Force.com IDE for easy manipulation of its configuration via the Meta Data API capabilities built into the IDE.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://salesforceonrails.com/" target="_blank">Salesforce on Rails</a> has an <a href="http://salesforceonrails.com/2008/custom-fields-on-standard-objects-in-the-force-com-ide" target="_blank">interesting post</a> on how you can get the meta data for standard objects into the Force.com IDE for easy manipulation of its configuration via the Meta Data API capabilities built into the IDE.</p>
<img src="http://sfdc.arrowpointe.com/?ak_action=api_record_view&id=315&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2008/06/26/getting-standard-object-meta-data-into-the-forcecom-ide/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Upcoming Security Changes &#8211; overview of impact</title>
		<link>http://sfdc.arrowpointe.com/2007/11/16/upcoming-security-changes-overview-of-impact/</link>
		<comments>http://sfdc.arrowpointe.com/2007/11/16/upcoming-security-changes-overview-of-impact/#comments</comments>
		<pubDate>Fri, 16 Nov 2007 20:29:00 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/2007/11/16/upcoming-security-changes-overview-of-impact/</guid>
		<description><![CDATA[Salesforce.com is making security changes on Monday Nov. 26, 2007. (Note that the rollout was pushed back a week from their original communications.  It is now Monday Nov. 26, 2007)
There were a couple of webinars today about the changes.  The customer-focused webinar will be available at http://www.salesforce.com/security soon.  The partner-focused one will [...]]]></description>
			<content:encoded><![CDATA[<p>Salesforce.com is making security changes on <strong>Monday Nov. 26, 2007</strong>. <em>(Note that the rollout was pushed back a week from their original communications.  It is now <strong>Monday Nov. 26, 2007</strong>)</em></p>
<p>There were a couple of webinars today about the changes.  The customer-focused webinar will be available at <a href="http://www.salesforce.com/security" target=_blank>http://www.salesforce.com/security</a> soon.  The partner-focused one will be available in the Partner Portal.</p>
<p>Below is <u>my understanding</u> of what was said and a high-level overview of the main impacts.  Please add clarifications in the comments.</p>
<h6>API Logins</h6>
<ul>
<li>If you connect via a Session ID passed from a web link/tab, none of these restrictions apply as the user is explicitly providing you with login access to his/her active session.</li>
<li>To login with a username and password, the IP address you are logging in from needs to be white-listed.</li>
<li>Salesforce will pre-populate the org&#8217;s whitelist with IPs used in the past 4 months.</li>
<li>Each end-user can generate an API token to replace their password for API logins.</li>
<li>API logins using the API token do not require their IP to be whitelisted.</li>
<li>API tokens do not expire.  Only 1 is active at a time.  It can be replaced by the user generating a new one.  This automatically invalidates the old one.</li>
<li>API tokens cannot be used to login at <a href="https://www.salesforce.com/login.jsp" target=_blank>https://www.salesforce.com/login.jsp</a>.</li>
<li>Going forward, the best practice would be for end users to provide their API token to any app/service they use other than the main Salesforce.com login page.</li>
</ul>
<h6>Logging in at <a href="https://www.salesforce.com/login.jsp" target=_blank>https://www.salesforce.com/login.jsp</a></h6>
<ul>
<li>Username and password will still be the way to access Salesforce.com from the main login page</li>
<li>A new feature will be added requiring you to confirm that your computer is valid to login using that username.</li>
<ul>
<li>The login page will check if you&#8217;ve logged in from that computer before (by looking for a browser cookie)</li>
<li>If not, the email address on the user record will be sent an email to confirm that you are, in fact, the one trying to login now.</li>
<li>You will click a link in that email &#8220;activating&#8221; your computer for login with that username</li>
<li>Unless you delete the cookie or clear your broswer&#8217;s cache, you should be good to go for a while without repeating these steps.</li>
</ul>
<li>There are no new IP restrictions affecting logins at the main login page.  The profile-based IP restrictions that have been around for a long time are still the way to go there.
</ul>
<p>If you are a consultant, you may fall victim of the new security measure when you try to login as your client (maybe they couldn&#8217;t afford another temporary username just for you).  On the call, I was told that you can request a temporary one via the Partner Portal or ask your customer to forward you the email to confirm your PC is okay.</p>
<h6>My thoughts</h6>
<p>I think it is great to see Salesforce taking a step to tighten up the API, especially.  I like to think that my old <a href="http://sfdc.arrowpointe.com/2006/11/27/api-authentication-list/" target=_blank>API Authentication List</a> post had something to do with it, but who knows.</p>
<p>The biggest impact to me will be using client&#8217;s logins to get into the system from my PC, but I&#8217;ll just have to workaround that one.  Security and convenience are generally a trade off and overall I&#8217;d rather use/subscribe to a service that is tightened down with my business data.  If anyone can handle the inconveniences of logging in, it&#8217;s developers since we are used to doing hacks/workarounds in the first place.</p>
<img src="http://sfdc.arrowpointe.com/?ak_action=api_record_view&id=265&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2007/11/16/upcoming-security-changes-overview-of-impact/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sidebar Summary</title>
		<link>http://sfdc.arrowpointe.com/2007/08/28/sidebar-summary/</link>
		<comments>http://sfdc.arrowpointe.com/2007/08/28/sidebar-summary/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 06:34:27 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Arrowpointe Products]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Sidebar Summary]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/2007/08/28/sidebar-summary/</guid>
		<description><![CDATA[There is an updated post here that explains how to do this with Visualforce instead
I was recently looking at Rave CRM by Entellium and I was inspired by their UI design.  I only saw the demo on their website, but they had a lot of really good UI ideas.  One of the things [...]]]></description>
			<content:encoded><![CDATA[<p><small>There is an updated post <a href="http://sfdc.arrowpointe.com/2008/09/17/sidebar-summary-using-visualforce/">here</a> that explains how to do this with Visualforce instead</small></p>
<p>I was recently looking at <a href="http://www.ravecrm.com" target=_blank>Rave CRM</a> by <a href="http://www.entellium.com" target=_blank>Entellium</a> and I was inspired by their UI design.  I only saw the demo on their website, but they had a lot of really good UI ideas.  One of the things I really liked was a quick summary of data counts on the homepage that were very applicable to the end user.</p>
<p>I wanted to see if I could create something similar in Salesforce.  Using an s-Control that is shown via an IFRAME on the sidebar, I was able to do it.  The end result is like having a bunch of Metric style dashboard components stacked on top of each other.  You can see it in action below.  Each line shows a record count and the record count is a hyperlink to a View or Report.  It&#8217;s small, clean and tells the user vital information with quick links to see more.  I like the concept.</p>
<p><img style="margin: 0 0 0 50px;" src="http://sfdc.arrowpointe.com/wp-content/images/SidebarSummary.png" alt="SidebarSummary.png" title="SidebarSummary.png" width="353" height="310" /></p>
<h6>How it works</h6>
<p>It is all running in an s-Control and uses the AJAX toolkit to talk to Salesforce.  The s-Control is in an IFRAME in a homepage component.  The s-Control has a function called getCount and you pass getCount the following:</p>
<ul>
<li><strong>Object</strong> to Query</li>
<li><strong>WHERE clause</strong> for the query</li>
<li><strong>Label</strong> for the returned HTML</li>
<li>A <strong>URL</strong> to let a user drilldown on the result</li>
</ul>
<p>A call to it looks like this:</p>
<p><code>theHTML += getCount(&quot;Lead&quot;, &quot;WHERE IsConverted = False AND CreatedDate = TODAY&quot;, &quot;Leads - Today&quot;, &quot;/00Q?fcf=00B30000001Qizn&quot;);</code></p>
<p>It uses the object and where clause to do a count() query.  It then returns an HTML table row with 2 columns.  The first has the label you passed it in <em>italics</em>.  The second has the record count of the query as a hyperlink to the URL you passed it.  If you don&#8217;t pass it a URL, then it shows the record count without a hyperlink.</p>
<p>The s-Control is made up of 2 functions: getCount() and main().  getCount is described above.  main() calls getCount once for each metric and then wraps the results in some more HTML.  A bit of CSS is sprinkled in to output it nicely on the homepage sidebar.  That&#8217;s it.</p>
<h6>Try It</h6>
<p>I uploaded it to the AppExchange to let people try it and improve upon it.  It is just a proof of concept.  I am using it in my org right now, but it needs to be improved if I will let it stick around.  For example, it&#8217;d be great to have it cache the data and only run the queries once every 30 minutes because running it can slow the load time a bit.  Is anyone up for improving it to meet that requirement?</p>
<p>To make this work for you, you should be familiar with s-Controls.  It&#8217;s not plug and play.  Getting it setup expects you have a working knowledge of this stuff.  I kind of hacked it together and wanted to get it out there for other to see.  It&#8217;s very simple code, but I think it serves a very good purpose.  I am interested in what you think.</p>
<p><a href="https://sites.secure.force.com/appexchange/listingDetail?listingId=a0N300000016YLIEA2" target=_blank><img style="margin: 0 0 0 50px;" src="http://sfdc.arrowpointe.com/wp-content/images/btnGetApps.gif" alt="btnGetApps.gif" title="btnGetApps.gif" width="190" height="50" /></a></p>
<p>I set it up with some basic queries, but I&#8217;d recommend you change them to meet your needs.  To change what the queries are, you need to go into the main() function and edit the lines that call the getCount function.  You will need a single line of code for each query you want to run.</p>
<p><img src="http://sfdc.arrowpointe.com/wp-content/images/SidebarSummary_MainFunction.png" alt="SidebarSummary_MainFunction.png" title="SidebarSummary_MainFunction.png" width="450" height="265" /></p>
<p>If you really want it to work nicely, you should create corresponding Views or Reports and link to those by passing the getCount function the URL of the View or Report.</p>
<p>Once you have your queries all set, you need to add the homepage component.  I didn&#8217;t package one in the AppExchange package because I have been unable to edit a homepage component that only has an IFRAME in it (WYSIWYG editor bug).  I&#8217;ve had to delete it and recreate it every time.  So you get to do that too!</p>
<ol>
<li>Create an HTML Area Homepage Component</li>
<li>Choose it to go on the left (narrow) navigation bar</li>
<li>Click the Show HTML checkbox on the WYSIWYG editor</li>
<li>Copy the HTML below and replace IdOfScontrol with the ID of the s-Control in your AppExchange package.  You can change the height of the IFRAME too.
<p><code>&lt;IFRAME src=&quot;/servlet/servlet.Integration?lid=<strong><u>IdOfScontrol</u></strong>&amp;amp;enc=UTF-8&amp;amp;ic=1&quot; frameBorder=0 width=&quot;100%&quot; height=&quot;150&quot;&gt;&lt;/IFRAME&gt;</code>
	</li>
<li>Add the new Homepage Component to your Homepage Layout</li>
</ol>
<p>Now you should be ready to test it out.  Using a tool like <a href="http://www.getfirebug.com/" target=_blank>Firebug</a> can greatly improve your ability to troubleshoot issues and make enhancements.</p>
<p>Please let me know what you think by posting comments.  I am interested in thoughts on the concept, ways to improve it, issues you are having, etc.</p>
<img src="http://sfdc.arrowpointe.com/?ak_action=api_record_view&id=250&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2007/08/28/sidebar-summary/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Replicate Salesforce Schema to Oracle or MySQL</title>
		<link>http://sfdc.arrowpointe.com/2007/08/09/replicate-salesforce-schema-to-oracle-or-mysql/</link>
		<comments>http://sfdc.arrowpointe.com/2007/08/09/replicate-salesforce-schema-to-oracle-or-mysql/#comments</comments>
		<pubDate>Fri, 10 Aug 2007 05:54:22 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[The Community]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/2007/08/09/replicate-salesforce-schema-to-oracle-or-mysql/</guid>
		<description><![CDATA[Mike Simonds released 2 scripts over the past few days that will create copies of your Salesforce schema into MySQL or Oracle databases.  I haven&#8217;t tested either of them, but I think this could be pretty handy.  Of course, you&#8217;ll need to have additional scripts actually bring your data over from Salesforce to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mikesimonds.com/" target=_blank>Mike Simonds</a> released 2 scripts over the past few days that will create copies of your Salesforce schema into MySQL or Oracle databases.  I haven&#8217;t tested either of them, but I think this could be pretty handy.  Of course, you&#8217;ll need to have additional scripts actually bring your data over from Salesforce to these databases, but this is a start.  Learn more about the scripts using the links below.</p>
<ul>
<li><a href="http://www.mikesimonds.com/salesforce-php-oracle-database-replication-tool-t45.html" target=_blank>Oracle script</a></li>
<li><a href="http://www.mikesimonds.com/salesforce-php-mysql-database-replication-tool-t47.html" target=_blank>MySQL script</a></li>
</ul>
<p>If you try these, feel free to comment here about how it went.  If you actually want to let Mike know about your use of the scripts, you could submit replies on his site or at his forum postings about the functionality (<a href="http://community.salesforce.com/sforce/board/message?board.id=PerlDevelopment&#038;message.id=2532" target=_blank>Oracle</a>, <a href="http://community.salesforce.com/sforce/board/message?board.id=PerlDevelopment&#038;message.id=2540#M2540" target=_blank>MySQL</a>)</p>
<img src="http://sfdc.arrowpointe.com/?ak_action=api_record_view&id=245&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2007/08/09/replicate-salesforce-schema-to-oracle-or-mysql/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Salesforce.com AIR Application Sample</title>
		<link>http://sfdc.arrowpointe.com/2007/07/24/salesforcecom-air-application-sample/</link>
		<comments>http://sfdc.arrowpointe.com/2007/07/24/salesforcecom-air-application-sample/#comments</comments>
		<pubDate>Tue, 24 Jul 2007 15:16:00 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[The Community]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/2007/07/24/salesforcecom-air-application-sample/</guid>
		<description><![CDATA[Dave Johnson posted an overview of an AIR Application that connects to Salesforce.com that he created.  It&#8217;s HTML/Ajax application running on Abode AIR.
]]></description>
			<content:encoded><![CDATA[<p>Dave Johnson posted an overview of an <a href="http://blogs.nitobi.com/dave/index.php/2007/07/18/salesforcecom-air-application/" target=_blank>AIR Application that connects to Salesforce.com</a> that he created.  It&#8217;s HTML/Ajax application running on Abode AIR.</p>
<img src="http://sfdc.arrowpointe.com/?ak_action=api_record_view&id=241&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2007/07/24/salesforcecom-air-application-sample/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Salesforce Integration 101</title>
		<link>http://sfdc.arrowpointe.com/2007/07/13/salesforce-integration-101/</link>
		<comments>http://sfdc.arrowpointe.com/2007/07/13/salesforce-integration-101/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 18:02:25 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Salesforce 101]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/2007/07/13/salesforce-integration-101/</guid>
		<description><![CDATA[The ADN site has a new series on integration (ref).
Part 1 is a screencast overview of your integration options (ADN login is required to view it).  If you are getting started with Salesforce integration or maintaining a curriculum for people in your company, this is a good place to point them to.  Part [...]]]></description>
			<content:encoded><![CDATA[<p>The ADN site has a <a href="http://wiki.apexdevnet.com/index.php/Enterprise_Integration_Series" target=_blank>new series on integration</a> (<a href="http://blog.sforce.com/sforce/2007/07/new-salesforce-.html" target=_blank>ref</a>).</p>
<p>Part 1 is a screencast overview of your integration options (ADN login is required to view it).  If you are getting started with Salesforce integration or maintaining a curriculum for people in your company, this is a good place to point them to.  Part 1 should help you visualize the various options and segment them in your mind, so you can figure out the integration method that works best to address your needs.</p>
<p>Part 2 is called &#8220;Next Generation Integration Services&#8221;, which will talk about new capabilities in store for the platform.  No date is published for it.  Just that it&#8217;s &#8220;coming soon&#8221;.</p>
<p><a href="http://wiki.apexdevnet.com/index.php/Enterprise_Integration_Series" target=_blank><strong>Visit the Enterprise Integration Series on ADN</strong></a>.</p>
<img src="http://sfdc.arrowpointe.com/?ak_action=api_record_view&id=238&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2007/07/13/salesforce-integration-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Toolkit Tutorial</title>
		<link>http://sfdc.arrowpointe.com/2007/05/09/php-toolkit-tutorial/</link>
		<comments>http://sfdc.arrowpointe.com/2007/05/09/php-toolkit-tutorial/#comments</comments>
		<pubDate>Wed, 09 May 2007 18:34:42 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[The Community]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/2007/05/09/php-toolkit-tutorial/</guid>
		<description><![CDATA[Mike Simonds created a blog with a Salesforce category  to it.  He just got it started and has written part 1 in a series of PHP Toolkit Tutorials. 
This first example focuses on querying an Oracle database and pushing data to Salesforce.com using the upsert method.
If you are interested in the PHP toolkit [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mikesimonds.com/about.php">Mike Simonds</a> created a blog with a <a href="http://www.mikesimonds.com/salesforce/">Salesforce category</a> <a href="http://www.mikesimonds.com/fetchrss.php?catid=13"><img src="http://sfdc.arrowpointe.com/wp-content/images/feed-icon-12x12.png" alt="feed-icon-12x12.png" title="feed-icon-12x12.png" width="12" height="12" /></a> to it.  He just got it started and has written <a href="http://www.mikesimonds.com/salesforce-php-tutorial-1.html">part 1</a> in a series of PHP Toolkit Tutorials. </p>
<p>This first example focuses on querying an Oracle database and pushing data to Salesforce.com using the upsert method.</p>
<p>If you are interested in the PHP toolkit (which is my preferred toolkit), it&#8217;s worth a read.</p>
<p><a href="http://www.mikesimonds.com/salesforce-php-tutorial-1.html">Check it out</a>.</p>
<img src="http://sfdc.arrowpointe.com/?ak_action=api_record_view&id=220&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2007/05/09/php-toolkit-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Flex Toolkit</title>
		<link>http://sfdc.arrowpointe.com/2007/04/16/new-flex-toolkit/</link>
		<comments>http://sfdc.arrowpointe.com/2007/04/16/new-flex-toolkit/#comments</comments>
		<pubDate>Mon, 16 Apr 2007 15:46:00 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/2007/04/16/new-flex-toolkit/</guid>
		<description><![CDATA[Salesforce posted a new wiki page for a Flex Toolkit, allowing for rich interactive components to be built on Adobe&#8217;s Flex platform and integrated with Salesforce.com.  The overview, per wiki page is:
The concept for this library is simple: Begin with the Salesforce AJAX toolkit, port the data layer to the ActionScript 3.0 programing language [...]]]></description>
			<content:encoded><![CDATA[<p>Salesforce posted a new wiki page for a <a href="http://wiki.apexdevnet.com/index.php/Flex_Toolkit">Flex Toolkit</a>, allowing for rich interactive components to be built on Adobe&#8217;s Flex platform and integrated with Salesforce.com.  The overview, per wiki page is:</p>
<blockquote><p>The concept for this library is simple: Begin with the Salesforce AJAX toolkit, port the data layer to the ActionScript 3.0 programing language found in Adobe Flex, returning native strongly typed ActionScript objects for the Flex programmer to manipulate and render. This allows Flex programmers to build S-controls &#8212; components within the Apex interface where custom code can be executed &#8212; without dropping into JavaScript.</p></blockquote>
<p>For more information:</p>
<ul>
<li>Visit the <a href="http://wiki.apexdevnet.com/index.php/Flex_Toolkit"><strong>Flex Toolkit page</strong></a> on the <a href="https://wiki.apexdevnet.com/index.php/Apex_Wiki">Apex Wiki</a>.  There you will find Getting Started materials, downloads, object/class documentation, etc.</li>
<li>Check out the <a href="http://adnsandbox.com/media/flex/">screencast</a> to learn about the IDE.</li>
<li>See the end result in action in an <a href="https://www.salesforce.com/appexchange/demo.jsp?id=a033000000341fFAAQ">AppExchange Test Drive</a></li>
</ul>
<img src="http://sfdc.arrowpointe.com/?ak_action=api_record_view&id=215&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2007/04/16/new-flex-toolkit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mashups Article on the Wiki</title>
		<link>http://sfdc.arrowpointe.com/2007/04/10/mashups-article-on-the-wiki/</link>
		<comments>http://sfdc.arrowpointe.com/2007/04/10/mashups-article-on-the-wiki/#comments</comments>
		<pubDate>Tue, 10 Apr 2007 21:20:16 +0000</pubDate>
		<dc:creator>Scott Hemmeter</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://sfdc.arrowpointe.com/2007/04/10/mashups-article-on-the-wiki/</guid>
		<description><![CDATA[A good article appeared on the Wiki yesterday.  It&#8217;s called Mashups: The What and Why.  It&#8217;s geared more towards someone not totally familiar with mashups and introduces them to things that are possible.  It&#8217;d be a good place to point clients to in learning about the concept.
FYI &#8211; in case you didn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>A good article appeared on the Wiki yesterday.  It&#8217;s called <a href="http://wiki.apexdevnet.com/index.php/Mashups:_The_What_and_Why">Mashups: The What and Why</a>.  It&#8217;s geared more towards someone not totally familiar with mashups and introduces them to things that are possible.  It&#8217;d be a good place to point clients to in learning about the concept.</p>
<p>FYI &#8211; in case you didn&#8217;t know already, you can stay up to date on new Wiki pages via RSS. <a href="https://wiki.apexdevnet.com/index.php?title=Special:Newpages&#038;feed=rss"><img src="http://sfdc.arrowpointe.com/wp-content/images/feed-icon-12x12.png" alt="feed-icon-12x12.png" title="feed-icon-12x12.png" width="12" height="12" /></a></p>
<img src="http://sfdc.arrowpointe.com/?ak_action=api_record_view&id=212&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sfdc.arrowpointe.com/2007/04/10/mashups-article-on-the-wiki/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
