<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3122345442772680944</id><updated>2024-09-09T19:57:26.806-07:00</updated><title type='text'>salesforce,visualforce ,apex,sfdc implementations</title><subtitle type='html'>This Blog is all about various types of implementations of salesforce apps</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-4021285110035939522</id><published>2012-06-20T10:28:00.002-07:00</published><updated>2012-06-20T10:35:37.494-07:00</updated><title type='text'>Create a  webservice in salesforce/apex</title><content type='html'>&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Many times we have a requirement to create webservices which we want other systems to access. So there are a few things to be kept in mind while developing a webservice.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;1.) Create a global class as a webservice class has be to globally accessible.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span id=&quot;ApexClassViewPage:theTemplate:theForm:thePageBlock:j_id56:j_id57:j_id58&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;codeBlock&quot; style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot; style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;global&amp;nbsp;class&amp;nbsp;MyWebService&amp;nbsp;{&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot; style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot; style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot; style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;2.) Create a Object for your webservice which will be used to hold data for your webservice as&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot; style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot; style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span id=&quot;ApexClassViewPage:theTemplate:theForm:thePageBlock:j_id56:j_id57:j_id58&quot;&gt;&lt;pre class=&quot;codeBlock&quot;&gt;     global&amp;nbsp;class&amp;nbsp;innerItems{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;webservice&amp;nbsp;string&amp;nbsp;name;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;webservice&amp;nbsp;string&amp;nbsp;DataId;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;webservice&amp;nbsp;string&amp;nbsp;DataClass;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;innerItems(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/pre&gt;
&lt;/span&gt; 3.) All functions which you want to declare or expose in webservice must use webservice keyword&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot; style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &amp;nbsp;and have to be static.&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;4.) Now you can save the class and export the wsdl using the Generate Wsdl button on top of class&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBkw0iubBhVGX4KQ4FOj5qoKvvPYcbrfbxwziM8lULC0S6BGj15uMRTmmjTVR7se2gIBHEPUTy0Zv5N5RhdGfBcuodldsYgDyXJ0R_8ekzoFOOb0LfPhT_MSveM9OlB1RO7m8_BhDdpew/s1600/Screenshot+at+2012-06-20+23:00:46.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;257&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBkw0iubBhVGX4KQ4FOj5qoKvvPYcbrfbxwziM8lULC0S6BGj15uMRTmmjTVR7se2gIBHEPUTy0Zv5N5RhdGfBcuodldsYgDyXJ0R_8ekzoFOOb0LfPhT_MSveM9OlB1RO7m8_BhDdpew/s320/Screenshot+at+2012-06-20+23:00:46.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; When using the &lt;code&gt;webservice&lt;/code&gt; keyword, keep the following considerations in mind:
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt; You can use the &lt;code&gt;webservice&lt;/code&gt; modifier to define 
top-level, outer class methods and variables, and member variables of an
 inner class.  It can&#39;t be used on a class itself, or an interface or 
interface methods or variables.
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt; An Apex trigger can execute a callout when the callout is 
invoked within a method defined as asynchronous: that is, defined with 
the &lt;a class=&quot;external text&quot; href=&quot;http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_classes_annotation.htm#future&quot; rel=&quot;nofollow&quot; title=&quot;http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_classes_annotation.htm#future&quot;&gt;@future&lt;/a&gt; keyword. The &lt;code&gt;@future&lt;/code&gt; annotation signifies that the Apex method executes asynchronously. For more information on the &lt;code&gt;@future&lt;/code&gt; annotation, please read the &lt;a class=&quot;external text&quot; href=&quot;http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_classes_annotation.htm#future&quot; rel=&quot;nofollow&quot; title=&quot;http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_classes_annotation.htm#future&quot;&gt;documentation&lt;/a&gt;. 
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt; All classes that contain methods or variables defined with the &lt;code&gt;webservice&lt;/code&gt;
 keyword must be declared as global. If a method, variable or inner 
class is declared as global, the outer, top-level class must also be 
defined as global.
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt; You must define any method that uses the &lt;code&gt;webservice&lt;/code&gt; keyword as static.
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Because there are no SOAP analogs for certain Apex elements, methods defined with the &lt;code&gt;webservice&lt;/code&gt;
 keyword cannot take the following elements as parameters. While these 
