<?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>The ePro &#187; Salesforce.com</title> <atom:link href="http://www.epro.co.uk/web-consultant/salesforce-com/feed/" rel="self" type="application/rss+xml" /><link>http://www.epro.co.uk</link> <description>Pragmatic advice for getting the best from online tools</description> <lastBuildDate>Thu, 26 Jan 2012 01:10:31 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Pass multiple select values from your website to Salesforce.com</title><link>http://www.epro.co.uk/pass-multiple-select-values-from-website-to-salesforce-com/</link> <comments>http://www.epro.co.uk/pass-multiple-select-values-from-website-to-salesforce-com/#comments</comments> <pubDate>Mon, 26 Apr 2010 18:19:50 +0000</pubDate> <dc:creator>James Docherty</dc:creator> <category><![CDATA[Quick tips]]></category> <category><![CDATA[Site design]]></category> <category><![CDATA[Technote]]></category> <category><![CDATA[development]]></category> <category><![CDATA[issues solved]]></category> <category><![CDATA[php]]></category> <category><![CDATA[Salesforce.com]]></category><guid
isPermaLink="false">http://www.epro.co.uk/?p=22</guid> <description><![CDATA[If you&#8217;re integrating your website with Salesforce.com you may need to capture multiple select values. Unfortunately, Salesforce doesn&#8217;t accept an array of values (the way PHP sends multiple selects when a form is submitted) so it truncates the values it receives so only the first value gets through. I recently solved this issue when I [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;re integrating your website with Salesforce.com you may need to capture multiple select values. Unfortunately, Salesforce doesn&#8217;t accept an array of values (the way PHP sends multiple selects when a form is submitted) so it truncates the values it receives so only the first value gets through. I recently solved this issue when I was building a form for a client.</p><p>Salesforce needs a single</p><div
class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div
class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #ddbb00;">&amp;var=val</span></div></div><p>pair for each of the values in the same select. So, we need to create something that looks like</p><div
class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div
class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #ddbb00;">&amp;var=val1&amp;var=val2&amp;var=val3...</span></div></div><p>The php <a
title="Php function" href="http://php.net/manual/en/function.implode.php">implode()</a> function is very helpful here so we could just pass the array from the form to a php file and do something like</p><div
class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div
class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">implode(&quot;<span
style="color: #ddbb00;">&amp;val=&quot; $_POST['mySelect']);</span></div></div><p>It would be sensible to urlencode the values of the form data to make sure it arrives safely. So, we need to urlencode the values <strong>after</strong> they&#8217;ve been imploded. If we simply urlencode the array, we no longer have an array and it&#8217;s pretty useless.</p><p>To send data from the website to Salesforce, I pre-processed the data and sent the request &#8216;manually&#8217; so my chain of events looked something like this:</p><p>Form on website &gt;&gt; php data manipulation &gt;&gt; php creation of POST &gt;&gt; Salesforce.com object</p><p>If you have any tips about integrating your website with Salesforce, please drop me a line.</p><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.epro.co.uk%2Fpass-multiple-select-values-from-website-to-salesforce-com%2F&amp;title=Pass%20multiple%20select%20values%20from%20your%20website%20to%20Salesforce.com" id="wpa2a_4"><img
src="http://www.epro.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://www.epro.co.uk/pass-multiple-select-values-from-website-to-salesforce-com/feed/</wfw:commentRss> <slash:comments></slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/11 queries in 0.021 seconds using disk: basic
Object Caching 573/590 objects using disk: basic

Served from: www.epro.co.uk @ 2012-02-04 15:27:41 -->