elements can be used within the method, they cannot be used as return 
values.
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;dl style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;dd&gt;
&lt;dl&gt;&lt;dd&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Maps
&lt;/span&gt;&lt;/dd&gt;&lt;dd&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Sets
&lt;/span&gt;&lt;/dd&gt;&lt;dd&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Pattern objects
&lt;/span&gt;&lt;/dd&gt;&lt;dd&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Matcher objects
&lt;/span&gt;&lt;/dd&gt;&lt;dd&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Exception objects
&lt;/span&gt;&lt;/dd&gt;&lt;/dl&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;ul style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt; You must use the &lt;code&gt;webservice&lt;/code&gt; keyword with any 
member variables that you want to expose as part of a web service. You 
should not mark these member variables as static. Please see this &lt;a href=&quot;http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts#Define_Web_Service_Member_Variables_or_Classes&quot; title=&quot;&quot;&gt; section&lt;/a&gt;  for more information.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;Apex supports only the document literal wrapped WSDL style&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span id=&quot;ApexClassViewPage:theTemplate:theForm:thePageBlock:j_id56:j_id57:j_id58&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;codeBlock&quot; style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/4021285110035939522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/create-new-webservice-in-salesforceapex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/4021285110035939522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/4021285110035939522'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/create-new-webservice-in-salesforceapex.html' title='Create a  webservice in salesforce/apex'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBkw0iubBhVGX4KQ4FOj5qoKvvPYcbrfbxwziM8lULC0S6BGj15uMRTmmjTVR7se2gIBHEPUTy0Zv5N5RhdGfBcuodldsYgDyXJ0R_8ekzoFOOb0LfPhT_MSveM9OlB1RO7m8_BhDdpew/s72-c/Screenshot+at+2012-06-20+23:00:46.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-5496976500600149686</id><published>2012-06-19T09:07:00.002-07:00</published><updated>2012-06-19T09:48:04.184-07:00</updated><title type='text'>Create Application on Heroku</title><content type='html'>&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;This is a very basic tutorial to get started with heroku so below are the steps how you can create a small application and host that on heroku&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt;&lt;span class=&quot;il&quot;&gt;heroku&lt;/span&gt; login&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Enter your &lt;span class=&quot;il&quot;&gt;Heroku&lt;/span&gt; credentials.&lt;br /&gt;Email: test@gmail.com&lt;br /&gt;Password: You Password&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Then it will give you below prompt&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;i&gt;Could not find an existing public key.&lt;br /&gt;Would you like to generate one? [Yn] Y&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;Uploading SSH public key /root/.ssh/id_rsa.pub&lt;br /&gt;Authentication successful.&lt;/i&gt;&lt;/span&gt; &lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;After this create a&amp;nbsp; local directory mkdir app&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt;&lt;span class=&quot;il&quot;&gt;heroku&lt;/span&gt; create --stack cedar&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Above command will create a instance for you on heroku&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Creating evening-mist-6047... done, stack is cedar&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://evening-mist-6047.herokuapp.com/&quot; target=&quot;_blank&quot;&gt;http://evening-mist-6047.&lt;wbr&gt;&lt;/wbr&gt;herokuapp.com/&lt;/a&gt; | git@&lt;span class=&quot;il&quot;&gt;heroku&lt;/span&gt;.com:evening-mist-&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;wbr&gt;&lt;/wbr&gt;&lt;span style=&quot;font-size: small;&quot;&gt;6047.git&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now we have to initiate GIT using: &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt;git init&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now we have to push the root branch to heroku below command will do this for us&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt;git push &lt;span class=&quot;il&quot;&gt;heroku&lt;/span&gt; master&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now since we have created a application on heroku we have to clone it and make a local instance of that so that we can start putting our code into that for this we have to run below command&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt;git clone git@&lt;span class=&quot;il&quot;&gt;heroku&lt;/span&gt;.com:evening-mist-6.git -o &lt;span class=&quot;il&quot;&gt;heroku&lt;/span&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Above will create a local folder in our system by name of our heroku instance and it will then ask you to connect just answer the question as Yes&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Are you sure you want to continue connecting (yes/no)? y&lt;br /&gt;
Please type &#39;yes&#39; or &#39;no&#39;: yes.&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now we have created a local instance of application we have to place all our code here and then deploy it to remove cloud using below command.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;git commit -am &quot;started coding&quot; this command will give you prompt as&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt;On branch master&lt;br /&gt;#&lt;br /&gt;# Initial commit&lt;br /&gt;#&lt;br /&gt;# Untracked files:&lt;br /&gt;#&amp;nbsp;&amp;nbsp; (use &quot;git add &amp;lt;file&amp;gt;...&quot; to include in what will be committed)&lt;br /&gt;
#&lt;br /&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; index.php&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;nothing added to commit but untracked files present (use &quot;git add&quot; to track) &lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now time to move code for that we have to use git commit command as below&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt;git push &lt;span class=&quot;il&quot;&gt;heroku&lt;/span&gt; master&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Counting objects: 3, done.&lt;br /&gt;Writing objects: 100% (3/3), 259 bytes, done.&lt;br /&gt;Total 3 (delta 0), reused 0 (delta 0)&lt;br /&gt;&lt;br /&gt;-----&amp;gt; &lt;span class=&quot;il&quot;&gt;Heroku&lt;/span&gt; receiving push&lt;br /&gt;-----&amp;gt; PHP app detected&lt;br /&gt;-----&amp;gt; Bundling Apache v2.2.19&lt;br /&gt;
-----&amp;gt; Bundling PHP v5.3.6&lt;br /&gt;-----&amp;gt; Discovering process types&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Procfile declares types -&amp;gt; (none)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Default types for PHP&amp;nbsp;&amp;nbsp; -&amp;gt; web&lt;br /&gt;-----&amp;gt; Compiled slug size is 21.5MB&lt;br /&gt;-----&amp;gt; Launching... done, v3&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://evening-mist-6047.herokuapp.com/&quot; target=&quot;_blank&quot;&gt;http://evening-mist-6047.&lt;wbr&gt;&lt;/wbr&gt;herokuapp.com&lt;/a&gt; deployed to &lt;span class=&quot;il&quot;&gt;Heroku&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;bingo the application is on heroku now you can test the application by hitting the URL&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://evening-mist-6047.herokuapp.com/&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot; target=&quot;_blank&quot;&gt;http://evening-mist-6047.&lt;wbr&gt;&lt;/wbr&gt;herokuapp.com&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;:2at&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/5496976500600149686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/create-application-on-heroku.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/5496976500600149686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/5496976500600149686'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/create-application-on-heroku.html' title='Create Application on Heroku'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-2509237398230664739</id><published>2012-06-19T08:53:00.000-07:00</published><updated>2012-06-19T08:53:28.574-07:00</updated><title type='text'>What is Heroku</title><content type='html'>&lt;style type=&quot;text/css&quot;&gt;
 &lt;!--
  @page { margin: 2cm }
  P { margin-bottom: 0.21cm }
  A:link { so-language: zxx }
 --&gt;
 
&lt;/style&gt;


&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
What is Heroku?&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Heroku (pronounced
her-OH-koo) is a cloud application platform – a new way of building
and deploying web apps.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Benefits of PAAS&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Deployment
using GIT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Tracking Your App
in Git&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
git init&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Create
GIT remote&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
heroku create --stack cedar&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
heroku create --stack cedar --remote staging&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
heroku create --stack cedar --remote production&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Creating
falling-wind-1624... done, stack is cedar&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;http://falling-wind-1624.herokuapp.com/
| git@heroku.com:falling-wind-1624.git&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Git
remote heroku added&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;You can verify the
remote in your git configuration as well:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
git remote -v&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;heroku
    git@heroku.com:falling-wind-1624.git (fetch)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;heroku
    git@heroku.com:falling-wind-1624.git (push)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Push
Code to Heroku Remote&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
git push heroku master&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
git push staging master&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
git push production master&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Stacks
Available&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;A
stack is a complete deployment environment including the base
operating system, the language runtime and associated libraries. As a
result, different stacks support different runtime environments.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
heroku stack&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;https://devcenter.heroku.com/articles/aspen&quot;&gt;Argent
Aspen&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;https://devcenter.heroku.com/articles/bamboo&quot;&gt;Badious
Bamboo&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;https://devcenter.heroku.com/articles/cedar&quot;&gt;Celadon
Cedar&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Heroku aggregates
three categories of logs for your app:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;App logs - Output
 from your application. This will include logs generated from within
 your application, application server and libraries. (Filter:
 &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;--source
 app&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;System logs -
 Messages about actions taken by the Heroku platform infrastructure
 on behalf of your app, such as: restarting a crashed process, idling
 or unidling a web dyno, or serving an error page due to a problem in
 your app. (Filter: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;--source
 heroku&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;API logs - Messages
 about administrative actions taken by you and other developers
 working on your app, such as: deploying new code, scaling the
 process formation, or toggling maintenance mode. (Filter: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;--source
 heroku --ps api&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Times New Roman,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
 heroku logs&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
 heroku logs --source app --ps worker&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Collabration
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Adding
Collabrator&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
heroku sharing:add joe@example.com&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
heroku info --app theirapp&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
git clone -o heroku git@heroku.com:theirapp.git&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$
cd theirapp&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;You
can now use &lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;git push
heroku&lt;/span&gt;&lt;/span&gt; to deploy local changes and &lt;span style=&quot;font-family: Courier New,serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;git
pull heroku&lt;/span&gt;&lt;/span&gt; to merge any changes deployed by other
collaborators.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0.05cm; margin-top: 0.05cm;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/2509237398230664739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/how-to-use-heroku.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/2509237398230664739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/2509237398230664739'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/how-to-use-heroku.html' title='What is Heroku'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-977990340683957746</id><published>2012-06-17T10:50:00.001-07:00</published><updated>2012-06-17T11:12:31.798-07:00</updated><title type='text'>apex:actionFunction - Salesforce.com</title><content type='html'>There are times when we have to update components based on events on other parts of visualforce pages.&lt;br /&gt;
&lt;br /&gt;
So below is the code that can be used for reference.&lt;br /&gt;
&lt;br /&gt;
You can use below code for reference here we are updating a checkbox based on &lt;br /&gt;
change in account source.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;apex:page extensions=&quot;testComponent&quot; id=&quot;thepage&quot; standardcontroller=&quot;Account&quot;&amp;gt;&lt;br /&gt;
&amp;lt;apex:form&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;apex:inputfield value=&quot;{!acc.AccountSource}&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;apex:actionsupport action=&quot;{!changeCheckBox}&quot; event=&quot;onchange&quot; rerender=&quot;pan&quot; status=&quot;counterStatus&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/apex:actionsupport&amp;gt;&amp;lt;/apex:inputfield&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;apex:outputpanel id=&quot;pan&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;apex:inputfield id=&quot;test&quot; value=&quot;{!acc.check__c}&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/apex:inputfield&amp;gt;&amp;lt;/apex:outputpanel&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;apex:actionstatus id=&quot;counterStatus&quot; starttext=&quot; (incrementing...)&quot; stoptext=&quot; (done)&quot;&amp;gt;&lt;br /&gt;
&amp;lt;/apex:actionstatus&amp;gt;&amp;lt;/apex:form&amp;gt;&lt;br /&gt;
&amp;lt;/apex:page&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public with sharing class testComponent {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public testComponent() {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Account acc{get;set;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public testComponent(ApexPages.StandardController controller) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; acc=[select id,AccountSource,check__c from account where id=&#39;0019000000CJ6QZ&#39;];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public pagereference changeCheckBox(){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; acc.check__c=true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/977990340683957746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/enabledisable-inputtext-using-checkbox.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/977990340683957746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/977990340683957746'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/enabledisable-inputtext-using-checkbox.html' title='apex:actionFunction - Salesforce.com'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-4363283359652055694</id><published>2012-06-17T10:17:00.004-07:00</published><updated>2012-06-17T11:11:59.520-07:00</updated><title type='text'>Testing Example - Salesforce.com</title><content type='html'>As per the limits imposed by salesforce we have a need to create test classes for our code with minimum coverage for 75% of code. So below is the small example to create a test class&lt;br /&gt;
&lt;br /&gt;
To define an Apex method as a &#39;test method&#39;, simply define the method as static and add the keyword testMethod. A test method can be defined in any Apex class. A test method can not be defined in an Apex trigger. (Note: Testmethods cannot be called outside of a test context.)&lt;br /&gt;
Use the isTest class annotation to define classes that only contain code used for testing your application. &lt;br /&gt;
&lt;br /&gt;
So the two possible ways to create test classes will be &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public myTestClass{&lt;br /&gt;
&lt;br /&gt;
static testMethod void myTest() {&lt;br /&gt;
//Add your test coverage code here&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Or &lt;br /&gt;
&lt;br /&gt;
@isTest&lt;br /&gt;
public myTestClass{&lt;br /&gt;
&lt;br /&gt;
public static void myTest() {&lt;br /&gt;
//Add your test coverage code here&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are times when you need to test large datasets for that there are two keywords  Test.startTest and Test.stopTest.These static methods allow a test method to separate the Apex resources and governor limits being used to prepare and initialise the dataset from the resources and limits used during the actual test execution. &lt;br /&gt;
&lt;br /&gt;
Please note always create test data in for each of your test class separately avoid using data from system.&lt;br /&gt;
In below we have created a list of 200 accounts and we will   &lt;br /&gt;
static testMethod void myTest() {&lt;br /&gt;
List&lt;account&gt; accounts = new List&lt;account&gt;{};&lt;br /&gt;        &lt;br /&gt;    for(Integer i = 0; i &amp;lt; 200; i++){&lt;br /&gt;        Account a = new Account(Name = &#39;Test Account &#39; + i);&lt;br /&gt;        accounts.add(a);&lt;br /&gt;    }&lt;br /&gt;    test.startTest();&lt;br /&gt;       insert accounts;&lt;br /&gt;     test.stoptest();&lt;br /&gt;    &lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;Optionally use the isTest(SeeAllData=true) annotation to grant test classes and individual test methods access to all data in the organization, including pre-existing data that the test didn’t create.&lt;/account&gt;&lt;/account&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/4363283359652055694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/create-test-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/4363283359652055694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/4363283359652055694'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/create-test-class.html' title='Testing Example - Salesforce.com'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-1750341017963974870</id><published>2012-06-17T03:29:00.005-07:00</published><updated>2012-06-17T03:55:08.853-07:00</updated><title type='text'>Wrappers in  visualforce and apex</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6ImfXDfdD43I_LsS0CsQo2SPwkhcWPnrFVgtCrjCA7MP0t__IBFgOhWGM3Wkq5Eft6yVNQ-7WZVW_S4_qpQ6TUbyETz9JIbfG37qXhLUY_5dyB7en7_IZULJT-jVe94U4oKvaPXUMm_Q/s1600/2.png&quot;&gt;&lt;img style=&quot;float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 240px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6ImfXDfdD43I_LsS0CsQo2SPwkhcWPnrFVgtCrjCA7MP0t__IBFgOhWGM3Wkq5Eft6yVNQ-7WZVW_S4_qpQ6TUbyETz9JIbfG37qXhLUY_5dyB7en7_IZULJT-jVe94U4oKvaPXUMm_Q/s320/2.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5754957638112169778&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;font-size:100%;&quot;&gt;Many times we have a requirement that we have to get a checkbox in pageblock table or a simple table and process items which are selected. So below is the solution.&lt;br /&gt;&lt;br /&gt;Problem: we need a checkbox in a pageblock table and process contacts which are selected&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:arial;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:arial;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/1750341017963974870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/wrappers-in-visualforce-and-apex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/1750341017963974870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/1750341017963974870'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/wrappers-in-visualforce-and-apex.html' title='Wrappers in  visualforce and apex'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6ImfXDfdD43I_LsS0CsQo2SPwkhcWPnrFVgtCrjCA7MP0t__IBFgOhWGM3Wkq5Eft6yVNQ-7WZVW_S4_qpQ6TUbyETz9JIbfG37qXhLUY_5dyB7en7_IZULJT-jVe94U4oKvaPXUMm_Q/s72-c/2.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-1555910874936487849</id><published>2012-06-16T21:54:00.002-07:00</published><updated>2012-06-16T22:09:26.736-07:00</updated><title type='text'>Call Apex webservice method from custom button</title><content type='html'>&lt;span style=&quot;font-size:85%;&quot;&gt;Many times we have a requirement to call a apex method from a custom button from standard pagelayout. Below is simple way to do this.&lt;br /&gt;&lt;br /&gt;1.)Create a global class with a webservice method and call that from custom button using javascript onClick event.&lt;br /&gt;&lt;br /&gt;Create a global class&lt;br /&gt;&lt;span id=&quot;ApexClassViewPage:theTemplate:theForm:thePageBlock:j_id56:j_id57:j_id58&quot;&gt;&lt;pre class=&quot;codeBlock&quot;&gt;global class OutboundEmails {&lt;br /&gt;&lt;br /&gt;WebService static void SendEmailNotification(string id) {&lt;br /&gt;&lt;br /&gt;//create a mail object to send a single email.&lt;br /&gt;Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();&lt;br /&gt;&lt;br /&gt;//set the email properties&lt;br /&gt;mail.setToAddresses(new string[] {&#39;EmailAddress here&#39;});&lt;br /&gt;mail.setSenderDisplayName(&#39;SF.com Email Agent&#39;);&lt;br /&gt;mail.setSubject(&#39;A new reminder&#39;);&lt;br /&gt;mail.setHtmlBody(&#39;an object with ID=&#39;+ id + &#39; is just clicked on.&#39;);&lt;br /&gt;&lt;br /&gt;//send the email&lt;br /&gt;Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail } );&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;And have a custom button with display type as &quot;Detail Page Button&quot; and Behaviour type as &quot;Execute JavaScript&quot;, content source as &quot;onClick javascript&quot;.&lt;br /&gt;&lt;br /&gt;And the code for javascript&lt;br /&gt;{!REQUIRESCRIPT(&quot;/soap/ajax/10.0/connection.js&quot;)}&lt;br /&gt;{!REQUIRESCRIPT(&quot;/soap/ajax/10.0/apex.js&quot;)}&lt;br /&gt;&lt;br /&gt;sforce.apex.execute(&quot;OutboundEmails&quot;,&quot;SendEmailNotification&quot;, {id:&quot;{!Case.CaseNumber}&quot;});&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/1555910874936487849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/call-apex-webservice-method-from-custom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/1555910874936487849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/1555910874936487849'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/call-apex-webservice-method-from-custom.html' title='Call Apex webservice method from custom button'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-4172270533684884348</id><published>2012-06-16T10:15:00.007-07:00</published><updated>2012-06-17T11:18:12.498-07:00</updated><title type='text'>Custom Calendar on VisualForce Page</title><content type='html'>&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 100%;&quot;&gt;There has always been a need to have a calendar component for visualforce page this kind of component can be used in events booking,events &lt;/span&gt;&lt;span style=&quot;color: black; font-size: 100%;&quot;&gt;calendar&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 100%;&quot;&gt;,scheduling requirements and all the places where we need to show events by dates.&lt;/span&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 100%;&quot;&gt;This can be easily implemented using jquery,fullcalendar plugin and json in apex.&lt;/span&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 100%;&quot;&gt; So what we need here is &lt;/span&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 100%;&quot;&gt; 1.) Fullcalandar plugin  &lt;a href=&quot;http://arshaw.com/fullcalendar/%20&quot;&gt;Download&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 100%;&quot;&gt; 2.) A custom object with start dates and end dates for events&lt;/span&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 100%;&quot;&gt; 3.) Apex class to pull data from object and convert that into json using json.serailze&lt;/span&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;br style=&quot;color: black;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3732GjXVG1YnhlsFA7RgKHxEbWsH6_v3uiUfBo5ywkGPQ-JWsV-E1QbH316j-LeSmgcQW4vLgj5TxErIS8YtTXnyJehzkNXNuYroVf8iZ9svjUqfHJrPeHvJjmm7WftjQapeQ2n3lzP4/s1600/1.png&quot; style=&quot;color: black;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5754931099681128786&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3732GjXVG1YnhlsFA7RgKHxEbWsH6_v3uiUfBo5ywkGPQ-JWsV-E1QbH316j-LeSmgcQW4vLgj5TxErIS8YtTXnyJehzkNXNuYroVf8iZ9svjUqfHJrPeHvJjmm7WftjQapeQ2n3lzP4/s320/1.png&quot; style=&quot;cursor: hand; cursor: pointer; float: left; height: 240px; margin: 0 10px 10px 0; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 100%;&quot;&gt;First we have to upload the fullcalendar lib to static resource and then we have to create a visualforce page with below code&lt;/span&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;apex:stylesheet style=&quot;color: black;&quot; value=&quot;{!URLFOR($Resource.jquery_calender, &#39;fullcalendar/fullcalendar.css&#39;)}&quot;&gt;&lt;apex:includescript value=&quot;{!URLFOR($Resource.jquery_calender, &#39;/jquery/jquery-ui-1.8.17.custom.min.js&#39;)}&quot;&gt;&lt;apex:includescript value=&quot;{!URLFOR($Resource.jquery_calender, &#39;/fullcalendar/fullcalendar.min.js&#39;)}&quot;&gt;&lt;apex:stylesheet value=&quot;{!URLFOR($Resource.jquery_calender, &#39;fullcalendar/fullcalendar.css&#39;)}&quot;&gt;&lt;apex:includescript value=&quot;{!URLFOR($Resource.jquery_calender, &#39;/jquery/jquery-ui-1.8.17.custom.min.js&#39;)}&quot;&gt;&lt;apex:includescript value=&quot;{!URLFOR($Resource.jquery_calender, &#39;/fullcalendar/fullcalendar.min.js&#39;)}&quot;&gt;&lt;apex:stylesheet value=&quot;{!URLFOR($Resource.jquery_calender, &#39;fullcalendar/fullcalendar.css&#39;)}&quot;&gt;&lt;apex:includescript value=&quot;{!URLFOR($Resource.jquery_calender, &#39;/jquery/jquery-ui-1.8.17.custom.min.js&#39;)}&quot;&gt;&lt;apex:includescript value=&quot;{!URLFOR($Resource.jquery_calender, &#39;/fullcalendar/fullcalendar.min.js&#39;)}&quot;&gt;.&lt;/apex:includescript&gt;&lt;/apex:includescript&gt;&lt;/apex:stylesheet&gt;&lt;/apex:includescript&gt;&lt;/apex:includescript&gt;&lt;/apex:stylesheet&gt;&lt;/apex:includescript&gt;&lt;/apex:includescript&gt;&lt;/apex:stylesheet&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;codeBlock&quot; style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;The important thing is &quot;JSONOFLIST&quot; which is just json created from list of records by using &lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot; style=&quot;color: black;&quot;&gt;&lt;blockquote&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;    &lt;apex:stylesheet value=&quot;{!URLFOR($Resource.jquery_calender, &#39;fullcalendar/fullcalendar.css&#39;)}&quot;&gt;    &lt;apex:includescript value=&quot;{!URLFOR($Resource.jquery_calender, &#39;/jquery/jquery-ui-1.8.17.custom.min.js&#39;)}&quot;&gt;    &lt;apex:includescript value=&quot;{!URLFOR($Resource.jquery_calender, &#39;/fullcalendar/fullcalendar.min.js&#39;)}&quot;&gt;    &lt;script type=&quot;text/javascript&quot;&gt;
    var date = new Date();    var d = date.getDate();    var m = date.getMonth();    var y = date.getFullYear();    var events = new Array();    $.each({!JSONOFLIST}, function(key, value) {                 var jsonObj = { title: value.Title__c,start:value.Booking_Start__c,end:value.Booking_End__c,allDay: true};                                                   events.push(jsonObj);              });     $(document).ready(function() {        var calendar = $(&#39;#calendar&#39;).fullCalendar({            header: {                left: &#39;prev,next today&#39;,                center: &#39;title&#39;,                right: &#39;month,agendaWeek,agendaDay&#39;            },            selectable: true,            selectHelper: true,            select: function(start, end, allDay) {                var title = prompt(&#39;Booking Title:&#39;);                if (title) {                      // Waiting                    lockScreen(true);                     addBooking(start.getFullYear()+&#39;-&#39;+start.getMonth()+&#39;-&#39;+start.getDate(),end.getFullYear()+&#39;-&#39;+end.getMonth()+&#39;-&#39;+end.getDate(),title); // Save to server.                    calendar.fullCalendar(&#39;renderEvent&#39;,                        {                            title: title,                            start: start,                            end: end,                            allDay: allDay                        },                        true // make the event &quot;stick&quot;                    );                }                calendar.fullCalendar(&#39;unselect&#39;);            },            editable: false,            events: events        });            });
&lt;/script&gt;  &lt;/apex:includescript&gt;&lt;/apex:includescript&gt;&lt;/apex:stylesheet&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span id=&quot;ApexClassViewPage:theTemplate:theForm:thePageBlock:j_id56:j_id57:j_id58&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;codeBlock&quot;&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span id=&quot;ApexClassViewPage:theTemplate:theForm:thePageBlock:j_id56:j_id57:j_id58&quot;&gt;  JSONOFLIST = JSON.serialize(LIST OF SOBJECT);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot;&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span id=&quot;ApexClassViewPage:theTemplate:theForm:thePageBlock:j_id56:j_id57:j_id58&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot;&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span id=&quot;ApexClassViewPage:theTemplate:theForm:thePageBlock:j_id56:j_id57:j_id58&quot;&gt;It will give you  a calendar with items highlited on page

&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheCHsLnjR-Uxw_dyyu6WT8NEsEpz8Ziwi3jPyEcc4gpal84EcLN8Pf6iZYOEeOoxpxI3eOO6w408-zIPfVkLgF0xboaqAR6gweCQANHFVnx7R20xubg3KASagl2TtDWZSxGLNtfP1OyS0/s1600/Screenshot+at+2012-06-17+23:46:16.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheCHsLnjR-Uxw_dyyu6WT8NEsEpz8Ziwi3jPyEcc4gpal84EcLN8Pf6iZYOEeOoxpxI3eOO6w408-zIPfVkLgF0xboaqAR6gweCQANHFVnx7R20xubg3KASagl2TtDWZSxGLNtfP1OyS0/s320/Screenshot+at+2012-06-17+23:46:16.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/4172270533684884348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/calandar-in-visualforce-page.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/4172270533684884348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/4172270533684884348'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/calandar-in-visualforce-page.html' title='Custom Calendar on VisualForce Page'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3732GjXVG1YnhlsFA7RgKHxEbWsH6_v3uiUfBo5ywkGPQ-JWsV-E1QbH316j-LeSmgcQW4vLgj5TxErIS8YtTXnyJehzkNXNuYroVf8iZ9svjUqfHJrPeHvJjmm7WftjQapeQ2n3lzP4/s72-c/1.png" height="72" width="72"/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-971919232345150926</id><published>2012-06-16T09:55:00.000-07:00</published><updated>2012-06-16T10:00:10.758-07:00</updated><title type='text'>Paypal Website Payment Standards in Visualforce</title><content type='html'>&lt;span style=&quot;font-size: x-small;&quot;&gt;Sometimes we need to implement a functionality where we have to accept credit &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;card payment but we just want to have a quick and simple process. Paypal website payment standards is the choice. What we need for this&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;1.) Business Account&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;2.) Force.com site where we can host this visualforce page&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;3.) Code to Accept IPN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Below is the code which will display a Buy Now button on visualforce page and you can change the amount based on your calculations&lt;/span&gt;&lt;br /&gt;
&amp;lt;form action=&quot;https://www.sandbox.paypal.com/cgi-bin/webscr&quot; method=&quot;post&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_xclick&quot;/&amp;gt;&amp;nbsp; &lt;br /&gt;
&amp;lt;input type=&quot;hidden&quot; name=&quot;business&quot; value=&quot;YOUR BUSINESS EMAIL HERE&quot;/&amp;gt;&amp;nbsp; &lt;br /&gt;
&amp;lt;input type=&quot;hidden&quot; name=&quot;item_name&quot; value=&quot;ITEM NAME&quot;/&amp;gt; &lt;br /&gt;
&amp;lt;input type=&quot;hidden&quot; name=&quot;item_number&quot; value=&quot;ITEM NO&quot;/&amp;gt; &lt;br /&gt;
&amp;lt;input type=&quot;hidden&quot; name=&quot;amount&quot; value=&quot;1&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;input type=&quot;hidden&quot; name=&quot;notify_url&quot; value=&quot;IPN URL&quot;/&amp;gt;&amp;nbsp; &lt;br /&gt;
&amp;lt;input type=&quot;hidden&quot; name=&quot;custom&quot; value=&quot;YOU CAN PASS A CUSTOM VARIABLE HERE WHICH WILL BE PASSED TO IPN&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;input type=&quot;hidden&quot; name=&quot;return&quot; value=&quot;URL WHERE USER WILL BE REDIRECTED AFTER PAYMENT&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;input type=&quot;hidden&quot; name=&quot;cancel_return&quot; value=&quot;URL WHERE USER WILL BE REDIRECTED AFTER CLICKING ON CANCEL&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;input type=&quot;hidden&quot; name=&quot;no_shipping&quot; value=&quot;0&quot;/&amp;gt;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;hidden&quot; name=&quot;no_note&quot; value=&quot;1&quot;/&amp;gt;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot;/&amp;gt;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;hidden&quot; name=&quot;lc&quot; value=&quot;AU&quot;/&amp;gt;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;hidden&quot; name=&quot;bn&quot; value=&quot;PP-BuyNowBF&quot;/&amp;gt;&amp;nbsp; &lt;br /&gt;
&amp;lt;input type=&quot;hidden&quot; name=&quot;email&quot; value=&quot;jdoe@zyzzyu.com&quot; /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;input type=&quot;image&quot; name=&quot;submit&quot; border=&quot;0&quot; src=&quot;https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif&quot; alt=&quot;PayPal - The safer, easier way to pay online&quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The ipn url will be hit everytime a payment is made and this can be used to update the data in salesforce instance with the transaction details.&lt;br /&gt;
&lt;br /&gt;
You just need to have a page where you will call below handler to process the transactions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;ApexClassViewPage:theTemplate:theForm:thePageBlock:j_id56:j_id57:j_id58&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;codeBlock&quot;&gt;public&amp;nbsp;class&amp;nbsp;PaypalIPNListionarController&amp;nbsp;{

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String customvalue;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&amp;nbsp;paymentStatus;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&amp;nbsp;paymentAmount;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&amp;nbsp;paymentCurrency;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&amp;nbsp;txnId;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public&amp;nbsp;PaypalIPNListionarController(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;read&amp;nbsp;post&amp;nbsp;from&amp;nbsp;PayPal&amp;nbsp;system&amp;nbsp;and&amp;nbsp;add&amp;nbsp;&#39;cmd&#39;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Set&amp;lt;String&amp;gt;&amp;nbsp;params&amp;nbsp;=&amp;nbsp;Apexpages.currentPage().getParameters().keySet();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&amp;nbsp;str&amp;nbsp;=&amp;nbsp;&#39;cmd=_notify-validate&#39;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(String&amp;nbsp;param&amp;nbsp;:&amp;nbsp;params){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&amp;nbsp;paramName&amp;nbsp;=&amp;nbsp;param;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&amp;nbsp;paramValue&amp;nbsp;=&amp;nbsp;Apexpages.currentPage().getParameters().get(param);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;str&amp;nbsp;=&amp;nbsp;str&amp;nbsp;+&amp;nbsp;&#39;&amp;amp;&#39;&amp;nbsp;+&amp;nbsp;paramName&amp;nbsp;+&amp;nbsp;&#39;=&#39;&amp;nbsp;+&amp;nbsp;EncodingUtil.urlEncode(paramValue,&#39;UTF-8&#39;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Http&amp;nbsp;http&amp;nbsp;=&amp;nbsp;new&amp;nbsp;Http();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;HttpRequest&amp;nbsp;req&amp;nbsp;=&amp;nbsp;new&amp;nbsp;HttpRequest();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;req.setEndpoint(&#39;https://www.sandbox.paypal.com/cgi-bin/webscr&#39;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;req.setBody(str);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;req.setMethod(&#39;POST&#39;);&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;HTTPResponse&amp;nbsp;res&amp;nbsp;=&amp;nbsp;http.send(req);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&amp;nbsp;respText&amp;nbsp;=&amp;nbsp;res.getBody();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; customvalue =&amp;nbsp;Apexpages.currentPage().getParameters().get(&#39;custom&#39;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;paymentStatus&amp;nbsp;=&amp;nbsp;Apexpages.currentPage().getParameters().get(&#39;payment_status&#39;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;paymentAmount&amp;nbsp;=&amp;nbsp;Apexpages.currentPage().getParameters().get(&#39;mc_gross&#39;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;paymentCurrency&amp;nbsp;=&amp;nbsp;Apexpages.currentPage().getParameters().get(&#39;mc_currency&#39;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;txnId&amp;nbsp;=&amp;nbsp;Apexpages.currentPage().getParameters().get(&#39;txn_id&#39;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//check&amp;nbsp;notification&amp;nbsp;validation
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(respText.equals(&#39;VERIFIED&#39;))&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do YOUR PROCESSING HERE
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot;&gt;         public pagerefernce processTransactionDetails(){&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot;&gt;&amp;nbsp;           Process Transaction here &lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot;&gt;        } &lt;/pre&gt;
&lt;pre class=&quot;codeBlock&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/971919232345150926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/paypal-website-payment-standards-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/971919232345150926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/971919232345150926'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2012/06/paypal-website-payment-standards-in.html' title='Paypal Website Payment Standards in Visualforce'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-8034082940656477411</id><published>2011-03-04T09:01:00.000-08:00</published><updated>2011-03-04T09:39:44.688-08:00</updated><title type='text'>Avoid Governor Limits</title><content type='html'>&lt;span style=&quot;;font-family:times new roman;font-size:100%;&quot;  &gt;Salesforce is based on Multiteanet Architecture so they have imposed  limits for the implementation of the Apex and customization of things. So the first and foremost challange in front of each developer is &quot;Implementation of code avoiding governor limits&quot;. So below are some tips and tricks to avoid governor limits&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;The governor limits are applied on the basis of the initiation of the code execution.&lt;/span&gt; The execution initiates from :-&lt;br /&gt;&lt;ol style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;li&gt;&lt;a style=&quot;font-family: times new roman;&quot; href=&quot;http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_triggers.htm&quot; class=&quot;external text&quot; title=&quot;http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_triggers.htm&quot; rel=&quot;nofollow&quot;&gt;Apex Trigger&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a style=&quot;font-family: times new roman;&quot; href=&quot;http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_web_services_methods.htm&quot; class=&quot;external text&quot; title=&quot;http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_web_services_methods.htm&quot; rel=&quot;nofollow&quot;&gt;Apex Web Service&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a style=&quot;font-family: times new roman;&quot; href=&quot;http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_anonymous_block.htm&quot; class=&quot;external text&quot; title=&quot;http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_anonymous_block.htm&quot; rel=&quot;nofollow&quot;&gt;Anonymous Block&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a style=&quot;font-family: times new roman;&quot; href=&quot;http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_controller.htm&quot; class=&quot;external text&quot; title=&quot;http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_controller.htm&quot; rel=&quot;nofollow&quot;&gt;Visualforce Controller&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;DML operations are basic needs of any implementation. so lets discuss the problem and the solution for this.&lt;br /&gt;&lt;span style=&quot;;font-family:times new roman;font-size:100%;&quot;  &gt;1.) Let’s have a look at the type of code that could cause this issue&lt;/span&gt; &lt;blockquote  style=&quot;font-family:times new roman;&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;public void functionName(List&lt;string&gt; theNames){&lt;/string&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;padding-left: 30px;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;for(String theName: theNames){&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;padding-left: 60px;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;myObject__c obj = [SELECT processed__c  FROM myObject__c WHERE name=:theName]; //This may result in  ‘Too many SOQL queries’&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;padding-left: 60px;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;obj.processed__c = true;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;padding-left: 60px;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;update obj; // Mistake #2 – may result in ‘Too many DML rows’&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;padding-left: 30px;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;}&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;The &lt;em&gt;SELECT &lt;/em&gt;statement  will be run for each iteration of the loop i.e. a list of 200 names  means 200 queries, which means 200 round trips, which means this isn’t  going to work. The solution is to fetch all records for the object  before the loop and then loop through the list of objects returned,  thereby bypassing the need to query each time.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Solution :-&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;public void rhymeWithOrange(List&lt;string&gt; theNames){&lt;/string&gt;&lt;/p&gt; &lt;p style=&quot;padding-left: 30px;&quot;&gt;List&lt;myobject__c&gt; objToUpdate = new List&lt;myobject__c&gt;(); // intermediate list&lt;/myobject__c&gt;&lt;/myobject__c&gt;&lt;/p&gt; &lt;p style=&quot;padding-left: 30px;&quot;&gt;List&lt;myobject__c&gt; objects = [SELECT processed__c FROM myObject__c];&lt;/myobject__c&gt;&lt;/p&gt; &lt;p style=&quot;padding-left: 30px;&quot;&gt;for(String myName: theNames){&lt;/p&gt; &lt;p style=&quot;padding-left: 60px;&quot;&gt;for(myObject__c obj: objects){&lt;/p&gt; &lt;p style=&quot;padding-left: 90px;&quot;&gt;if(theName==obj.name){&lt;/p&gt; &lt;p style=&quot;padding-left: 120px;&quot;&gt;obj.processed__c = true;&lt;/p&gt; &lt;p style=&quot;padding-left: 120px;&quot;&gt;objToUpdate.add(obj); // add processed objects to intermediate list&lt;/p&gt; &lt;p style=&quot;padding-left: 90px;&quot;&gt;}&lt;/p&gt; &lt;p style=&quot;padding-left: 60px;&quot;&gt;}&lt;/p&gt; &lt;p style=&quot;padding-left: 30px;&quot;&gt;}&lt;/p&gt; &lt;p style=&quot;padding-left: 30px;&quot;&gt;update objToUpdate; // update all objects at once to avoid SOQL execption&lt;br /&gt;&lt;/p&gt; &lt;p&gt;}&lt;/p&gt;&lt;p&gt;In above what we did is made a list of updated objects and then updated all in a single update statement just 1 statement.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;There are other solution as well dependent on the situation which we will cover later such as Batchapex,Future Calls&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/8034082940656477411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2011/03/avoid-governor-limits.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/8034082940656477411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/8034082940656477411'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2011/03/avoid-governor-limits.html' title='Avoid Governor Limits'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-5601853327326298545</id><published>2011-02-18T09:34:00.000-08:00</published><updated>2011-02-19T05:54:39.601-08:00</updated><title type='text'>Utlilze a Apex Webservice in php</title><content type='html'>I was looking to get some report id in my php code so found a workaround for that. we can make a Apex webservice method and call that in php. So below is the step by step process to do that.&lt;br /&gt;&lt;br /&gt;1.) Make a apex webservice class and a method.&lt;br /&gt;To Create a class :-   Develop| Apex Classes| New&lt;br /&gt;&lt;br /&gt;Here we are making a service to get ReportID for a given report name&lt;br /&gt;&lt;br /&gt;&lt;span id=&quot;ApexClassViewPage:theTemplate:theForm:thePageBlock:j_id54:j_id55:j_id56&quot;&gt;&lt;pre class=&quot;codeBlock&quot;&gt;global class reportsManager{&lt;br /&gt;&lt;br /&gt;WebService static string FindReport(string ReportName)&lt;br /&gt;{&lt;br /&gt;List&lt;report&gt; reports = new list&lt;report&gt;([Select Id, Name from Report Where Name = :ReportName]);&lt;br /&gt;if (reports == null || reports.size() == 0) return null;&lt;br /&gt;&lt;br /&gt;return &lt;/report&gt;&lt;/report&gt;reports[0].Id&lt;report&gt;&lt;report&gt; &lt;/report&gt;&lt;/report&gt;&lt;report&gt;&lt;report&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;2.) Download the WSDL xml for above class and save it in a source folder.&lt;br /&gt;&lt;br /&gt;&lt;/report&gt;&lt;/report&gt;To Download WSDL :-   Develop| Apex Classes| WSDL(Save the file)&lt;br /&gt;&lt;br /&gt;&lt;report&gt;&lt;report&gt;3.)Now in your php code make a function as follows.&lt;br /&gt;a.) Get connection to your org  Refer&lt;a href=&quot;http://php-salesforce.blogspot.com/2011/02/integration-php-and-salesforce.html&quot;&gt;Integration Blog&lt;/a&gt;.&lt;br /&gt;$crmHandle = $this-&gt;getConnection()&lt;br /&gt;&lt;br /&gt;b.)$sfdc = new SforcePartnerClient();// Making object of toolkit class&lt;br /&gt;&lt;br /&gt;c.)Create a variable for your class name mine is &quot;reportManager&quot;&lt;br /&gt;define (&quot;_WS_NAMESPACE_&quot;, &#39;http://soap.sforce.com/schemas/class/reportsManager&#39;);&lt;br /&gt;&lt;br /&gt;d.)Set headers of your request&lt;br /&gt;$session=&lt;/report&gt;&lt;/report&gt;array(&quot;sessionId&quot; =&gt; $_SESSION[&#39;sessionId&#39;]);&lt;br /&gt;&lt;report&gt;&lt;report&gt;$sforce_header = new SoapHeader(_WS_NAMESPACE_, &quot;SessionHeader&quot;,$session);&lt;br /&gt;&lt;br /&gt;e.) Create a client of your webservice method&lt;br /&gt;$client = new SoapClient(&#39;includes/soapclient/reportsManager.wsdl.xml&#39;);&lt;br /&gt;&lt;br /&gt;f.)Set Parameters for your sebservice method mine takes a single param that is report name&lt;br /&gt;$wsParams=array(&#39;ReportName&#39;=&gt;&#39;test&#39;);&lt;br /&gt;&lt;br /&gt;g.)Time to call the webservice method&lt;br /&gt;$response = $client-&gt;FindReport($wsParams);&lt;br /&gt;var_dump($response);&lt;br /&gt;&lt;br /&gt;Bingo you have your result in $response&lt;br /&gt;&lt;br /&gt;&lt;/report&gt;&lt;/report&gt;&lt;/pre&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/5601853327326298545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2011/02/call-apex-webservice-in-php.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/5601853327326298545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/5601853327326298545'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2011/02/call-apex-webservice-in-php.html' title='Utlilze a Apex Webservice in php'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-3661027169407551016</id><published>2011-02-17T21:13:00.000-08:00</published><updated>2011-02-18T07:11:58.679-08:00</updated><title type='text'>Getting Reports From Salesforce to Custom Portal using php</title><content type='html'>Hey All,&lt;br /&gt;&lt;br /&gt;I have been searching ways to get data of the reports from salesforce to a Custom Web portal developed using php. Found a way of doing this using CURL extention of php. So Below are the steps ..&lt;br /&gt;1.) Enable PHP_CURL in your php instalations.&lt;br /&gt;&lt;br /&gt;2.) Create code for connecting to your instance as per my previous blog.&lt;br /&gt;&lt;span class=&quot;comment-body&quot; text=&quot;&quot;&gt;&lt;span class=&quot;text&quot;&gt;$result = $client-&gt;login($username, $password);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;comment-body&quot; text=&quot;&quot;&gt;&lt;span class=&quot;text&quot;&gt;$client-&gt;sessionId = $result[&#39;sessionId&#39;]; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3.) Get the report ID from your instance using a webservice method in APEx&lt;br /&gt;&lt;span class=&quot;comment-body&quot; text=&quot;&quot;&gt;WebService string FindReport(string ReportName)&lt;br /&gt;{&lt;br /&gt;  List&lt;report&gt; reports = [Select Id, Name from Report Where Name = :ReportName];&lt;br /&gt;  if (reports == null || reports.size() == 0) return null;&lt;br /&gt;&lt;br /&gt;  PageReference pageRef = new PageReference(&#39;/&#39; + reports[0].Id);&lt;br /&gt;  Blob ReportBlob = pageRef.getContent();&lt;br /&gt;  return ReportBlob.toString();&lt;br /&gt;}&lt;br /&gt;&lt;/report&gt;&lt;/span&gt;Thanks to &lt;a href=&quot;http://www.linkedin.com/groups?viewMemberFeed=&amp;amp;gid=66190&amp;amp;memberID=1319265&quot;&gt;David&lt;/a&gt;&lt;br /&gt;&lt;span class=&quot;comment-body&quot; text=&quot;&quot;&gt;&lt;span class=&quot;text&quot;&gt;&lt;br /&gt;4.)Define the URL to hit&lt;br /&gt; &lt;br /&gt;$url = &quot;&lt;a target=&quot;blank&quot; href=&quot;http://www.linkedin.com/redirect?url=https%3A%2F%2Fna1%2Esalesforce%2Ecom&amp;amp;urlhash=8dFM&amp;amp;_t=tracking_disc&quot; rel=&quot;nofollow&quot;&gt;https://na1.salesforce.com&lt;/a&gt;&quot;;&lt;br /&gt;         $reportUrl = $url.&quot;/&quot;.$reportId.&quot;?export=1&amp;amp;enc=UTF-8&amp;amp;xf=csv&quot;;&lt;br /&gt;&lt;br /&gt;5.) Initialize CURL&lt;br /&gt;         $ch = curl_init();&lt;br /&gt;         curl_setopt($ch, CURLOPT_URL, $reportUrl);&lt;br /&gt;         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;// Not doing any verification of SSL certificates&lt;br /&gt;         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);&lt;br /&gt;         curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);&lt;br /&gt;curl_setopt($ch, CURLOPT_COOKIE, &#39;sid=&#39;.$client-&gt;sessionId);&lt;br /&gt;         setcookie(&quot;sid&quot;, $client-&gt;sessionId, 0, &quot;/&quot;, &quot;.salesforce.com&quot;, 0);&lt;br /&gt;         curl_setopt($ch, CURLOPT_TIMEOUT, 30);&lt;br /&gt;         $result = curl_exec ($ch);&lt;br /&gt;         curl_close ($ch);&lt;br /&gt;&lt;br /&gt;             $result is a XML of data now you can parse it using SimpleXMl library of php&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/3661027169407551016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2011/02/getting-report-data-from-salesforce-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/3661027169407551016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/3661027169407551016'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2011/02/getting-report-data-from-salesforce-in.html' title='Getting Reports From Salesforce to Custom Portal using php'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-770133614721005937</id><published>2011-02-14T10:29:00.000-08:00</published><updated>2011-02-14T22:32:03.495-08:00</updated><title type='text'>Salesforce Paypal Integration</title><content type='html'>This is my Second Post for the integration of Salesforce With 3rd party Softwares using the HTTP calls. We may find many ways to integrate 3rd party API&#39;s but the best is to use HTTP class.As we may not find the free/open source APPS in APP EXCHANGE all the times. so below are the steps to integrate the Paypal With Salesforce.You can use this method for any service like fedex,Mobiletransact... and so on.&lt;br /&gt;&lt;br /&gt;1.)In Develop | Security | Remote Site Settings&lt;br /&gt;&lt;br /&gt;Add https://api-3t.sandbox.paypal.com (For Sandbox). You need to get the Endpoint URL where the request is to be sent.&lt;br /&gt;&lt;br /&gt;2.) Get the Paypal Sandbox Credentials for account (http://developer.paypal.com)&lt;br /&gt;You will need&lt;br /&gt;a.)Seller Account&lt;br /&gt;   Username&lt;br /&gt;   Password&lt;br /&gt;   Api Signature&lt;br /&gt;b.)Buyer Account&lt;br /&gt;&lt;br /&gt;You need to get the credentials for the services you want to consume.&lt;br /&gt;&lt;br /&gt;Now as you have all the ground work done lets move to the implementation of the Apex code for integration.&lt;br /&gt;&lt;br /&gt;Now From The Api of the Service you want to integrate get the details of the Mandatory variables ie :Paypal(&lt;a href=&quot;https://www.paypalobjects.com/en_US/ebook/PP_APIReference/dcc.html&quot;&gt;Do Direct Payment Api&lt;/a&gt;)&lt;br /&gt; &lt;br /&gt;After you set the variables as per the Api now you need to send the http request to the paypal server.&lt;br /&gt;&lt;br /&gt;  Http httpObject = new Http();&lt;br /&gt;  HttpRequest req = new HttpRequest();&lt;br /&gt;  String url = &#39;https://api-3t.sandbox.paypal.com/2.0/&#39;;&lt;br /&gt;  string un = &#39;Your Username&#39;;&lt;br /&gt;  string pw = &#39;Your Password&#39;;&lt;br /&gt;  string sig = &#39;Your Signature&#39;;&lt;br /&gt;  string soapXML=&#39;Here soapXMl is the request  String in XML format&#39;;&lt;br /&gt;  req.setBody(soapXML);&lt;br /&gt;  req.setEndpoint(url);&lt;br /&gt;  req.setMethod(&#39;POST&#39;);&lt;br /&gt;  req.setHeader(&#39;Content-length&#39;, &#39;1753&#39; );&lt;br /&gt;  req.setHeader(&#39;Content-Type&#39;, &#39;text/xml;charset=UTF-8&#39;);  &lt;br /&gt;  req.setHeader(&#39;SOAPAction&#39;,&#39;&#39;);&lt;br /&gt;  &lt;br /&gt;  Now Send The Request&lt;br /&gt;  HttpResponse res = httpObject.send(req);&lt;br /&gt;  String xml = res.getBody();&lt;br /&gt;&lt;br /&gt;  The result will be an xml which can be parsed using XmlStreamReader&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  Now read the XML response and get the Paypal result  &lt;br /&gt;  XmlStreamReader reader = res.getXmlStreamReader();&lt;br /&gt;  result = readXMLResponse(reader,&#39;Ack&#39;);&lt;br /&gt;  &lt;br /&gt;  And you are done. feel free to comment or suggest ....</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/770133614721005937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2011/02/salesforce-paypal-integration.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/770133614721005937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/770133614721005937'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2011/02/salesforce-paypal-integration.html' title='Salesforce Paypal Integration'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3122345442772680944.post-6333732088874246672</id><published>2011-02-10T04:48:00.001-08:00</published><updated>2011-02-10T09:28:09.548-08:00</updated><title type='text'>Php and salesforce Integration</title><content type='html'>Hey All,&lt;br /&gt;&lt;br /&gt;I have been struggling around to integrate salesforce with third party services ie paypal,amazon s3 etc. So the first step for this is integration the Organization with our system with any language say php. So below are the step by step instruction to get data from salesforce.&lt;br /&gt;&lt;br /&gt;1.) Get the salesforce php toolkit from &lt;a href=&quot;https://github.com/developerforce/Force.com-Toolkit-for-PHP/tree/master/soapclient&quot;&gt;Github&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2.)Create a php file that includes 2 files require_once(&#39;soapclient/SforcePartnerClient.php&#39;);&lt;br /&gt;require_once(&quot;soapclient/SforceHeaderOptions.php&quot;);&lt;br /&gt;&lt;br /&gt;3.)Create object of the class&lt;br /&gt;$sfObject = new SforcePartnerClient();&lt;br /&gt;&lt;br /&gt;4.) Download the WSDL of your org and add below code&lt;br /&gt;a.) To download the WSDL click Your Name | Setup | Developer | API&lt;br /&gt;$mySoapClient = $sfObject-&gt;createConnection(&#39;wsdl.jsp.xml&#39;);&lt;br /&gt;&lt;br /&gt;5.)Connect to the ORG&lt;br /&gt;$crmHandle  = $sfObject-&gt;login($username, $password . $securityToken);&lt;br /&gt;&lt;br /&gt;Here $username=&quot;Your Salesforce Username&quot;&lt;br /&gt;     $password=&quot;Your salesforce password&quot;&lt;br /&gt;     $securityToken=&quot;Your Salesforce Token&quot;&lt;br /&gt;&lt;br /&gt;6.)Finally the complete code Try fetching data from some object&lt;br /&gt;     $sfObject = new SforcePartnerClient();&lt;br /&gt;     $mySoapClient = $sfObject-&gt;createConnection(&#39;wsdl.jsp.xml&#39;);&lt;br /&gt;     $crmHandle = $sfObject-&gt;login($username, $password . $securityToken);&lt;br /&gt;&lt;br /&gt;     $query = &quot;Select id,Name FROM Person__c where Status__c=&#39;Employer&#39;&quot;;&lt;br /&gt;     $response = $crmHandle-&gt;query(($query));&lt;br /&gt;     return $response;&lt;br /&gt;&lt;br /&gt;The above steps will help you in connecting to salesforce org and fetching data from it.</content><link rel='replies' type='application/atom+xml' href='http://php-salesforce.blogspot.com/feeds/6333732088874246672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-salesforce.blogspot.com/2011/02/integration-php-and-salesforce.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/6333732088874246672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3122345442772680944/posts/default/6333732088874246672'/><link rel='alternate' type='text/html' href='http://php-salesforce.blogspot.com/2011/02/integration-php-and-salesforce.html' title='Php and salesforce Integration'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>