<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shiva Blog</title>
	<atom:link href="http://shivasoft.in/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://shivasoft.in/blog</link>
	<description>Explore your knowledge and share with world</description>
	<lastBuildDate>Thu, 23 May 2013 23:00:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Salesforce Interview Question – Part 15</title>
		<link>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-15/</link>
		<comments>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-15/#comments</comments>
		<pubDate>Thu, 23 May 2013 23:00:27 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Visualforce]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3218</guid>
		<description><![CDATA[141 : User Wants to set the starting day in Calendar as &#8220;Monday&#8221; instead of &#8220;Sunday&#8221;. How to get it done? Ans : Change the user locale to &#8220;English ( United Kingdom ) &#8221; in Personal information or User record. 142 : Why CSS is not working in PDF created by Visualforce ? Ans : [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-13/' rel='bookmark' title='Salesforce Interview Question – Part 13'>Salesforce Interview Question – Part 13</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-12/' rel='bookmark' title='Salesforce Interview Question &#8211; Part 12'>Salesforce Interview Question &#8211; Part 12</a></li>
<li><a href='http://shivasoft.in/blog/others/tips/difference-in-master-detail-relationship-and-look-up-relationship-salesforce-interview-question/' rel='bookmark' title='Difference in Master-Detail relationship and look up relationship &#8211; Salesforce Interview question'>Difference in Master-Detail relationship and look up relationship &#8211; Salesforce Interview question</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[
<!-- iframe plugin v.2.7 wordpress.org/plugins/iframe/ -->
<iframe src="http://shivasoft.in/blog/SFDCInterviewList.php" height="100px" width="100%" scrolling="no" class="iframe-class" frameborder="0"></iframe>
<p><strong>141 : User Wants to set the starting day in Calendar as &#8220;Monday&#8221; instead of &#8220;Sunday&#8221;. How to get it done?</strong><br />
<strong> Ans :</strong> Change the user locale to &#8220;English ( United Kingdom ) &#8221; in Personal information or User record.</p>
<hr />
<p style="text-align: justify;"><strong>142 : Why CSS is not working in PDF created by Visualforce ?</strong><br />
<strong> Ans :</strong> In Many cases, i have observed problems faced by my colleagues and complaining that CSS is not working when they try to render any Visualforce page as &#8220;PDF&#8221;. Same Question is asked many times in Interviews also. Basically there are two ways:</p>
<ol>
<li style="text-align: justify;">Use &#8220;apex:stylesheet&#8221; tag to import external CSS file</li>
<li style="text-align: justify;">Wrap &#8220;Style&#8221; tag inside &#8220;Head&#8221; tag in Visualforce</li>
</ol>
<hr />
<p><strong>143 : How to get Ip Address of User in Apex?</strong><br />
<strong> Ans :</strong></p>
<pre class="brush: java; title: ; notranslate">
String ipAddress = ApexPages.currentPage().getHeaders().get('X-Salesforce-SIP');
</pre>
<p>True-Client-IP has the value when the request is coming via the caching integration.<br />
X-Salesforce-SIP has the value if there is no caching integration (sandbox, developer edition orgs) or via the secure url.<br />
<a title="Get IP Address in Apex" href="http://www.tehnrd.com/ip-address-geolocation-with-force-com/" rel="nofollow">Thanks to TechNrd for this tips.<span id="more-3218"></span></a></p>
<hr />
<p style="text-align: justify;"><strong>144 : How to get total number of Child records in Lookup relationship?</strong><br />
<strong> Ans:</strong> As Rollup Summary field is only supported in Master detail, we cannot use it for Lookup. There are following two ways (If anyone has any other idea please comment).</p>
<ol>
<li style="text-align: justify;"><em>Inline Visualforce page</em></li>
<li style="text-align: justify;"><em>Trigger</em> on Child Object, which will update field in Parent record if child record is inserted, deleted or undeleted.</li>
</ol>
<hr />
<p><strong>145 : System admin has created a Visualforce for Account. In future he created few more new Fields. How could System admin can code Visualforce so that in future if any new field is added or existing field deleted. It should reflect in Visualforce without changing anycode?</strong><br />
<strong> Ans :</strong> <a title="Field Set Usage in Visualforce" href="http://shivasoft.in/blog/salesforce/visualforce/using-fieldset-with-visualforce-and-apex/">It can be done with help of Field Sets. Please read this article.</a></p>
<hr />
<p><strong>146 : Once you convert lead, Few fields on lead should be reset so that sensitive information should not be queried using SOQL. How to get this done?</strong><br />
<strong> Ans :</strong> Once lead is converted, its READ ONLY. we cannot update it using Apex or Trigger. However we can use &#8220;Before Update&#8221; trigger on lead and check for fiels &#8220;<strong>IsConverted</strong>&#8220;. If its true means lead is going to be converted so reset all fields in that case.</p>
<hr />
<p><strong>147 : How to convert carriage returns in Textarea to Line Breaks in Visualforce?</strong><br />
<strong> Ans : </strong>We can use &#8220;&lt;apex:outputField&gt;&#8221; instead of &#8220;&lt;apex:outputText&gt;&#8221;. It will maintain formatting automatically.</p>
<hr />
<p style="text-align: justify;"><strong>148 : How to handle comma within field while uploading using DataLoader ?</strong><br />
<strong> Ans :</strong> Data Loader cannot handle this implicitly because there is no logical path to follow. In case your Data Loader CSV file for import will contain commas for any of the field content, you will have to enclose the contents within double quotation marks &#8221; &#8220;. Data Loader will be able to handle this.</p>
<p style="text-align: justify;">For example :</p>
<pre class="brush: bash; title: ; notranslate">
Column_1__c,Column_2__c,Column_3__c
Shiva,&quot;Jitendra, Minal&quot;,Soft
</pre>
<p style="text-align: justify;">If you are creating the import CSV in Excel, the quotation marks will be inserted automatically by Excel whenever a comma is detected in any cell &#8211; Saving the CSV in Excel and opening the same in Notepad reveals the enclosing quotation marks for cells containing commas.</p>
<hr />
<p><strong>149 : In Master Detail Relationship :</strong><br />
<strong> OWD for Parent is public Read Only.</strong><br />
<strong> If User has &#8211; Create, Edit Permission on Master as well as Detail Object.</strong></p>
<p><strong>While creating record for detail object he selects parent record which is not created by him. What will happen in this case ?</strong></p>
<p><strong>Ans :</strong> He will get an error, because in order to add child record user must have edit permission in parent master record.</p>
<hr />
<p style="text-align: justify;"><strong>150 : Difference in &#8220;Export&#8221; and &#8220;Export All&#8221; in Data Loader in Salesforce?</strong><br />
<strong> Ans :</strong><br />
<strong>Export :</strong> It is used to export the Salesforce Data(excluding recycle bin&#8217;s data) into your local system.</p>
<p style="text-align: justify;"><strong>Export All :</strong>  It is used to export the Salesforce Data(including recycle bin&#8217;s data) into your local system.</p>

<!-- iframe plugin v.2.7 wordpress.org/plugins/iframe/ -->
<iframe src="http://shivasoft.in/blog/SFDCInterviewList.php" height="100px" width="100%" scrolling="no" class="iframe-class" frameborder="0"></iframe>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-13/' rel='bookmark' title='Salesforce Interview Question – Part 13'>Salesforce Interview Question – Part 13</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-12/' rel='bookmark' title='Salesforce Interview Question &#8211; Part 12'>Salesforce Interview Question &#8211; Part 12</a></li>
<li><a href='http://shivasoft.in/blog/others/tips/difference-in-master-detail-relationship-and-look-up-relationship-salesforce-interview-question/' rel='bookmark' title='Difference in Master-Detail relationship and look up relationship &#8211; Salesforce Interview question'>Difference in Master-Detail relationship and look up relationship &#8211; Salesforce Interview question</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-15/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Report Filters in Salesforce</title>
		<link>http://shivasoft.in/blog/salesforce/dynamic-report-filters-in-salesforce/</link>
		<comments>http://shivasoft.in/blog/salesforce/dynamic-report-filters-in-salesforce/#comments</comments>
		<pubDate>Thu, 16 May 2013 21:57:46 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Report]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3310</guid>
		<description><![CDATA[I have seen many customers in need to have Dynamic Filter. In Absence of Dynamic filter, many times we end up with creating multiple reports with same format and different condition. Many time, we need something like get all cases related to Parent Account of Opportunity. We can simply create a report for Case and [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/very-useful-tips-and-tricks-of-the-apex-salesforce-interview-questions-part-4/' rel='bookmark' title='Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex'>Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/dynamic-approval-process-based-on-the-apex-and-trigger/' rel='bookmark' title='Dynamic Approval Process in Salesforce based on the Apex and Trigger'>Dynamic Approval Process in Salesforce based on the Apex and Trigger</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/where-are-the-reports-for-my-custom-object-with-related-objects-in-salesforce/' rel='bookmark' title='Where are the reports for my custom object with related objects in salesforce?'>Where are the reports for my custom object with related objects in salesforce?</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I have seen many customers in need to have Dynamic Filter. In Absence of Dynamic filter, many times we end up with creating multiple reports with same format and different condition.</p>
<p>Many time, we need something like get all cases related to Parent Account of Opportunity. We can simply create a report for Case and add Condition for Account Name. Using Some Custom Link, we can always Change Account Name and same report can be used many times.</p>
<p>While navigating to community i found very interesting and useful information regarding dynamic Filter in Reports.I thought that Dynamic Filters inside Salesforce is not possible but <strong>It is Possible</strong>.<span id="more-3310"></span></p>
<p>Salesforce does not have any official documentation on this, but here how it works.</p>
<p>Lets have look in below image:</p>
<div id="attachment_3311" class="wp-caption aligncenter" style="width: 624px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/05/Dynamic-Filter-in-Reporting.png"><img class=" wp-image-3311 " alt="Dynamic Filter in Reporting" src="http://shivasoft.in/blog/wp-content/uploads/2013/05/Dynamic-Filter-in-Reporting.png" width="614" height="415" /></a><p class="wp-caption-text">Dynamic Filter in Reporting</p></div>
<p>Above report have three Filters. First Filter will be considered as &#8220;pv0&#8243;, second filter will be considered as &#8220;pv1&#8243; and so on.</p>
<p>In URL, we can provide parameter for Pv0, Pv1 like in above image.</p>
<p>Now, we can create a formula field to create a dynamic link which will open report. Something like</p>
<blockquote><p>https://ap1.salesforce.com/{!ReportId}?pv0={!MergeField0}&amp;pv1={!MergeField1}</p></blockquote>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/very-useful-tips-and-tricks-of-the-apex-salesforce-interview-questions-part-4/' rel='bookmark' title='Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex'>Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/dynamic-approval-process-based-on-the-apex-and-trigger/' rel='bookmark' title='Dynamic Approval Process in Salesforce based on the Apex and Trigger'>Dynamic Approval Process in Salesforce based on the Apex and Trigger</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/where-are-the-reports-for-my-custom-object-with-related-objects-in-salesforce/' rel='bookmark' title='Where are the reports for my custom object with related objects in salesforce?'>Where are the reports for my custom object with related objects in salesforce?</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/dynamic-report-filters-in-salesforce/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create Simple Mass Delete Button for ListView using Javascript</title>
		<link>http://shivasoft.in/blog/salesforce/create-simple-mass-delete-button-for-listview-using-javascript/</link>
		<comments>http://shivasoft.in/blog/salesforce/create-simple-mass-delete-button-for-listview-using-javascript/#comments</comments>
		<pubDate>Mon, 06 May 2013 15:31:05 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[ListView]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3299</guid>
		<description><![CDATA[In Many situation, I needed a Mass Delete Kind of button. Where, i can select records in ListView and simply click &#8220;Delete&#8221; button. In this example, we will create a simple List View button and add on &#8220;Search Layout&#8221; of that object. So, create a new Custom Button with following property: Display Type :  List Button [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/webtech/salesforce-tutorial-create-simple-ajax-based-visualforce-page/' rel='bookmark' title='Salesforce Tutorial &#8211; Create Simple Ajax based Visualforce page'>Salesforce Tutorial &#8211; Create Simple Ajax based Visualforce page</a></li>
<li><a href='http://shivasoft.in/blog/webtech/web/javascript-error-%e2%80%98expected-identifier-string-or-number%e2%80%99-in-internet-explorer-ie/' rel='bookmark' title='JavaScript Error ‘expected identifier, string or number’ in Internet Explorer (IE)'>JavaScript Error ‘expected identifier, string or number’ in Internet Explorer (IE)</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/email-services-in-salesforce-with-simple-example/' rel='bookmark' title='Email Services in Salesforce with simple example'>Email Services in Salesforce with simple example</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>In Many situation, I needed a Mass Delete Kind of button. Where, i can select records in ListView and simply click &#8220;Delete&#8221; button.</p>
<p>In this example, we will create a simple List View button and add on &#8220;Search Layout&#8221; of that object.</p>
<div id="attachment_3301" class="wp-caption aligncenter" style="width: 604px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/05/Salesforce-Mass-Delete-Button-List-View.png"><img class="size-full wp-image-3301" alt="Salesforce Mass Delete Button - List View" src="http://shivasoft.in/blog/wp-content/uploads/2013/05/Salesforce-Mass-Delete-Button-List-View.png" width="594" height="211" /></a><p class="wp-caption-text">Salesforce Mass Delete Button &#8211; List View</p></div>
<p>So, create a new Custom Button with following property:</p>
<ol>
<li><strong>Display Type</strong> :  List Button</li>
<li><strong>Behavior</strong> : Execute JavaScript</li>
<li><strong>Content Source</strong> :  OnClick JavaScript</li>
</ol>
<p>and use below Source code:<span id="more-3299"></span></p>
<pre class="brush: java; highlight: [4]; title: ; notranslate">
{!REQUIRESCRIPT(&quot;/soap/ajax/21.0/connection.js&quot;)}

//Below ObjectType can be replaced by anyObject. I have used &quot;Test Name&quot;
var records = {!GETRECORDIDS($ObjectType.Test_Name__c)};

if (records[0] == null) {
    alert(&quot;Please select at least one record.&quot;)
} else {

    var opt = confirm(&quot;Are you sure you want to delete selected records ?&quot;);
    if (opt == true) {
        var errors = [];
        var result = sforce.connection.deleteIds(records);
        if (result &amp;&amp; result.length) {
            var numFailed = 0;
            var numSucceeded = 0;
            for (var i = 0; i &lt; result.length; i++) {                 var res = result[i];                 if (res &amp;&amp; res.success == 'true') {                     numSucceeded++;                 } else {                     var es = res.getArray(&quot;errors&quot;);                     if (es.length &gt; 0) {
                        errors.push(es[0].message);
                    }
                    numFailed++;
                }
            }
            if (numFailed &gt; 0) {
                alert(&quot;Failed: &quot; + numFailed + &quot;\nSucceeded: &quot; + numSucceeded + &quot; \n Due to: &quot; + errors.join(&quot;\n&quot;));
            } else {
                alert(&quot;Number of records deleted: &quot; + numSucceeded);
            }
        }
        window.location.reload();
    }
}
</pre>
<p>In above code, we only need to change line number 4 for Object Type.<br />
Once you are done with above button, add button in Search Layout&#8217;s List View as shown in below Image.</p>
<div id="attachment_3300" class="wp-caption aligncenter" style="width: 539px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/05/Salesforce-Search-Layout.png"><img class=" wp-image-3300 " alt="Salesforce Search Layout" src="http://shivasoft.in/blog/wp-content/uploads/2013/05/Salesforce-Search-Layout.png" width="529" height="193" /></a><p class="wp-caption-text">Salesforce Search Layout</p></div>
<p><a title="Salesforce Cookbook" href="https://ap1.salesforce.com/help/doc/en/links_useful_custom_buttons_mass_delete.htm" rel="nofollow">Code taken from Salesforce Cookbook</a></p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/webtech/salesforce-tutorial-create-simple-ajax-based-visualforce-page/' rel='bookmark' title='Salesforce Tutorial &#8211; Create Simple Ajax based Visualforce page'>Salesforce Tutorial &#8211; Create Simple Ajax based Visualforce page</a></li>
<li><a href='http://shivasoft.in/blog/webtech/web/javascript-error-%e2%80%98expected-identifier-string-or-number%e2%80%99-in-internet-explorer-ie/' rel='bookmark' title='JavaScript Error ‘expected identifier, string or number’ in Internet Explorer (IE)'>JavaScript Error ‘expected identifier, string or number’ in Internet Explorer (IE)</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/email-services-in-salesforce-with-simple-example/' rel='bookmark' title='Email Services in Salesforce with simple example'>Email Services in Salesforce with simple example</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/create-simple-mass-delete-button-for-listview-using-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extended Mail Merge Template</title>
		<link>http://shivasoft.in/blog/salesforce/extended-mail-merge-template/</link>
		<comments>http://shivasoft.in/blog/salesforce/extended-mail-merge-template/#comments</comments>
		<pubDate>Mon, 06 May 2013 09:03:28 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[XMM]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3287</guid>
		<description><![CDATA[In many cases, I have seen customer struggling with “Standard Mail Merge” functionality. I have suggested them to either use “Drawloop” or “Conga Composer” however these applications are paid. Before going ahead let’s see the drawbacks of “Standard Mail Merge”: It runs on Client side and needs ActiveX Control It needs Internet Explorer It does [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/step-by-step-salesforce-tutorial-%e2%80%93-creating-email-template-%e2%80%93-4-of-n/' rel='bookmark' title='Step by Step Salesforce Tutorial – Creating Email Template – 4 of 6'>Step by Step Salesforce Tutorial – Creating Email Template – 4 of 6</a></li>
<li><a href='http://shivasoft.in/blog/java/merge-pdf-in-salesforce-using-java-itextpdf-and-oauth-2/' rel='bookmark' title='Merge PDF in Salesforce Using Java, ITextPDF and OAuth 2'>Merge PDF in Salesforce Using Java, ITextPDF and OAuth 2</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-questions-%e2%80%93-part-2/' rel='bookmark' title='Salesforce Interview Questions – Part 2'>Salesforce Interview Questions – Part 2</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">In many cases, I have seen customer struggling with “Standard Mail Merge” functionality. I have suggested them to either use “<a title="Drawloop" href="https://appexchange.salesforce.com/listingDetail?listingId=a0N300000016Zn3EAE" rel="nofollow">Drawloop</a>” or “<a title="CongaMerge" href="https://appexchange.salesforce.com/listingDetail?listingId=a0N300000016b7FEAQ" rel="nofollow">Conga Composer</a>” however these applications are paid.</p>
<p><strong>Before going ahead let’s see the drawbacks of “Standard Mail Merge”:</strong></p>
<ol>
<li>It runs on Client side and needs ActiveX Control</li>
<li>It needs Internet Explorer</li>
<li>It does not work with Office 2010, it works only for Office 2003 and 2007</li>
<li>Windows 7 is not supported and causes unexpected error many times. It supports Windows XP and Windows Vista only</li>
</ol>
<p>The solutions to all above problem is “Extended Mail Merge (XMM)” template which is free and native Salesforce solution.</p>
<p><strong>Following are the advantages of “Extended Mail Merge (XMM)”:</strong></p>
<ol>
<li>It runs on server side and does not require installation of any ActiveX Control</li>
<li>It runs on almost al major browsers including firefox, Chrome</li>
<li>It supportes Office 2007 as well as Office 2010 (document must be saved in a 97-2003 DOC format)</li>
<li>We can save output into “Document” tab</li>
<li>XMM can send final word document in email itself</li>
</ol>
<p><strong>NOTE: </strong>Mail Merge &amp; Extended Mail Merge uses same templates: &#8220;Setup | Communications Templates | Mail Merge Templates&#8221;</p>
<p><strong>There are few limitations in XMM also like:</strong></p>
<ol>
<li>At a time, it can merge only 1000 records.</li>
<li>Template size cannot exceed 1MB of size.</li>
<li>It will access only those fields for which current user have access, it respects Field level security (FLS)</li>
</ol>
<p><strong>How to enable “Extended Mail Merge (XMM)” ?</strong><br />
We have to contact Salesforce to enable this feature in our Salesforce Organization.<span id="more-3287"></span></p>
<p><strong>How to activate “Extended Mail Merge (XMM)” , once it is enabled by Salesforce?</strong><br />
Navigate to “Setup | Customize | User Interface” and select checkbox “Activate Extended Mail Merge”. We can also select to save XMM result in Document tab as shown in below snap.</p>
<div id="attachment_3288" class="wp-caption aligncenter" style="width: 638px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/05/Insert-Field-in-Extended-Mail-Merge-Salesforce.png"><img class="size-full wp-image-3288" alt="Insert Field in Extended Mail Merge Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2013/05/Insert-Field-in-Extended-Mail-Merge-Salesforce.png" width="628" height="300" /></a><p class="wp-caption-text">Insert Field in Extended Mail Merge Salesforce</p></div>
<div id="attachment_3289" class="wp-caption aligncenter" style="width: 442px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/05/Activate-Extended-Mail-Merge-User-Interface-Salesforce.png"><img class="size-full wp-image-3289" alt="Activate Extended Mail Merge - User Interface - Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2013/05/Activate-Extended-Mail-Merge-User-Interface-Salesforce.png" width="432" height="140" /></a><p class="wp-caption-text">Activate Extended Mail Merge &#8211; User Interface &#8211; Salesforce</p></div>
<p>Before using XMM , we have to create template in Microsoft Word. So, lets see how to create template.</p>
<p>For this article, let&#8217;s say our template is going to be used by “Contact” object and content should be as simple as :</p>
<pre class="brush: bash; title: ; notranslate">
Hello «Contact_FirstName»,
Phone Number - «Contact_Phone»
Regards
Shivasoft
</pre>
<p>In above paragraph, “CONTACT_Name” needs to be replaced by actual contact name. For this, we need API name of that field from Salesforce which is “Name”. Now create above template in Microsoft word and place the cursor where we want value to be appeared and navigate to “Insert | Quick Parts | Fields”.</p>
<div id="attachment_3288" class="wp-caption aligncenter" style="width: 638px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/05/Insert-Field-in-Extended-Mail-Merge-Salesforce.png"><img class="size-full wp-image-3288" alt="Insert Field in Extended Mail Merge Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2013/05/Insert-Field-in-Extended-Mail-Merge-Salesforce.png" width="628" height="300" /></a><p class="wp-caption-text">Insert Field in Extended Mail Merge Salesforce</p></div>
<p>New window will appear, select MergeField and enter API Name as shown in below image.</p>
<p><span style="text-decoration: underline;"><strong>Note :</strong> </span>While entering API name of any field, It should be prefixed by Object name and Underscore  . For Example, API Name in Contact Should be referred as Contact_Name. (<strong>Object_FieldAPIName</strong>) .</p>
<div id="attachment_3290" class="wp-caption aligncenter" style="width: 638px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/05/Insert-Field-in-Template-Salesforce.png"><img class="size-full wp-image-3290" alt="Insert Field in Template - Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2013/05/Insert-Field-in-Template-Salesforce.png" width="628" height="327" /></a><p class="wp-caption-text">Insert Field in Template &#8211; Salesforce</p></div>
<p>Now, go to Salesforce and navigate to “Set up | Communication Templates | Mail Merge Templates” and Upload recently created template.</p>
<p>Now to check that whether template is working or not. Navigate to Contact Tab and select “Mass Mail Merge” link present at bottom.</p>
<p><strong>Step 1:</strong><br />
Select List of Contacts for which you want to run “Mail Merge” template.</p>
<p><strong>Step 2:</strong><br />
Select Document Types to Generate. The Supported document types are documents, envelopes and labels. You can also select if you want to Log an activity that mail merge documents were generated for those records.</p>
<p><strong>Step 3:</strong><br />
Select Document templates to be used by “Mass Mail Merge” which we have created in this article. In this step we can select that all documents to be generated in single word document or we have to create separate word files.<br />
Once we click on finish button, we will get messag that email will be sent to email id once document is generated.</p>
<div id="attachment_3291" class="wp-caption aligncenter" style="width: 638px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/05/Extended-Mail-Merge-XMM-Confirmation-Window.png"><img class="size-full wp-image-3291" alt="Extended Mail Merge - XMM Confirmation Window" src="http://shivasoft.in/blog/wp-content/uploads/2013/05/Extended-Mail-Merge-XMM-Confirmation-Window.png" width="628" height="163" /></a><p class="wp-caption-text">Extended Mail Merge &#8211; XMM Confirmation Window</p></div>
<p><strong>Point to Remember:</strong></p>
<ul>
<li>Prefix the field label with the type of record. For example, “Account_MarketCap” for an account field named MarketCap.</li>
<li>Convert all spaces to underscores. For example, a custom opportunity field named “Product ID” becomes “Opportunity_Product_ID”.</li>
</ul>
<p><strong>References:</strong><br />
<a title="Mail Merge Documentation" href="https://help.salesforce.com/apex/HTViewSolution?urlname=Extended-Mail-Merge-features-1327108643069&amp;language=en_US" rel="nofollow">Mail Merge Documentation</a></p>
<p><a title="Using Merge Fields" href="https://na1.salesforce.com/help/doc/en/salesforce_mailmerge_upload_guidelines.pdf" rel="nofollow">Read more about using Merge Fields in Mail Merge here</a></p>
<p><iframe src="http://www.youtube.com/embed/cMPRw_WjviQ" height="315" width="560" allowfullscreen="" frameborder="0"></iframe></p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/step-by-step-salesforce-tutorial-%e2%80%93-creating-email-template-%e2%80%93-4-of-n/' rel='bookmark' title='Step by Step Salesforce Tutorial – Creating Email Template – 4 of 6'>Step by Step Salesforce Tutorial – Creating Email Template – 4 of 6</a></li>
<li><a href='http://shivasoft.in/blog/java/merge-pdf-in-salesforce-using-java-itextpdf-and-oauth-2/' rel='bookmark' title='Merge PDF in Salesforce Using Java, ITextPDF and OAuth 2'>Merge PDF in Salesforce Using Java, ITextPDF and OAuth 2</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-questions-%e2%80%93-part-2/' rel='bookmark' title='Salesforce Interview Questions – Part 2'>Salesforce Interview Questions – Part 2</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/extended-mail-merge-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using FieldSet with Visualforce and Apex</title>
		<link>http://shivasoft.in/blog/salesforce/visualforce/using-fieldset-with-visualforce-and-apex/</link>
		<comments>http://shivasoft.in/blog/salesforce/visualforce/using-fieldset-with-visualforce-and-apex/#comments</comments>
		<pubDate>Fri, 03 May 2013 13:44:58 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Visualforce]]></category>
		<category><![CDATA[Salesforce]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3278</guid>
		<description><![CDATA[One of the disadvantages comes up with Custom Page or Overriding New or Edit button with Visualforce page is its “Maintenance”, if New Filed is Added or needed to remove field we have to modify our code every time. However, Thanks to Salesforce that we have “Field Set”. With the Help of “Dynamic Visualforce Binding” [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/very-useful-tips-and-tricks-of-the-apex-salesforce-interview-questions-part-4/' rel='bookmark' title='Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex'>Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-apex-code-talk-important-questions-and-answers/' rel='bookmark' title='Salesforce Apex Code talk &#8211; Important Questions and Answers'>Salesforce Apex Code talk &#8211; Important Questions and Answers</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/json-output-in-visualforce/' rel='bookmark' title='JSON output in Visualforce'>JSON output in Visualforce</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>One of the disadvantages comes up with Custom Page or Overriding New or Edit button with Visualforce page is its “Maintenance”, if New Filed is Added or needed to remove field we have to modify our code every time.</p>
<p>However, Thanks to Salesforce that we have “<a title="Salesforce Field Set Documentation" href="http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#CSHID=pages_dynamic_vf_field_sets.htm|StartTopic=Content%2Fpages_dynamic_vf_field_sets.htm|SkinName=webhelp" rel="nofollow">Field Set</a>”.</p>
<p>With the Help of “Dynamic Visualforce Binding” and “Field Set” we can create effective Visualforce pages with ability to change Fields and its Sequence any time without modifying any code.</p>
<p>Let’s start with using Field set in Salesforce.</p>
<p><strong>Step 1: Creating Field Set</strong></p>
<p>First we need to create a field set. For this article, I am using custom object named “Question__c”.</p>
<p>We have to navigate to setting page of that object and then “Field Sets”. Create a new Field Set and add required field in Sequence as displayed in below image.</p>
<div id="attachment_3281" class="wp-caption aligncenter" style="width: 645px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/05/Create-Field-Set-in-Salesforce.png"><img class=" wp-image-3281 " alt="Create Field Set in Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2013/05/Create-Field-Set-in-Salesforce.png" width="635" height="263" /></a><p class="wp-caption-text">Create Field Set in Salesforce</p></div>
<p>Assume that field set name is “Add_Question”.<span id="more-3278"></span></p>
<p><strong>Step 2: Use Field Set inside Visualforce using Dynamic Binding</strong></p>
<p>Now, we are ready to use Field Set inside our Visualforce code. Following is code snippet of one of my Visual force page :</p>
<pre class="brush: xml; title: ; notranslate">
&lt;apex:repeat value=&quot;{!$ObjectType.Question__c.FieldSets.Add_Question}&quot;  var=&quot;f&quot;&gt;
			&lt;span  class=&quot;label&quot; style=&quot;align:right&quot;&gt; {!f.label}  &lt;/span&gt;
			&lt;apex:inputField value=&quot;{!que[f.fieldPath]}&quot; required=&quot;{!OR(f.required, f.dbrequired)}&quot;/&gt;
&lt;/apex:repeat&gt;
</pre>
<p>As you can see in above code snippet, Field set can be accessed inside Visualforce like “{!$ObjectType.Question__c.FieldSets.Add_Question}”.</p>
<p>To get label of field, simply we can use “{!f.label}”.</p>
<p>To check, if field is required we can use “required” or “dbrequired” property.</p>
<p>We are getting fields dynamically by notation “{!que[f.fieldPath]}”. Where “que” is object defined inside Apex class.</p>
<p><strong>Step 3 : Using Dynamic SOQL to get value – Optional</strong></p>
<p>This step is Optional. If your VF page is working in “New or Insert” mode then there is no need to populate values inside variable “que”. However what if VF page works in Edit mode? How do we know, which fields are accessed? In this case we have to use Dynamic SOQL.</p>
<p>First we will get list of all fields used inside Field set using below method:</p>
<pre class="brush: java; title: ; notranslate">
/**
*
* Get Fields from Field Set. It is not used on VF, It used to create Dynamic SOQL for Edit mode.
*/
public List getFields() {
	return SObjectType.Question__c.FieldSets.Add_Question.getFields();
}
</pre>
<p>Now, we will try to create Dynamic SOQL which will get record on basis of Id and will be assigned to object &#8220;que&#8221;.</p>
<pre class="brush: java; title: ; notranslate">
/**
* On basis of field set, Create Dynamic SOQL
*/
private Question__c getQuestion_DynamiCSOQL(String quesId) {
	try
	{
		String query = 'SELECT ';
		for(Schema.FieldSetMember f : this.getFields()) {
			query += f.getFieldPath() + ', ';
		}
		query += 'Id, Name FROM Question__c WHERE Id = \''+quesId+'\'';
		return Database.query(query);
	}
	catch(Exception e)
	{
		Utility.addError('There is error while Fetching existing Question using Dynamic SOQL in Field Set. Error Detail - '+e.getMessage()); //This is Utility Method to display error message on VF Page
	}
	return null;
}
</pre>
<p>I hope, this article will help you. However, there are cases when you need to access Field Set even though Object name and Field Set name will be supplied dynamically.</p>
<p><strong>Get Fieldset Fields in Apex dynamically when Object Name and FieldSet name is supplied at runtime</strong></p>
<pre class="brush: java; title: ; notranslate">
public static List readFieldSet(String fieldSetName, String ObjectName)
{
    Map&lt;String, Schema.SObjectType&gt; GlobalDescribeMap = Schema.getGlobalDescribe();
    Schema.SObjectType SObjectTypeObj = GlobalDescribeMap.get(ObjectName);
    Schema.DescribeSObjectResult DescribeSObjectResultObj = SObjectTypeObj.getDescribe();

    Schema.FieldSet fieldSetObj = DescribeSObjectResultObj.FieldSets.getMap().get(fieldSetName);
    return fieldSetObj.getFields();
}
</pre>
<p>We can test above code in Developer Console as below:</p>
<pre class="brush: java; title: ; notranslate">
 List fieldSetMemberList =  Util.readFieldSet('Account_FieldSet','Account');
for(Schema.FieldSetMember fieldSetMemberObj : fieldSetMemberList)
{
    system.debug('API Name ====&gt;' + fieldSetMemberObj.getFieldPath()); //api name
    system.debug('Label ====&gt;' + fieldSetMemberObj.getLabel());
    system.debug('Required ====&gt;' + fieldSetMemberObj.getRequired());
    system.debug('DbRequired ====&gt;' + fieldSetMemberObj.getDbRequired());
    system.debug('Type ====&gt;' + fieldSetMemberObj.getType());
}
</pre>
<p><a title="Fieldset Documentation" href="http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#CSHID=pages_dynamic_vf_field_sets.htm|StartTopic=Content%2Fpages_dynamic_vf_field_sets.htm|SkinName=webhelp" rel="nofollow">You can read Apex Documentation regarding FieldSet here</a></p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/very-useful-tips-and-tricks-of-the-apex-salesforce-interview-questions-part-4/' rel='bookmark' title='Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex'>Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-apex-code-talk-important-questions-and-answers/' rel='bookmark' title='Salesforce Apex Code talk &#8211; Important Questions and Answers'>Salesforce Apex Code talk &#8211; Important Questions and Answers</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/json-output-in-visualforce/' rel='bookmark' title='JSON output in Visualforce'>JSON output in Visualforce</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/visualforce/using-fieldset-with-visualforce-and-apex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Edit Static Resource inside Force.com IDE Itself</title>
		<link>http://shivasoft.in/blog/salesforce/edit-static-resource-inside-force-com-ide-itself/</link>
		<comments>http://shivasoft.in/blog/salesforce/edit-static-resource-inside-force-com-ide-itself/#comments</comments>
		<pubDate>Sun, 03 Mar 2013 10:28:12 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Eclipse]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3225</guid>
		<description><![CDATA[This tutorial is regarding editing of static resources inside eclipse itself. Normally if we want to edit any file inside zip, first we have to extract and edit the file, zip it again and reload into static resource. To save this round trips and time consuming process I found one very useful eclipse plugin called [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/install-force-com-ide-in-eclipse-salesforce-com/' rel='bookmark' title='Install Force.com IDE in Eclipse &#8211; Salesforce.com'>Install Force.com IDE in Eclipse &#8211; Salesforce.com</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/eclipse-error-unable-to-refresh-from-server-in-force-com/' rel='bookmark' title='Eclipse Error &#8211; Unable to refresh from server in Force.com'>Eclipse Error &#8211; Unable to refresh from server in Force.com</a></li>
<li><a href='http://shivasoft.in/blog/others/tips/uninstall-plugin-from-eclipse/' rel='bookmark' title='Uninstall plugin from Eclipse'>Uninstall plugin from Eclipse</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">This tutorial is regarding editing of static resources inside eclipse itself. Normally if we want to edit any file inside zip, first we have to extract and edit the file, zip it again and reload into static resource. To save this round trips and time consuming process I found one very useful eclipse plugin called as “<strong>Eclipse Zip Editor</strong>”. Although it’s very small tweak however it will save your lot of time and unnecessary trip to Salesforce and Zip tool.</p>
<p style="text-align: justify;">
You can download this editor from location &#8220;<a title="Salesforce Zip Editor" href="http://sourceforge.net/projects/zipeditor/" rel="nofollow">http://sourceforge.net/projects/zipeditor/</a>&#8220;</p>
<div id="attachment_3226" class="wp-caption aligncenter" style="width: 638px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/03/Static-Resource-in-Eclipse-Before-Plugin.png"><img class="size-full wp-image-3226" alt="Static Resource in Eclipse Before Plugin" src="http://shivasoft.in/blog/wp-content/uploads/2013/03/Static-Resource-in-Eclipse-Before-Plugin.png" width="628" height="428" /></a><p class="wp-caption-text">Static Resource in Eclipse Before Plugin</p></div>
<p><span id="more-3225"></span>After installation of the plugin, right click on resource and select “<strong>open with</strong>” and then select “<strong>Zip Editor</strong>” from available options.</p>
<div id="attachment_3227" class="wp-caption aligncenter" style="width: 376px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/03/Eclipse-Force.com-Select-Editor-for-Static-Resource.png"><img class="size-full wp-image-3227" alt="Eclipse Force.com Select Editor for Static Resource" src="http://shivasoft.in/blog/wp-content/uploads/2013/03/Eclipse-Force.com-Select-Editor-for-Static-Resource.png" width="366" height="466" /></a><p class="wp-caption-text">Eclipse Force.com Select Editor for Static Resource</p></div>
<div id="attachment_3228" class="wp-caption aligncenter" style="width: 592px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/03/Static-Resource-in-Eclipse-After-Plugin.png"><img class="size-full wp-image-3228" alt="Static Resource in Eclipse After Plugin" src="http://shivasoft.in/blog/wp-content/uploads/2013/03/Static-Resource-in-Eclipse-After-Plugin.png" width="582" height="208" /></a><p class="wp-caption-text">Static Resource in Eclipse After Plugin</p></div>
<p>As you can see in above screen that within eclipse itself you can now edit and Navigate Static resource.</p>
<p>There is also very good article from Joseph at <a href="http://mavens.force.com/conversation/static-resource-editing-in-eclipse" rel="nofollow">http://mavens.force.com/conversation/static-resource-editing-in-eclipse</a></p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/install-force-com-ide-in-eclipse-salesforce-com/' rel='bookmark' title='Install Force.com IDE in Eclipse &#8211; Salesforce.com'>Install Force.com IDE in Eclipse &#8211; Salesforce.com</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/eclipse-error-unable-to-refresh-from-server-in-force-com/' rel='bookmark' title='Eclipse Error &#8211; Unable to refresh from server in Force.com'>Eclipse Error &#8211; Unable to refresh from server in Force.com</a></li>
<li><a href='http://shivasoft.in/blog/others/tips/uninstall-plugin-from-eclipse/' rel='bookmark' title='Uninstall plugin from Eclipse'>Uninstall plugin from Eclipse</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/edit-static-resource-inside-force-com-ide-itself/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating First Application in Heroku using Eclipse</title>
		<link>http://shivasoft.in/blog/java/creating-first-application-in-heroku-using-eclipse/</link>
		<comments>http://shivasoft.in/blog/java/creating-first-application-in-heroku-using-eclipse/#comments</comments>
		<pubDate>Sun, 03 Mar 2013 07:48:40 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[JAVA]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[E-Git]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Heroku]]></category>
		<category><![CDATA[Jetty]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3231</guid>
		<description><![CDATA[Hello Readers, in this article we will see step by step procedure to deploy your first (Hello World) program in Heroku. There are two ways, first going through series of Commands of &#8220;Heroku&#8221; and &#8220;GIT&#8221; and other simple and smart way is to use Eclipse Capability with Heroku. To make things easier we will go [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/authenticate-git-using-ssh-protocol-with-eclipse-and-egit-salesforce/' rel='bookmark' title='Authenticate Git using SSH protocol with Eclipse and Egit &#8211; Salesforce'>Authenticate Git using SSH protocol with Eclipse and Egit &#8211; Salesforce</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/' rel='bookmark' title='Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control'>Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/install-force-com-ide-in-eclipse-salesforce-com/' rel='bookmark' title='Install Force.com IDE in Eclipse &#8211; Salesforce.com'>Install Force.com IDE in Eclipse &#8211; Salesforce.com</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Hello Readers, in this article we will see step by step procedure to deploy your first (Hello World) program in Heroku. There are two ways, first going through series of Commands of &#8220;Heroku&#8221; and &#8220;GIT&#8221; and other simple and smart way is to use Eclipse Capability with Heroku. To make things easier we will go by second method.</p>
<p><strong>Prerequisites:</strong></p>
<ul>
<li>Heroku Account, you can sign up here &#8211; <a title="Create Heroku Account" href="https://api.heroku.com/signup/devcenter" rel="nofollow">https://api.heroku.com/signup/devcenter</a></li>
<li>Eclipse 3.7 or Higher</li>
<li>E-Git Plugin , more information on set up of E-Git &#8211; <a title="Egit and Git Tutorial by ShivaSoft" href="http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/">http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/</a></li>
</ul>
<p><strong>Installation and Set up:</strong><br />
First we will need to Install Heroku Plugin in Eclipse. To install it, Navigate to <strong>“Help | Install New Software”</strong> and click on <strong>“Add”</strong> button.</p>
<p>Give any name in website like “Heroku Plugin” and enter this URL in Location <a title="Install Heroku Plugin" href="https://eclipse-plugin.herokuapp.com/install" rel="nofollow">https://eclipse-plugin.herokuapp.com/install</a> and click on “Ok” and Finish Installation. It will install the Heroku Plugin required to start your first Plugin.</p>
<p>Next step is <strong>setting up your Credentials for Heroku :</strong></p>
<p style="text-align: justify;">Navigate to <strong>“Window | Preferences | Heroku”</strong>, Here either enter your UserName and Password of Heroku Account and click on “Login” or enter you API key, which you can find by logging into your Heroku Account.</p>
<div id="attachment_3234" class="wp-caption aligncenter" style="width: 588px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/03/Setting-up-Credentials-for-Heroku-in-Eclipse.png"><img class=" wp-image-3234 " alt="Setting up Credentials for Heroku in Eclipse" src="http://shivasoft.in/blog/wp-content/uploads/2013/03/Setting-up-Credentials-for-Heroku-in-Eclipse.png" width="578" height="469" /></a><p class="wp-caption-text">Setting up Credentials for Heroku in Eclipse</p></div>
<p><span id="more-3231"></span><br />
<strong>Creating SSH Key :</strong></p>
<p>Heroku uses Git to push and pull code from Heroku. For this you can use <a title="Egit Plugin" href="http://www.eclipse.org/egit" rel="nofollow">E-Git plugin</a> of Eclipse. You can also visit <a title="Egit Tutorial" href="http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/">this article for complete tutorial</a>. So, for communication between Heroku and Git we need SSH. Navigate to <strong>“Windows | Preferences |General | Network Connections | SSH2 ”</strong>. Navigate to “<strong>Key Management</strong>” tab and click on <strong>“Generate RSA Key”</strong>. After Generation of key click on <strong>“Save Private Key”</strong>.</p>
<div id="attachment_3236" class="wp-caption aligncenter" style="width: 588px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/03/Generate-SSH-Key-in-Eclipse-for-Heroku.png"><img class=" wp-image-3236 " alt="Generate SSH Key in Eclipse for Heroku" src="http://shivasoft.in/blog/wp-content/uploads/2013/03/Generate-SSH-Key-in-Eclipse-for-Heroku.png" width="578" height="470" /></a><p class="wp-caption-text">Generate SSH Key in Eclipse for Heroku</p></div>
<p>Now, after generation of RSA key Navigate to “Heroku” and click on <strong>“Load SSH Key”</strong> and select file which you have saved recently.</p>
<div id="attachment_3237" class="wp-caption aligncenter" style="width: 586px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/03/Load-SSH-Key-in-Heroku-using-Eclipse.png"><img class=" wp-image-3237 " alt="Load SSH Key in Heroku using Eclipse" src="http://shivasoft.in/blog/wp-content/uploads/2013/03/Load-SSH-Key-in-Heroku-using-Eclipse.png" width="576" height="471" /></a><p class="wp-caption-text">Load SSH Key in Heroku using Eclipse</p></div>
<p style="text-align: justify;">Now, till this we have done all the configurations. Start with creating our first “Hello World” program from Template using <a title="Jetty" href="http://jetty.codehaus.org/jetty/" rel="nofollow">Jetty</a>.<br />
Navigate to <strong>“New | Project | Heroku | Create Heroku App from Template”</strong> and click on Next.</p>
<div id="attachment_3239" class="wp-caption aligncenter" style="width: 532px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/03/Select-Application-template-from-new-Heroku-Project.png"><img class="size-full wp-image-3239" alt="Select Application template from new Heroku Project" src="http://shivasoft.in/blog/wp-content/uploads/2013/03/Select-Application-template-from-new-Heroku-Project.png" width="522" height="618" /></a><p class="wp-caption-text">Select Application template from new Heroku Project</p></div>
<p style="text-align: justify;">On Next screen select <strong>“Embedded Jetty-Servlet application”</strong> and click on Finish. After creation of sample project, open “Main.java” file and run it.</p>
<p style="text-align: justify;">Now open browser with URL <a title="Run Localhost application of Jetty" href="http://localhost:8080/">http://localhost:8080/</a> and you should able to see Jetty Page. If you are able to see the Jetty Startup page, means everything is good. Now navigate to <a title="Run local Jetty Application" href="http://localhost:8080/hello">http://localhost:8080/hello</a> , you will see text “Hello Heroku” just like below screen.</p>
<div id="attachment_3242" class="wp-caption aligncenter" style="width: 596px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/04/Getting-Started-with-Embedded-Jetty-in-Heroku.png"><img class=" wp-image-3242  " alt="Getting Started with Embedded Jetty in Heroku" src="http://shivasoft.in/blog/wp-content/uploads/2013/04/Getting-Started-with-Embedded-Jetty-in-Heroku.png" width="586" height="298" /></a><p class="wp-caption-text">Getting Started with Embedded Jetty in Heroku</p></div>
<p>You can make modifications in “HelloServlet.java” by replacing below line with some other Text.</p>
<pre class="brush: java; title: ; notranslate">&lt;br /&gt;out.write(&quot;Hello Heroku&quot;.getBytes());&lt;br /&gt;</pre>
<p><strong>Deploying Modifications to Heroku from Local System:</strong></p>
<p>Now, as we are done with making modifications in local code, commit the changes in Git by <strong>“Right Click on Project | Team | Commit”</strong>. You need to Enter Commit Message like this:</p>
<div id="attachment_3243" class="wp-caption aligncenter" style="width: 537px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/04/Commit-Changes-to-Git-Heroku.png"><img class=" wp-image-3243 " alt="Commit Changes to Git - Heroku" src="http://shivasoft.in/blog/wp-content/uploads/2013/04/Commit-Changes-to-Git-Heroku.png" width="527" height="502" /></a><p class="wp-caption-text">Commit Changes to Git &#8211; Heroku</p></div>
<p>After Committing the Changes, Navigate to <strong>“Right Click on Project | Team | Push to Upstream”</strong>.</p>
<div id="attachment_3244" class="wp-caption aligncenter" style="width: 574px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/04/Push-to-UpStream-in-Git-for-Heroku.png"><img class=" wp-image-3244 " alt="Push to UpStream in Git for Heroku" src="http://shivasoft.in/blog/wp-content/uploads/2013/04/Push-to-UpStream-in-Git-for-Heroku.png" width="564" height="588" /></a><p class="wp-caption-text">Push to UpStream in Git for Heroku</p></div>
<p>Now, if everything is good, Heroku will receive all you local Changes and build application again on its server.</p>
<div id="attachment_3245" class="wp-caption aligncenter" style="width: 540px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/04/Heroku-Build-Succeed.png"><img class=" wp-image-3245 " alt="Heroku Build Succeed" src="http://shivasoft.in/blog/wp-content/uploads/2013/04/Heroku-Build-Succeed.png" width="530" height="366" /></a><p class="wp-caption-text">Heroku Build Succeed</p></div>
<p style="text-align: justify;">Now you can run this application by logging into Heroku and make modifications that’s suits you like Salesforce Integration or any other.</p>
<p style="text-align: justify;"><a title="Official Heroku Tutorial and Documentation" href="https://devcenter.heroku.com/articles/getting-started-with-heroku-eclipse" rel="nofollow">You can also visit this official Heroku tutorial</a>, which explains in very detail about Heroku Deployment using Eclipse and other important Configurations.</p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/authenticate-git-using-ssh-protocol-with-eclipse-and-egit-salesforce/' rel='bookmark' title='Authenticate Git using SSH protocol with Eclipse and Egit &#8211; Salesforce'>Authenticate Git using SSH protocol with Eclipse and Egit &#8211; Salesforce</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/' rel='bookmark' title='Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control'>Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/install-force-com-ide-in-eclipse-salesforce-com/' rel='bookmark' title='Install Force.com IDE in Eclipse &#8211; Salesforce.com'>Install Force.com IDE in Eclipse &#8211; Salesforce.com</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/java/creating-first-application-in-heroku-using-eclipse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Salesforce Interview Question – Part 14</title>
		<link>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-14/</link>
		<comments>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-14/#comments</comments>
		<pubDate>Thu, 28 Feb 2013 14:15:59 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Interview Question]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3185</guid>
		<description><![CDATA[131. What will happen if you try to update record in After Trigger Context? Ans : You will get an error saying &#8220;record is Read only&#8221;. 132. Let&#8217;s say we have to update the same record in After Trigger context. Is there any way or workaround? Ans : If we create a new instance of [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-questions-part-11/' rel='bookmark' title='Salesforce Interview Questions – Part 11'>Salesforce Interview Questions – Part 11</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[
<!-- iframe plugin v.2.7 wordpress.org/plugins/iframe/ -->
<iframe src="http://shivasoft.in/blog/SFDCInterviewList.php" height="100px" width="100%" scrolling="no" class="iframe-class" frameborder="0"></iframe>
<p><strong>131. What will happen if you try to update record in After Trigger Context?</strong><br />
<strong>Ans :</strong> You will get an error saying &#8220;record is Read only&#8221;.</p>
<hr />
<p><strong>132. Let&#8217;s say we have to update the same record in After Trigger context. Is there any way or workaround?</strong><br />
<strong> Ans :</strong> If we create a new instance of an SObject in the Apex Trigger in memory using the Id of the newly created record as provided in the After Trigger context, we can perform an Update DML statement and not get a read only error. This is because in Apex, the SObject is seen as a new reference (even though the records have the same SFDC ID) and therefore is eligible for DML operations. The below snippet of code illustrated this working and not working.</p>
<pre class="brush: java; title: ; notranslate">
List&lt;Contact&gt; originals = new List&lt;Contact&gt;();
if(mirrorResultMap.values().size() &gt; 0)
{
	for(Contact origContact : contactRecs.values())
	{
		Contact mirrorContact = mirrorResultMap.get(origContact.Id);
		//origContact.Linked_Contact__c = mirrorContact.Id; //Link the Original Record tot he Mirror Record WILL FAIL
		Contact origContactUpdate = new Contact(Id=origContact.Id, Linked_Contact__c = mirrorContact.Id); //This will WORK
		originals.add(origContactUpdate);
	}
	//update contactRecs.values(); //Update the Records -&gt; THIS WILL FAIL AS ITS ORIGINAL RECORDS IN MEMORY
	update originals;
}
</pre>
<p>Credit goes to <a title="Trigger" href="http://corycowgill.blogspot.com/2013/02/creating-mirror-relationship-records-in.html" rel="nofollow">Cory Cowgill for this Blog Entry</a>.</p>
<hr />
<p><strong>133 . When loading data into date fields such as Opportunity Close Date using the Data Loader, the date displayed in the application is sometimes one day earlier than the date in the file. What may be the reason and solution ?</strong><br />
<strong> Ans :</strong><br />
The reason for this is that fields such as Close Date are actually date/time fields. When a date is loaded without specifying the time, the time is defaulted to 00:00 &#8211; midnight. When another user is in a time zone which is behind the current user&#8217;s time zone, the date will show on the previous day. For example:</p>
<p>20 August 2008 00:00 in Paris is 19 August 2008 23:00 in London</p>
<p>Similar issues can arise when daylight savings time begins or ends.</p>
<p>Two simple solutions to this are:<br />
1) Specify a time as well as a date when loading dates using the Data Loader.<br />
or<br />
2) Switch your PC&#8217;s time zone to Hawaiian time <strong>before</strong> starting up the Data Loader.<span id="more-3185"></span></p>
<hr />
<p><strong>134 : System.debug() statements are included against script count?</strong><br />
<strong> Ans :</strong> Any statement ending with semi-colon will be included against script count. <a title="System.debug" href=" http://www.tgerm.com/2010/02/apex-script-statements-reduction-tips.html" rel="nofollow">There is very good article by Abhinav explaining this here.</a></p>
<hr />
<p><strong>135 : While trying to access javascript code from some CDN like Google, we get error something like &#8220;attempt to run uG request&#8221;. How to resolve it ?</strong><br />
<strong> Ans :</strong> While providing URL, do not specify the protocol. Use like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script type='text/javascript' src= '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'&gt;&lt;/script&gt;
</pre>
<hr />
<p><strong>136 : Explain ActionFunction, ActionSupport and ActionPoller in Visualforce.</strong><br />
<strong> Ans:</strong></p>
<p><strong>apex:ActionFunction :</strong> This component helps to envoke AJAX request (Call Controllers method) directly from Javascript method. It must be child of apex:form. Read here &#8211; www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionFunction.htm</p>
<p><strong>apex:ActionSupport :</strong> This component adds Ajax request to any other Visualforce component. Example : Commandlink button has inbuilt AJAX functionality however few components like OutputPanel does not have inbuilt AJAX capabilities. So with the help of this component, we can enable AJAX. <a title="Read More" href="www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionSupport.htm" rel="nofollow">Read more here.</a></p>
<p><strong>apex:ActionPoller :</strong> This is timer component which can send AJAX request on pre-defined interval. Minimum interval is 5 sec and default is 60 sec.</p>
<hr />
<p><strong>137 : In how many ways you can invoke Controllers / Controller Extensions method from VF?</strong><br />
<strong> Ans :</strong> Javascript Remoting, ActionFunction, ActionSupport, ActionPoller.</p>
<hr />
<p><strong>138 : What is the use of apex:detail component ?</strong><br />
<strong> Ans :</strong> With the help of this Visualforce component, we can diretly get complete behavior of page layout defined for logged in users profile. There is no need to add fields, related lists explicitly. <a title="Salesforce Documentation" href="www.salesforce.com/us/developer/docs/pages/Content/pages_compref_detail.htm" rel="nofollow">Read more here.</a></p>
<hr />
<p><strong>139 : What is the difference between &#8220;apex:dataTable&#8221; and &#8220;apex:pageBlockTable&#8221; components in Visualforce?</strong><br />
<strong> Ans :</strong> Both component is used to render data in tabular format. dataTable will render records in simple HTML table format whereas the &#8220;pageBlockTable&#8221; possess default look and feel of salesforce standard CSS and must be written inside &#8220;apex:pageBlock&#8221; componet.<br />
<a title="Salesforce Documentation" href="www.salesforce.com/us/developer/docs/pages/Content/pages_compref_pageBlockTable.htm" rel="nofollow">You can read more here.</a></p>
<hr />
<p><strong>140 : User have all the permissions to see the Dashboard and Source Folder still when he wants to see dashboard, its not visible. What might be the cause?</strong><br />
<strong> Ans :</strong> It is possible that Salesforce User license for Dashbaord running user is different than User wants to access Dashboard. Example &#8211; Running User license is &#8220;Salesforce&#8221; and user trying to access Dashboard is &#8220;Salesforce Plateform&#8221;.</p>

<!-- iframe plugin v.2.7 wordpress.org/plugins/iframe/ -->
<iframe src="http://shivasoft.in/blog/SFDCInterviewList.php" height="100px" width="100%" scrolling="no" class="iframe-class" frameborder="0"></iframe>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-questions-part-11/' rel='bookmark' title='Salesforce Interview Questions – Part 11'>Salesforce Interview Questions – Part 11</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-14/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Resolve Error &#8220;ArtifactTransferException: Could not transfer artifact&#8221; or &#8220;Failure to Transfer&#8221; in Maven</title>
		<link>http://shivasoft.in/blog/java/resolve-error-artifacttransferexception-could-not-transfer-artifact-or-failure-to-transfer-in-maven/</link>
		<comments>http://shivasoft.in/blog/java/resolve-error-artifacttransferexception-could-not-transfer-artifact-or-failure-to-transfer-in-maven/#comments</comments>
		<pubDate>Wed, 27 Feb 2013 10:46:28 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[JAVA]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Maven]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3213</guid>
		<description><![CDATA[This is very short tips to resolve the errors &#8220;ArtifactTransferException: Could not transfer artifact&#8221; that may occur in Maven project in Eclipse. Steps to resolve: Open folder by running this text (without Quotes) in Search Explorer of Window &#8220;%USERPROFILE%\.m2&#8243;. After running above command, &#8220;m2&#8243; folder of maven will open. Now search for file (without Quotes) &#8220;*.lastUpdated&#8221;. [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/java/resolve-missing-builder-error-for-eclipse-in-ccb-ormb/' rel='bookmark' title='Resolve Missing Builder error for eclipse in CC&amp;B (ORMB)'>Resolve Missing Builder error for eclipse in CC&#038;B (ORMB)</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/eclipse-error-unable-to-refresh-from-server-in-force-com/' rel='bookmark' title='Eclipse Error &#8211; Unable to refresh from server in Force.com'>Eclipse Error &#8211; Unable to refresh from server in Force.com</a></li>
<li><a href='http://shivasoft.in/blog/others/tips/locate-source-file-on-local-disc-in-eclipse-external-tool/' rel='bookmark' title='Locate source file on Local Disc in Eclipse &#8211; External tool'>Locate source file on Local Disc in Eclipse &#8211; External tool</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">This is very short tips to resolve the errors &#8220;ArtifactTransferException: Could not transfer artifact&#8221; that may occur in Maven project in Eclipse.</p>
<p style="text-align: justify;"><strong>Steps to resolve:</strong></p>
<ol style="text-align: justify;">
<li>Open folder by running this text (without Quotes) in Search Explorer of Window <strong>&#8220;%USERPROFILE%\.m2&#8243;</strong>.</li>
<li>After running above command, &#8220;m2&#8243; folder of maven will open. Now search for file (without Quotes) <strong>&#8220;*.lastUpdated&#8221;</strong>.</li>
<li>In this step, delete all the files found by running Step 2.</li>
<li>Now go to Eclipse project and select <strong>&#8220;Maven | Update Dependency&#8221;</strong> or <strong>&#8220;Maven | Update Project&#8221;</strong>.</li>
</ol>
<p style="text-align: justify;">By now, your issue will be resolved.</p>
<p style="text-align: justify;">Happy Coding !!!</p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/java/resolve-missing-builder-error-for-eclipse-in-ccb-ormb/' rel='bookmark' title='Resolve Missing Builder error for eclipse in CC&amp;B (ORMB)'>Resolve Missing Builder error for eclipse in CC&#038;B (ORMB)</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/eclipse-error-unable-to-refresh-from-server-in-force-com/' rel='bookmark' title='Eclipse Error &#8211; Unable to refresh from server in Force.com'>Eclipse Error &#8211; Unable to refresh from server in Force.com</a></li>
<li><a href='http://shivasoft.in/blog/others/tips/locate-source-file-on-local-disc-in-eclipse-external-tool/' rel='bookmark' title='Locate source file on Local Disc in Eclipse &#8211; External tool'>Locate source file on Local Disc in Eclipse &#8211; External tool</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/java/resolve-error-artifacttransferexception-could-not-transfer-artifact-or-failure-to-transfer-in-maven/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Import User Quotas for Collaborative forecasting</title>
		<link>http://shivasoft.in/blog/salesforce/import-user-quotas-for-collaborative-forecasting/</link>
		<comments>http://shivasoft.in/blog/salesforce/import-user-quotas-for-collaborative-forecasting/#comments</comments>
		<pubDate>Sun, 24 Feb 2013 03:45:27 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[DataLoader]]></category>
		<category><![CDATA[Forecast]]></category>
		<category><![CDATA[Quota]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3201</guid>
		<description><![CDATA[In Customizable Forecast, we can add the Quota for user by navigating to User Page and going to Quota related list However in Collaborative Forecasting aka Forecast 3 the only way is using Data Loader. 1. Log-in to the Data Loader and use the Insert function. 2. Click &#8220;Show all Salesforce objects and select &#8220;Forecasting [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/tutorial-of-command-line-dataloader-salesforce/' rel='bookmark' title='Tutorial of Command line DataLoader &#8211; Salesforce'>Tutorial of Command line DataLoader &#8211; Salesforce</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/backup-the-salesforce-data/' rel='bookmark' title='Schedule export backup of your Salesforce Data &#8211; Interview Question'>Schedule export backup of your Salesforce Data &#8211; Interview Question</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/change-year-range-in-datepicker-salesforce/' rel='bookmark' title='Change year range in Datepicker &#8211; Salesforce'>Change year range in Datepicker &#8211; Salesforce</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">In Customizable Forecast, we can add the Quota for user by navigating to User Page and going to Quota related list However in Collaborative Forecasting aka Forecast 3 the only way is using Data Loader.</p>
<p style="text-align: justify;">1. Log-in to the Data Loader and use the Insert function.<br />
2. Click &#8220;Show all Salesforce objects and select &#8220;Forecasting Quota (ForecastingQuota)&#8221;.<br />
<strong>Note:</strong> Only Data Loader version 25 and above can be used for importing Quotas in Collaborative Forecasting<br />
3. Select the import csv file and click Next (click OK in the pop-up that shows the number of records detected in the file).</p>
<p><strong>Note:</strong> The import csv file should contain the following columns:</p>
<ul>
<li>Currency ISO Code</li>
<li>Quota Amount</li>
<li>Owner ID</li>
<li>Quota Month (Start Date, In Date Format)</li>
</ul>
<div id="attachment_3203" class="wp-caption aligncenter" style="width: 577px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/02/Import-Quota-Using-DataLoader.png"><img class=" wp-image-3203 " alt="Import Quota Using DataLoader" src="http://shivasoft.in/blog/wp-content/uploads/2013/02/Import-Quota-Using-DataLoader.png" width="567" height="504" /></a><p class="wp-caption-text">Import Quota Using DataLoader for Forecast 3</p></div>
<p><span id="more-3201"></span></p>
<p>4. Click &#8220;Create or Edit a Map&#8221;.<br />
5. Click &#8220;Auto-Match Fields to Columns&#8221; or drag-and-drop to specify field mapping.<br />
6. Close the mapping window and click Next.<br />
7. Select a directory on where the error and success files will be saved.<br />
8. Click Finish.</p>
<p><strong>Note :</strong> While importing quota, on safer side, don&#8217;t select date as first of any month instead use 2nd or 3rd of month. Otherwise, it may happen that Quota of February will be inserted in month of January.</p>
<p>After Importing Quota, you can see in Forecast Tab for that User.</p>
<div id="attachment_3204" class="wp-caption aligncenter" style="width: 627px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/02/Forecast-In-Forcasting-3.png"><img class=" wp-image-3204  " alt="Forecast In Forcasting 3" src="http://shivasoft.in/blog/wp-content/uploads/2013/02/Forecast-In-Forcasting-3.png" width="617" height="260" /></a><p class="wp-caption-text">Forecast In Forcasting 3</p></div>
<p><a href="http://shivasoft.in/blog/wp-content/uploads/2013/02/List-Of-Currency.txt">You can see list of all supported currency by Salesforce here</a>. (After writing this article, it might be possible that supported currencies are updated, so its suggested to visit Salesforce documentation)</p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/tutorial-of-command-line-dataloader-salesforce/' rel='bookmark' title='Tutorial of Command line DataLoader &#8211; Salesforce'>Tutorial of Command line DataLoader &#8211; Salesforce</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/backup-the-salesforce-data/' rel='bookmark' title='Schedule export backup of your Salesforce Data &#8211; Interview Question'>Schedule export backup of your Salesforce Data &#8211; Interview Question</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/change-year-range-in-datepicker-salesforce/' rel='bookmark' title='Change year range in Datepicker &#8211; Salesforce'>Change year range in Datepicker &#8211; Salesforce</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/import-user-quotas-for-collaborative-forecasting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Debug Manage Package in Salesforce</title>
		<link>http://shivasoft.in/blog/salesforce/how-to-debug-manage-package-in-salesforce/</link>
		<comments>http://shivasoft.in/blog/salesforce/how-to-debug-manage-package-in-salesforce/#comments</comments>
		<pubDate>Wed, 06 Feb 2013 11:47:05 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Manage Package]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3192</guid>
		<description><![CDATA[Many times as a developer we need to debug the manage package for possible run time error. For example , while uploading contacts using Import wizard we get “Internal Server Error” and when we try to look into debug log there is no clear indications. However in my experience i have seen this kind of [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/getting-started-with-apex-debug-logs-in-salesforce/' rel='bookmark' title='Getting started with Apex debug logs in salesforce'>Getting started with Apex debug logs in salesforce</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/create-and-manage-assignment-rules-in-salesforce/' rel='bookmark' title='Create and manage Assignment rules in Salesforce'>Create and manage Assignment rules in Salesforce</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/difference-between-sandbox-and-developer-edition-in-salesforce/' rel='bookmark' title='Difference between Sandbox and developer edition in Salesforce'>Difference between Sandbox and developer edition in Salesforce</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Many times as a developer we need to debug the manage package for possible run time error. For example , while uploading contacts using Import wizard we get “Internal Server Error” and when we try to look into debug log there is no clear indications. However in my experience i have seen this kind of error may be because of manage package installed from AppExchange. As per “Intellectual property” rights , Salesforce cannot show the debug logs to everyone, However there is one way to achieve by System admins to some extent.</p>
<p style="text-align: justify;">For purpose of this article, i am using one manage package from AppExchange to show how it works.<span id="more-3192"></span></p>
<p style="text-align: justify;">Before performing any operation on installed package, just open the “<strong>Developer Console</strong>”. Once you are done, check the logs. You will see something like below screen shot and you will be able to debug at least till some level.</p>
<div id="attachment_3193" class="wp-caption aligncenter" style="width: 616px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/02/Debug-Manage-Package.png"><img class=" wp-image-3193 " alt="Debug Manage Package in Salesforce Using Developer Console" src="http://shivasoft.in/blog/wp-content/uploads/2013/02/Debug-Manage-Package.png" width="606" height="458" /></a><p class="wp-caption-text">Debug Manage Package in Salesforce Using Developer Console</p></div>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/getting-started-with-apex-debug-logs-in-salesforce/' rel='bookmark' title='Getting started with Apex debug logs in salesforce'>Getting started with Apex debug logs in salesforce</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/create-and-manage-assignment-rules-in-salesforce/' rel='bookmark' title='Create and manage Assignment rules in Salesforce'>Create and manage Assignment rules in Salesforce</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/difference-between-sandbox-and-developer-edition-in-salesforce/' rel='bookmark' title='Difference between Sandbox and developer edition in Salesforce'>Difference between Sandbox and developer edition in Salesforce</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/how-to-debug-manage-package-in-salesforce/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Salesforce Helptext like Custom Tooltip using JQuery</title>
		<link>http://shivasoft.in/blog/salesforce/salesforce-helptext-like-custom-tooltip-using-jquery/</link>
		<comments>http://shivasoft.in/blog/salesforce/salesforce-helptext-like-custom-tooltip-using-jquery/#comments</comments>
		<pubDate>Mon, 04 Feb 2013 01:24:50 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Visual]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3134</guid>
		<description><![CDATA[Welcome back Readers. This is my first blog entry for year 2013, i know its too late. However i can ensure that i have lots of unique post which will come this year. I am starting this year with very light post , mimic the help-text style of Salesforce. Download Salesforce Helptext like Tooltip using [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/gantt-chart-in-salesforce-using-jquery-and-json/' rel='bookmark' title='Gantt Chart in Salesforce using JQuery and JSON'>Gantt Chart in Salesforce using JQuery and JSON</a></li>
<li><a href='http://shivasoft.in/blog/webtech/web/highlight-current-field-using-jquery/' rel='bookmark' title='Highlight Current field using JQuery'>Highlight Current field using JQuery</a></li>
<li><a href='http://shivasoft.in/blog/others/tips/streaming-api-using-jquery-salesforce/' rel='bookmark' title='Streaming API Using JQuery &#8211; Salesforce'>Streaming API Using JQuery &#8211; Salesforce</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Welcome back Readers. This is my first blog entry for year 2013, i know its too late. However i can ensure that i have lots of unique post which will come this year. I am starting this year with very light post , mimic the help-text style of Salesforce.</p>
<div id="attachment_3179" class="wp-caption aligncenter" style="width: 314px"><a href="http://shivasoft.in/blog/wp-content/uploads/2013/02/Salesforce-like-Tooltip-using-JQuery.png"><img class="size-full wp-image-3179" alt="Salesforce like Helptext - Tooltip using JQuery" src="http://shivasoft.in/blog/wp-content/uploads/2013/02/Salesforce-like-Tooltip-using-JQuery.png" width="304" height="102" /></a><p class="wp-caption-text">Salesforce like Helptext &#8211; Tooltip using JQuery</p></div>
<p><a href="http://shivasoft.in/blog/wp-content/uploads/2013/02/Tooltip.zip">Download Salesforce Helptext like Tooltip using JQuery &#8211; Source Code</a></p>
<p>Most of the time when i override Visualforce page, customers many time demand for same Standard page layout.</p>
<p>apex:inputField and apex:outputField shows their help bubble (if applicable) when nested within a pageBlockSection component automatically.</p>
<p>If you want to provide your own text instead you can by utilizing the helpText attribute on pageBlockSectionItem. Also you can access the help text within an expression by using the respective $ObjectType global as such:<span id="more-3134"></span></p>
<pre class="brush: xml; title: ; notranslate">
$ObjectType.Account.Fields.myField__c.inlineHelpText
</pre>
<p>However, there are scenario when we cant use pageBlockSection component. So, i came up with my own helptext CSS and javascript. For this post i am using <a title="jQuery Documentation" href="http://jquery.com/" rel="nofollow">JQuery </a>and <a title="JQuery Tooltip Plugin" href="http://bassistance.de/jquery-plugins/" rel="nofollow">JQuery tooltip plugin</a>.</p>
<pre class="brush: xml; title: ; notranslate">

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=ISO-8859-1&quot; /&gt;
&lt;title&gt;Salesforce Helptext like Custom Tooltip using JQuery&lt;/title&gt;

&lt;link rel=&quot;stylesheet&quot; href=&quot;jquery.tooltip.css&quot; /&gt;
&lt;script src=&quot;http://code.jquery.com/jquery-1.8.2.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;http://jquery.bassistance.de/tooltip/jquery.tooltip.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
$Jtool = jQuery.noConflict();

$Jtool(
	function() {
		$spnEle = $Jtool('.spnCustomTooltip');
		$spnEle.find('img').tooltip({showURL: false});
		$spnEle.mouseover(function() {
			$Jtool(this).find('img').addClass('helpButtonOn_cust');
		});
		$spnEle.mouseleave(function() {
		  $Jtool(this).find('img').removeClass('helpButtonOn_cust');
		});
	}
);

&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;

&lt;div id=&quot;main&quot;&gt;
Sample
&lt;span class=&quot;spnCustomTooltip&quot;&gt;
		&lt;img src=&quot;s.gif&quot; class=&quot;helpButton_cust&quot; title='This is Sample Custom Tooltip / Helptext like Standard Salesforce Help Text'&gt;
		&lt;/span&gt;
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><a href="http://shivasoft.in/blog/wp-content/uploads/2013/02/Tooltip.zip">Download Salesforce Helptext like Tooltip using JQuery &#8211; Source Code</a></p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/gantt-chart-in-salesforce-using-jquery-and-json/' rel='bookmark' title='Gantt Chart in Salesforce using JQuery and JSON'>Gantt Chart in Salesforce using JQuery and JSON</a></li>
<li><a href='http://shivasoft.in/blog/webtech/web/highlight-current-field-using-jquery/' rel='bookmark' title='Highlight Current field using JQuery'>Highlight Current field using JQuery</a></li>
<li><a href='http://shivasoft.in/blog/others/tips/streaming-api-using-jquery-salesforce/' rel='bookmark' title='Streaming API Using JQuery &#8211; Salesforce'>Streaming API Using JQuery &#8211; Salesforce</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/salesforce-helptext-like-custom-tooltip-using-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Merge PDF in Salesforce Using Java, ITextPDF and OAuth 2</title>
		<link>http://shivasoft.in/blog/java/merge-pdf-in-salesforce-using-java-itextpdf-and-oauth-2/</link>
		<comments>http://shivasoft.in/blog/java/merge-pdf-in-salesforce-using-java-itextpdf-and-oauth-2/#comments</comments>
		<pubDate>Sun, 09 Dec 2012 16:33:39 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[JAVA]]></category>
		<category><![CDATA[Salesforce]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3150</guid>
		<description><![CDATA[Its long time, since i wrote any article because of my busy schedule However this time i came with advance one. In this article we are going to use the J2EE (Servlet) to Merge PDF attachment inside salesforce with the help of OAuth and ITextPDF jar file. The reason of writing this article is that [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/java/quartz-framework-tutorial-with-example-schedule-job-in-java/' rel='bookmark' title='Quartz framework tutorial with example &#8211; Schedule job in Java'>Quartz framework tutorial with example &#8211; Schedule job in Java</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/getting-started-with-apex-debug-logs-in-salesforce/' rel='bookmark' title='Getting started with Apex debug logs in salesforce'>Getting started with Apex debug logs in salesforce</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/getting-record-from-one-salesforce-organization-to-other/' rel='bookmark' title='Getting record from other Salesforce organization OR communication between multiple salesforce organization'>Getting record from other Salesforce organization OR communication between multiple salesforce organization</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Its long time, since i wrote any article because of my busy schedule However this time i came with advance one. In this article we are going to use the J2EE (Servlet) to Merge PDF attachment inside salesforce with the help of <strong>OAuth</strong> and <strong>ITextPDF</strong> jar file. The reason of writing this article is that there is no native support by Apex to merge two attachments in Salesforce. Either we have to go for AppExchange product like CongaMerg or Drawloop or we can write our own code in any other language like Java and C# and with the help of REST API we can save get and save attachment in Salesforce.</p>
<p style="text-align: justify;">First we will need to setup the OAuth permission so that our local J2EE application can interact with Salesforce. For this login to Salesforce account and Navigate to &#8220;Set up | App Set up | Develop | Remote Access&#8221; and enter the information. Be careful about the &#8220;Callback URL&#8221;. It must match in your code. After creating the &#8220;Remote Access&#8221;, note &#8220;Consumer Key&#8221; and &#8220;Consumer Secret&#8221; which will be needed in your code.</p>
<div id="attachment_3153" class="wp-caption aligncenter" style="width: 559px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/12/Create-Remote-Access-in-Salesforce.com_.png"><img class=" wp-image-3153 " title="Create Remote Access in Salesforce.com for OAuth 2" src="http://shivasoft.in/blog/wp-content/uploads/2012/12/Create-Remote-Access-in-Salesforce.com_.png" alt="Create Remote Access in Salesforce.com for OAuth 2" width="549" height="378" /></a><p class="wp-caption-text">Create Remote Access in Salesforce.com for OAuth 2</p></div>
<p><span id="more-3150"></span></p>
<div id="attachment_3154" class="wp-caption aligncenter" style="width: 573px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/12/Remote-Access-Consumer-key-and-Consumer-Secret-Salesforce.png"><img class=" wp-image-3154 " title="Get Consumer key and Consumer Secret in Salesforce using Remote Access " src="http://shivasoft.in/blog/wp-content/uploads/2012/12/Remote-Access-Consumer-key-and-Consumer-Secret-Salesforce.png" alt="Get Consumer key and Consumer Secret in Salesforce using Remote Access " width="563" height="344" /></a><p class="wp-caption-text">Get Consumer key and Consumer Secret in Salesforce using Remote Access</p></div>
<p>So, we will start with setting up the Log4j for our project. Copy below code in &#8220;log4j.properties&#8221; file. you will need Apache commons logging jar, which you can find in this article&#8217;s source code.</p>
<pre class="brush: bash; title: ; notranslate">
# A default log4j configuration for log4j users.
#
# To use this configuration, deploy it into your application's WEB-INF/classes
# directory.  You are also encouraged to edit it as you like.

# Configure the console as our one appender
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n

# tighten logging on the DataNucleus Categories
log4j.category.DataNucleus.JDO=WARN, A1
log4j.category.DataNucleus.Persistence=WARN, A1
log4j.category.DataNucleus.Cache=WARN, A1
log4j.category.DataNucleus.MetaData=WARN, A1
log4j.category.DataNucleus.General=WARN, A1
log4j.category.DataNucleus.Utility=WARN, A1
log4j.category.DataNucleus.Transaction=WARN, A1
log4j.category.DataNucleus.Datastore=WARN, A1
log4j.category.DataNucleus.ClassLoading=WARN, A1
log4j.category.DataNucleus.Plugin=WARN, A1
log4j.category.DataNucleus.ValueGeneration=WARN, A1
log4j.category.DataNucleus.Enhancer=WARN, A1
log4j.category.DataNucleus.SchemaTool=WARN, A1
</pre>
<p>Now, create a Servlet with name &#8220;StartServet&#8221; and following code:</p>
<pre class="brush: java; title: ; notranslate">
package com.sfdc.pdfmerge.sample;

import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONObject;
import org.json.JSONTokener;

/**
* Servlet implementation class TestOAuth
*/
public class StartServet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	/**
	 * @see HttpServlet#HttpServlet()
	 */
	public StartServet() {
		super();
		// TODO Auto-generated constructor stub
	}

	public static final String ACCESS_TOKEN = &quot;ACCESS_TOKEN&quot;;
	public static final String INSTANCE_URL = &quot;INSTANCE_URL&quot;;
	String oauthURL = &quot;&quot;;

	private static final Logger log = Logger.getLogger(StartServet.class.getName());

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String sfdcInstance = &quot;https://ap1.salesforce.com&quot;;

		String accessToken = (String) request.getSession().getAttribute(ACCESS_TOKEN);
		String code = request.getParameter(&quot;code&quot;);

		String consumerKey = &quot;3MVG9Y6d_Btp4xp7hZ1hn287sIMQ56.b_dOEBDrKHRbtwByFvFJz0A4ETmj_TbTuu4CsCkknL3ZgoWIzUTBnh&quot;;
		String consumerSecret = &quot;4972968186270851852&quot;;
		String redirectUri = &quot;https://localhost:8443/PDFMerge_J2EE/TestOAuth?isCallBack=1&quot;;

		oauthURL = sfdcInstance + &quot;/services/oauth2/authorize?response_type=code&amp;client_id=&quot; + consumerKey + &quot;&amp;redirect_uri=&quot;
				+ URLEncoder.encode(redirectUri, &quot;UTF-8&quot;);

		if (accessToken == null) {

			try {
				String isCallBack = request.getParameter(&quot;isCallBack&quot;);
					log.info(&quot;Starting OAuth&quot;);
					log.info(&quot;Is CallBack = &quot;+isCallBack);

					/**
					 * Initiate HTTP request to get the Authorization code
					 */
					DefaultHttpClient httpclient = new DefaultHttpClient();
					HttpPost httpPost = new HttpPost(oauthURL);
					HttpResponse response1 = httpclient.execute(httpPost);

					/**
					 * If HTTP status code is 302, means Salesforce trying to redirect to authorize the Local System
					 */
					if(response1.getStatusLine().getStatusCode() == 302 &amp;&amp; isCallBack == null)
					{
						httpclient.getConnectionManager().shutdown();
						log.info(&quot;Got 302 request from Salesforce so redirect it&quot;);
						response.sendRedirect(oauthURL);
						return;
					}
					else
					{
						log.info(&quot;Got Callback, Now get the Access Token&quot;);

						httpclient = new DefaultHttpClient();
						String tokenUrl = sfdcInstance + &quot;/services/oauth2/token&quot;;

						log.info(&quot;Code - &quot;+code);

						List qparams = new ArrayList();
						qparams.add(new BasicNameValuePair(&quot;code&quot;, code));
						qparams.add(new BasicNameValuePair(&quot;grant_type&quot;, &quot;authorization_code&quot;));
						qparams.add(new BasicNameValuePair(&quot;client_id&quot;, consumerKey));
						qparams.add(new BasicNameValuePair(&quot;client_secret&quot;, consumerSecret));
						qparams.add(new BasicNameValuePair(&quot;redirect_uri&quot;, redirectUri));

						HttpPost httpPost2 = new HttpPost(tokenUrl);
						httpPost2.setEntity(new UrlEncodedFormEntity(qparams));

						/**
						 * Always set this Header to explicitly to get Authrization code else following error will be raised
						 * unsupported_grant_type
						 */
						httpPost2.setHeader(&quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;);

						HttpResponse response2 = httpclient.execute(httpPost2);

						HttpEntity entity2 = response2.getEntity();
						System.out.println(entity2.getContent().toString());

						JSONObject authResponse = new JSONObject(new JSONTokener(new InputStreamReader(entity2.getContent())));
						System.out.println(authResponse.toString());
						accessToken = authResponse.getString(&quot;access_token&quot;);
						String instanceUrl = authResponse.getString(&quot;instance_url&quot;);

						request.getSession().setAttribute(ACCESS_TOKEN, accessToken);

						// We also get the instance URL from the OAuth response, so set it
						// in the session too
						request.getSession().setAttribute(INSTANCE_URL, instanceUrl);

						log.info(&quot;Response is : &quot;+authResponse);
						log.info(&quot;Got access token: &quot; + accessToken);

						/**
						In Below line of code, provide the attachment Ids to merge
						*/
						String pdfUrl = &quot;/PDFMerge_J2EE/pdfmerge?ids=00P900000038KTm&amp;parentId=00690000007GLNj&amp;mergedDocName=MergedDoc.pdf&quot;;
						response.sendRedirect(pdfUrl);
				}
			} catch (Exception e) {
					e.printStackTrace();
			} finally {
			}
		}
	}
	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
	 *      response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}
}
</pre>
<p style="text-align: justify;">Above servlet is starting/landing servlet and authenticate your application with Salesforce using Consumer Key and Consumer Secret. After Authentication using OAuth it will call another servlet to merge PDF and save back in Salesforce.</p>
<p style="text-align: justify;">Now, create a new Servlet which will actually read the attachment Ids from parameter and merge PDF using &#8220;iTextPDF&#8221; jar and save back again in Salesforce.</p>
<pre class="brush: java; title: ; notranslate">
package com.sfdc.pdfmerge.sample;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@SuppressWarnings(&quot;serial&quot;)
public class PDFMergeServlet extends HttpServlet {
	private String accessToken;
	private String instanceURL;

	private static final Logger log = Logger.getLogger(PDFMergeServlet.class.getName());

	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
	    log.severe(&quot;PDF Merge Servlet Called&quot;);
		String sfdcInstance = req.getParameter(&quot;instanceURL&quot;);

		accessToken = (String)req.getSession().getAttribute(StartServet.ACCESS_TOKEN);
		instanceURL = (String)req.getSession().getAttribute(StartServet.INSTANCE_URL);

		if (accessToken == null)
			return;

		String ids = req.getParameter(&quot;ids&quot;);
		String parentId = req.getParameter(&quot;parentId&quot;);
		String mergedDocName = req.getParameter(&quot;mergedDocName&quot;);

		List pdfs = new ArrayList();
		ByteArrayOutputStream o = null;
		if (accessToken != null &amp;&amp; ids != null &amp;&amp; parentId != null)
		{
			Salesforce sfdc = new Salesforce(instanceURL, accessToken);
			for (String id : ids.split(&quot;,&quot;))
			{
				pdfs.add(sfdc.getAttachment(id));
			}

			o = new ByteArrayOutputStream();
			MergePDF.concatPDFs(pdfs, o, false);

			sfdc.saveAttachment(parentId, mergedDocName, o, &quot;application/pdf&quot;);
		}

		try
		{
			if (o != null)
			{
				o.flush();
				o.close();
			}

			for (InputStream pdf : pdfs)
			{
				pdf.close();
			}
		}
		catch (Exception e){e.printStackTrace();}

		resp.setContentType(&quot;text/plain&quot;);
		resp.getWriter().println(&quot;Documents merged successfully&quot;);
	}

}
</pre>
<p>Create a utility Java Class &#8220;MergePDF&#8221; which is used in above servlet:</p>
<pre class="brush: java; title: ; notranslate">
package com.sfdc.pdfmerge.sample;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.itextpdf.text.Document;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfContentByte;
import com.itextpdf.text.pdf.PdfImportedPage;
import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.PdfWriter;

public class MergePDF {

    public static void concatPDFs(List&lt;InputStream&gt; streamOfPDFFiles,
            OutputStream outputStream, boolean paginate) {
 
        Document document = new Document();
        try {
            List&lt;InputStream&gt; pdfs = streamOfPDFFiles;
            List&lt;PdfReader&gt; readers = new ArrayList&lt;PdfReader&gt;();
            int totalPages = 0;
            Iterator&lt;InputStream&gt; iteratorPDFs = pdfs.iterator();
 
            // Create Readers for the pdfs.
            while (iteratorPDFs.hasNext()) {
                InputStream pdf = iteratorPDFs.next();
                PdfReader pdfReader = new PdfReader(pdf);
                readers.add(pdfReader);
                totalPages += pdfReader.getNumberOfPages();
            }
            // Create a writer for the outputstream
            PdfWriter writer = PdfWriter.getInstance(document, outputStream);
 
            document.open();
            BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA,
                    BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
            PdfContentByte cb = writer.getDirectContent(); // Holds the PDF
            // data
 
            PdfImportedPage page;
            int currentPageNumber = 0;
            int pageOfCurrentReaderPDF = 0;
            Iterator&lt;PdfReader&gt; iteratorPDFReader = readers.iterator();
 
            // Loop through the PDF files and add to the output.
            while (iteratorPDFReader.hasNext()) {
                PdfReader pdfReader = iteratorPDFReader.next();
 
                // Create a new page in the target for each source page.
                while (pageOfCurrentReaderPDF &lt; pdfReader.getNumberOfPages()) {
                    document.newPage();
                    pageOfCurrentReaderPDF++;
                    currentPageNumber++;
                    page = writer.getImportedPage(pdfReader,
                            pageOfCurrentReaderPDF);
                    cb.addTemplate(page, 0, 0);
 
                    // Code for pagination.
                    if (paginate) {
                        cb.beginText();
                        cb.setFontAndSize(bf, 9);
                        cb.showTextAligned(PdfContentByte.ALIGN_CENTER, &quot;&quot;
                                + currentPageNumber + &quot; of &quot; + totalPages, 520,
                                5, 0);
                        cb.endText();
                    }
                }
                pageOfCurrentReaderPDF = 0;
            }
            outputStream.flush();
            document.close();
            outputStream.close();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (document.isOpen())
                document.close();
            try {
                if (outputStream != null)
                    outputStream.close();
            } catch (IOException ioe) {
                ioe.printStackTrace();
            }
        }
    }	
}
</pre>
<p style="text-align: justify;">you will also need to map the Servlet URL in <strong>&#8220;web.xml</strong>&#8221; file, which you can find in source code attached.<br />
To run above application, enter this URL in address bar &#8220;<span style="text-decoration: underline;">https://localhost:8443/PDFMerge_J2EE/</span>&#8220;.</p>
<p style="text-align: justify;">After running above code, first time it will ask you to enter the username and password of salesforce account to allow access to your local application and then it will get all the attachments specified in code and after merging it will again attach it to parent id passed in parameter.</p>
<p style="text-align: justify;">jar files needed to run above code:</p>
<ul>
<li>commons-codec-1.1.jar</li>
<li>commons-codec-1.6.jar</li>
<li>commons-lang3-3.1.jar</li>
<li>commons-lang3-3.1-javadoc.jar</li>
<li>commons-lang3-3.1-sources.jar</li>
<li>commons-lang3-3.1-tests.jar</li>
<li>commons-logging-1.1.1.jar</li>
<li>fluent-hc-4.2.1.jar</li>
<li>httpclient-4.2.1.jar</li>
<li>httpclient-cache-4.2.1.jar</li>
<li>httpcore-4.2.1.jar</li>
<li>httpmime-4.2.1.jar</li>
<li>itextpdf-5.1.0.jar</li>
</ul>
<p>Also, <strong>please note that Salesforce OAuth can be run only on &#8220;https&#8221; protocol</strong>. Below articles are also recommended to read :</p>
<p><a title="Simple guide to setup SSL in Tomcat" href="http://shivasoft.in/blog/java/simple-guide-to-setup-ssl-in-tomcat/">Simple guide to setup SSL in Tomcat</a><br />
<a title="Digging Deeper into OAuth 2.0 on Force.com" href="http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com">Digging Deeper into OAuth 2.0 on Force.com</a></p>
<p><a href="http://shivasoft.in/blog/wp-content/uploads/2012/12/Generate-PDF-Using-ITextPDF-on-Salesforce.zip">Download Complete Source code for &#8211; Merging PDF Using ITextPDF and OAuth2 on Salesforce using Servlet</a></p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/java/quartz-framework-tutorial-with-example-schedule-job-in-java/' rel='bookmark' title='Quartz framework tutorial with example &#8211; Schedule job in Java'>Quartz framework tutorial with example &#8211; Schedule job in Java</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/getting-started-with-apex-debug-logs-in-salesforce/' rel='bookmark' title='Getting started with Apex debug logs in salesforce'>Getting started with Apex debug logs in salesforce</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/getting-record-from-one-salesforce-organization-to-other/' rel='bookmark' title='Getting record from other Salesforce organization OR communication between multiple salesforce organization'>Getting record from other Salesforce organization OR communication between multiple salesforce organization</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/java/merge-pdf-in-salesforce-using-java-itextpdf-and-oauth-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tutorial of Command line DataLoader &#8211; Salesforce</title>
		<link>http://shivasoft.in/blog/salesforce/tutorial-of-command-line-dataloader-salesforce/</link>
		<comments>http://shivasoft.in/blog/salesforce/tutorial-of-command-line-dataloader-salesforce/#comments</comments>
		<pubDate>Wed, 26 Sep 2012 14:00:09 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Data Loader]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3122</guid>
		<description><![CDATA[I had this article in my list for long time and today i got chance to share with you all. Data Loader is great native tool provide by the Salesforce to insert, upsert, update, export and delete data. Standard Data Loader wizard needs interaction however there are many scenarios where we need to perform these [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/step-by-step-salesforce-tutorial-creating-custom-object-1-of-n/' rel='bookmark' title='Step by Step Salesforce Tutorial – Creating custom object – 1 of 6'>Step by Step Salesforce Tutorial – Creating custom object – 1 of 6</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/step-by-step-salesforce-tutorial-%e2%80%93-creating-workflow-rule-%e2%80%93-5-of-n/' rel='bookmark' title='Step by Step Salesforce Tutorial – Creating Workflow rule – 5 of 6'>Step by Step Salesforce Tutorial – Creating Workflow rule – 5 of 6</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/step-by-step-salesforce-tutorial-%e2%80%93-creating-tab-and-validation-rule-%e2%80%93-3-of-n/' rel='bookmark' title='Step by Step Salesforce Tutorial – Creating Tab and Validation Rule – 3 of 6'>Step by Step Salesforce Tutorial – Creating Tab and Validation Rule – 3 of 6</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">I had this article in my list for long time and today i got chance to share with you all. Data Loader is great native tool provide by the Salesforce to insert, upsert, update, export and delete data. Standard Data Loader wizard needs interaction however there are many scenarios where we need to perform these data loading tasks repeatedly like every night 1:00 AM (Nightly Services) or something. So, for these situations we can use standard data loader tool from Command line.</p>
<p style="text-align: justify;">In this article, i will explain in detail on how to use Data Loader from command line.</p>
<p style="text-align: justify;">The most important part of setting up Command line Data loader is to generate the encrypted password using utility provided by the Data Loader.</p>
<div id="attachment_3129" class="wp-caption aligncenter" style="width: 653px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Commandline-Data-Loader-tools.png"><img class="size-full wp-image-3129" title="Commandline Data Loader tools" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Commandline-Data-Loader-tools.png" alt="Commandline Data Loader tools" width="643" height="165" /></a><p class="wp-caption-text">Commandline Data Loader tools</p></div>
<p>This directory contains two utility batch file : <strong>“encrypt.bat”</strong> and <strong>“process.bat”<span id="more-3122"></span></strong></p>
<p>Navigate to “Program Files | Data Loader | bin” in command prompt and run command.</p>
<pre class="brush: bash; title: ; notranslate">
encrypt.bat –g YOURSECRETKEY
</pre>
<div id="attachment_3128" class="wp-caption aligncenter" style="width: 633px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Commandline-Data-Loader-generate-Secret-key.png"><img class="size-full wp-image-3128" title="Commandline Data Loader generate Secret key" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Commandline-Data-Loader-generate-Secret-key.png" alt="Commandline Data Loader generate Secret key" width="623" height="73" /></a><p class="wp-caption-text">Commandline Data Loader generate Secret key</p></div>
<p>The secrete key provided can be anything of your choice. Copy the generated Text and paste in new file “<strong>Key.txt</strong>”.</p>
<p>Now run again above command to generated encrypted password with following command:</p>
<pre class="brush: bash; title: ; notranslate">
encrypt.bat -e password &quot;C:\Users\shiva\Desktop\Data Loader Documents\Try\Key.txt&quot;
</pre>
<div id="attachment_3127" class="wp-caption aligncenter" style="width: 633px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Commandline-Data-Loader-generate-Encrypted-Password.png"><img class="size-full wp-image-3127" title="Commandline Data Loader generate Encrypted Password" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Commandline-Data-Loader-generate-Encrypted-Password.png" alt="Commandline Data Loader generate Encrypted Password" width="623" height="49" /></a><p class="wp-caption-text">Commandline Data Loader generate Encrypted Password</p></div>
<p>Now, note this password somewhere, as it is going to be used in remaining part of configuration.<br />
If you are using proxy server and it uses the password, then repeat same step for generating encrypted password.</p>
<p><span style="text-decoration: underline;"><strong>Create file &#8211; “config.properties” :</strong></span></p>
<p>This file contains all the common configurations settings like UserName, encrypted password. This file can also be kept as blank however it is good practice to write all common configurations in this file. Keys in this file will be same as of <strong>&#8220;Process-config.xml&#8221;</strong> as described at the end of this article.</p>
<p>Example:</p>
<pre class="brush: bash; title: ; notranslate">
#Loader Config
#Wed Sep 19 2012
sfdc.debugMessages=true
process.encryptionKeyFile=C:\\Users\\shiva\\Desktop\\Data Loader Documents\\Try\\Key.txt
sfdc.debugMessagesFile = C:\\Users\\shiva\\Desktop\\Data Loader Documents\\Try\\AccountExport.log
sfdc.endpoint=https://login.salesforce.com
sfdc.username=ilovenagpur@gmail.com
sfdc.password=7b5693f0cad856dc778d4b8506f2c976
sfdc.proxyUsername=proxyUserName
sfdc.proxyPassword=encrypytesPassword
sfdc.proxyHost=proxyhostName
sfdc.proxyPort=123
sfdc.loadBatchSize=200
sfdc.timeoutSecs=600
</pre>
<p><span style="text-decoration: underline;"><strong>Create file &#8211; “process-conf.xml” :</strong></span></p>
<p>This file contains all the information regarding import or export. In this article I am exporting the Account data, so sample file is</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE beans PUBLIC &quot;-//SPRING//DTD BEAN//EN&quot; &quot;http://www.springframework.org/dtd/spring-beans.dtd&quot;&gt;
&lt;beans&gt;
&lt;bean id=&quot;Account&quot;
	class=&quot;com.salesforce.dataloader.process.ProcessRunner&quot;
	singleton=&quot;false&quot;&gt;
		&lt;description&gt;Export Account Data&lt;/description&gt;
		&lt;property name=&quot;name&quot; value=&quot;Account&quot;/&gt;
		&lt;property name=&quot;configOverrideMap&quot;&gt;
		&lt;map&gt;
			&lt;entry key=&quot;sfdc.enableLastRunOutput&quot; value=&quot;false&quot;/&gt;
			&lt;entry key=&quot;sfdc.entity&quot; value=&quot;Account&quot;/&gt;
			&lt;entry key=&quot;process.operation&quot; value=&quot;extract&quot;/&gt;
			&lt;entry key=&quot;sfdc.extractionRequestSize&quot; value=&quot;500&quot;/&gt;
			&lt;entry key=&quot;sfdc.extractionSOQL&quot; value=&quot;SELECT Id FROM Account&quot;/&gt;
			&lt;entry key=&quot;dataAccess.name&quot; value=&quot;D:\Data Load\Seed Data\NPower Production - 16 Aug 12\AccountExport.csv&quot;/&gt;
			&lt;entry key=&quot;dataAccess.type&quot; value=&quot;csvWrite&quot;/&gt;
			&lt;entry key=&quot;dataAccess.writeUTF8&quot; value=&quot;true&quot; /&gt;
		&lt;/map&gt;
		&lt;/property&gt;
	&lt;/bean&gt;
&lt;/beans&gt;
</pre>
<p style="text-align: justify;">At the end of this article, you can see the description of all parameters. Assuming that we are inside the bin folder of dataloader then run below Command:</p>
<pre class="brush: bash; title: ; notranslate">
Process.bat “directory path where we have file process-config.xml”  process Name
</pre>
<p>In our case the process name is Account, process name is nothing but the property “name”.</p>
<div id="attachment_3130" class="wp-caption aligncenter" style="width: 687px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Run-Commandline-Data-Loader.png"><img class="size-full wp-image-3130" title="Run Commandline Data Loader" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Run-Commandline-Data-Loader.png" alt="Run Commandline Data Loader" width="677" height="102" /></a><p class="wp-caption-text">Run Commandline Data Loader</p></div>
<p style="text-align: justify;">After running the above command your data will be exported in file provided in configuration “process-config.xml” file.</p>
<p style="text-align: justify;">While working with command line dataloader, there are chances that you get few error. So i am also inclusing few common error and there solutions:</p>
<p><strong>Error 1:</strong><br />
Dataloader error: &#8220;javax.crypto.BadPaddingException:&#8221;Or error loading parameter of sfdc.password<br />
<strong>Solution :</strong><br />
Add &#8220;process.encryptionKeyFile=C:\\Users\\315447\\Desktop\\Data Loader\\key.txt&#8221; Either in “config.properties” or “process-conf.xml”</p>
<p><strong>Error 2:</strong><br />
Error in query: query is empty<br />
<strong>Solution:</strong><br />
Occurs, If “sfdc.extractionSOQL” key in beans node does not have valid SOQL.</p>
<p><strong>Parameters for Process-config.xml:</strong></p>
<p style="text-align: center;">
<table id="wp-table-reloaded-id-9-no-1" class="wp-table-reloaded wp-table-reloaded-id-9">
<thead>
	<tr class="row-1 odd">
		<th class="column-1">Parameter</th><th class="column-2">Description</th>
	</tr>
</thead>
<tbody>
	<tr class="row-2 even">
		<td class="column-1">&lt;bean id="<b>PROCESSNAME</b>" class="com.salesforce.lexiloader.process.ProcessRunner" singleton="false"&gt;<br />
</td><td class="column-2">This first line uniquely defines the process in the XML file. This has to be unique and will be used to call the process later on. Only change the <b>PROCESSNAME</b> and leave all other parts the same.</td>
	</tr>
	<tr class="row-3 odd">
		<td class="column-1">&lt;description&gt; <b> Your Description here </b> &lt;/description&gt;</td><td class="column-2">A description of the process.</td>
	</tr>
	<tr class="row-4 even">
		<td class="column-1">&lt;property name="name" value="<b>PROCESSNAME</b>"/&gt;</td><td class="column-2">Copy the <b>PROCESSNAME</b> and place it in this parameter. This is used in the log files when debug messages are showing. This is the name that is shown on the debug logs.</td>
	</tr>
	<tr class="row-5 odd">
		<td class="column-1">&lt;property name="configOverrideMap"&gt;<br />
&lt;map&gt;</td><td class="column-2">These two lines initiate the parameters for the process. They should not be changed and should always be the same.	</td>
	</tr>
	<tr class="row-6 even">
		<td class="column-1">&lt;entry key="sfdc.debugMessages" value="false"/&gt;</td><td class="column-2">Set this to <b>True</b> if you want detailed debug messages to appear in the command line.</td>
	</tr>
	<tr class="row-7 odd">
		<td class="column-1">&lt;entry key="sfdc.debugMessagesFile" value="c:\dataloader\samples\status\accountMasterSoapTrace.log"/&gt;</td><td class="column-2">Set the value to a directory and a file to keep the detailed log file in. <br />
WARNING: This can create an extremely large file. Make sure that you have space on your hard drive before this is set.	</td>
	</tr>
	<tr class="row-8 even">
		<td class="column-1">&lt;entry key="sfdc.endpoint" value="https://www.salesforce.com"/&gt;</td><td class="column-2">Keep default, unless loading into Sandbox. for sandbox, it is test.salesforce.com.</td>
	</tr>
	<tr class="row-9 odd">
		<td class="column-1">&lt;entry key="sfdc.username" value="jitendrazaa@winter13Sand.com" /&gt;</td><td class="column-2">Set this as the username of the user you are importing /exporting as.</td>
	</tr>
	<tr class="row-10 even">
		<td class="column-1">&lt;entry key="sfdc.password" value="b6b3016135f717754590a3e35b1db32b" /&gt;<br />
&lt;entry key="process.encryptonKeyFile" value="C:\Program Files\salesforce.com\Apex Data Loader 9.0\test\Key.txt" /&gt;</td><td class="column-2">See this article on how to create Encrypted password for Command line Dataloader in Salesforce</td>
	</tr>
	<tr class="row-11 odd">
		<td class="column-1">&lt;entry key="sfdc.timeoutSecs" value="600"/&gt;</td><td class="column-2">System time out value.</td>
	</tr>
	<tr class="row-12 even">
		<td class="column-1">&lt;entry key="sfdc.loadBatchSize" value="200"/&gt;</td><td class="column-2">System batch load size. </td>
	</tr>
	<tr class="row-13 odd">
		<td class="column-1">&lt;entry key="process.operation" value="extract" /&gt;</td><td class="column-2">Signifies the process being run.<br />
Possible Values:<br />
<ul><li>Extract</li><li>Insert</li><li>Delete</li><li>Upsert</li></ul></td>
	</tr>
	<tr class="row-14 even">
		<td class="column-1">&lt;entry key="sfdc.entity" value="Account"/&gt;</td><td class="column-2">Signifies the object that you are running this process for. This should be the API name of the object when you are running processes for custom objects.</td>
	</tr>
	<tr class="row-15 odd">
		<td class="column-1">&lt;entry key="sfdc.extractionRequestSize" value="500"/&gt;</td><td class="column-2">Batch size for extract processes only</td>
	</tr>
	<tr class="row-16 even">
		<td class="column-1">&lt;entry key="sfdc.extractionSOQL" value="Select Id, MasterRecordId, Name, Type FROM Account " /&gt;</td><td class="column-2">This is the SOQL query run for extract processes. You can use the Data Loader GUI to generate the SOQL statement and conditions and simply cut and paste into this entry key.</td>
	</tr>
	<tr class="row-17 odd">
		<td class="column-1">&lt;entry key="dataAccess.type" value="<b>csvWrite</b>" /&gt;</td><td class="column-2">Signifies the action when doing the process for Extract, Insert, Delete, Upsert. This key should be used in conjunction with the "process.operation" key.<br />
Possible Values:<ol> <li>csvRead</li><li>csvWrite</li><li>databaseRead</li><li>databaseWrite</li></ol><br />
When using Extract processes, use <b>csvWrite</b>. When using Delete, Insert, and Upsert processes, use <b>csvRead</b>.</td>
	</tr>
	<tr class="row-18 even">
		<td class="column-1">&lt;entry key="dataAccess.writeUTF8" value="true" /&gt;</td><td class="column-2">When using a "csvWrite" dataccess type, set this to True when you want files to be extracted as <b>UTF-8</b>.</td>
	</tr>
	<tr class="row-19 odd">
		<td class="column-1">&lt;entry key="dataAccess.name" value="<b>C:\Program Files\salesforce.com\Apex Data Loader 9.0\test\extract.csv</b>" /&gt;</td><td class="column-2">Signifies the location and file name of the dataaccess type process. If running a csvRead, the process will look for the file in this location. If running a csvWrite, the process will replace the file in this location.</td>
	</tr>
	<tr class="row-20 even">
		<td class="column-1">&lt;entry key="process.mappingFile" value="<b>C:\Program Files\salesforce.com\Apex Data Loader 9.0\test\upsert_mapping.sdl</b>"/&gt;</td><td class="column-2">Signifies the location of a data loader mapping file. This is the same mapping file used when saving a mapping from the data loader GUI. This is required for insert, delete and upsert processes.</td>
	</tr>
	<tr class="row-21 odd">
		<td class="column-1">&lt;entry key="sfdc.externalIdField" value="Customer_ID__c"/&gt;</td><td class="column-2">Signifies the External ID field used for the upsert process. This is required for upserts.</td>
	</tr>
	<tr class="row-22 even">
		<td class="column-1">&lt;entry key="process.statusOutputDirectory" value="C:\Program Files\salesforce.com\Apex Data Loader 9.0\test\logs\" /&gt;</td><td class="column-2">Signifies the directory where the data loader success and error files will be created in.</td>
	</tr>
	<tr class="row-23 odd">
		<td class="column-1">&lt;entry key="process.outputSuccess" value="C:\Program Files\salesforce.com\Apex Data Loader 9.0\test\Logs\csvUpsertProcess_success.csv" /&gt;<br />
<br />
&lt;entry key="process.outputError" value="C:\Program Files\salesforce.com\Apex Data Loader 9.0\test\Logs\csvUpsertProcess_error.csv" /&gt;</td><td class="column-2">Signifies the directory and filename where the success and error files will be created. If this key is not specified, the "process.statusOutputDirectory"  key will contain similar filenames as ones generated by the data loader GUI. </td>
	</tr>
</tbody>
</table>
</p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/step-by-step-salesforce-tutorial-creating-custom-object-1-of-n/' rel='bookmark' title='Step by Step Salesforce Tutorial – Creating custom object – 1 of 6'>Step by Step Salesforce Tutorial – Creating custom object – 1 of 6</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/step-by-step-salesforce-tutorial-%e2%80%93-creating-workflow-rule-%e2%80%93-5-of-n/' rel='bookmark' title='Step by Step Salesforce Tutorial – Creating Workflow rule – 5 of 6'>Step by Step Salesforce Tutorial – Creating Workflow rule – 5 of 6</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/step-by-step-salesforce-tutorial-%e2%80%93-creating-tab-and-validation-rule-%e2%80%93-3-of-n/' rel='bookmark' title='Step by Step Salesforce Tutorial – Creating Tab and Validation Rule – 3 of 6'>Step by Step Salesforce Tutorial – Creating Tab and Validation Rule – 3 of 6</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/tutorial-of-command-line-dataloader-salesforce/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Authenticate Git using SSH protocol with Eclipse and Egit &#8211; Salesforce</title>
		<link>http://shivasoft.in/blog/salesforce/authenticate-git-using-ssh-protocol-with-eclipse-and-egit-salesforce/</link>
		<comments>http://shivasoft.in/blog/salesforce/authenticate-git-using-ssh-protocol-with-eclipse-and-egit-salesforce/#comments</comments>
		<pubDate>Tue, 25 Sep 2012 18:08:47 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[EGit]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3115</guid>
		<description><![CDATA[In Previous article, i have explained step by step approach to configure Git for Salesforce using Eclipse and Egit plugin. However, i have explained the &#8220;https&#8221; method to connect Git directly. There are several repositories which does not support the &#8220;https&#8221; protocol and prefer &#8220;SSH&#8221; (Secure Shell) protocol. So, in this article i will extend [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/' rel='bookmark' title='Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control'>Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/install-force-com-ide-in-eclipse-salesforce-com/' rel='bookmark' title='Install Force.com IDE in Eclipse &#8211; Salesforce.com'>Install Force.com IDE in Eclipse &#8211; Salesforce.com</a></li>
<li><a href='http://shivasoft.in/blog/others/tips/change-default-keyboard-shortcuts-in-eclipse/' rel='bookmark' title='Change default Keyboard shortcuts in eclipse'>Change default Keyboard shortcuts in eclipse</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;"><a title="Salesforce Eclipse Git Tutorial" href="http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/">In Previous article</a>, i have explained step by step approach to configure Git for Salesforce using Eclipse and Egit plugin. However, i have explained the &#8220;https&#8221; method to connect Git directly. There are several repositories which does not support the &#8220;https&#8221; protocol and prefer &#8220;SSH&#8221; (Secure Shell) protocol.</p>
<p style="text-align: justify;">So, in this article i will extend the previous one by showing how to connect git using &#8220;SSH&#8221; protocol. In this article i am referring <a title="Free Git and SVN repository" href="http://Unfuddle.com" rel="nofollow">Unfuddle.com</a></p>
<p style="text-align: justify;">We will need to generate the private key (RSA) which will be unique and locked with the help of secret passphrase.</p>
<p style="text-align: justify;">In Eclipse, Navigate to “Windows | Preferences | General | Network Connections | SSH2”.</p>
<div id="attachment_3117" class="wp-caption aligncenter" style="width: 579px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Generate-SSH-RSA-Key-using-Eclipse.png"><img class=" wp-image-3117 " title="Generate SSH RSA Key using Eclipse" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Generate-SSH-RSA-Key-using-Eclipse.png" alt="Configure Push for SSH Authentication in Git" width="569" height="486" /></a><p class="wp-caption-text">Configure Push for SSH Authentication in Git</p></div>
<p>Click on button “Generate RSA Key” and after that provide secret Passphrase (dont forget this passphrase), now save the “private key”, if possible in “.ssh” folder which is located at “C:\Users\UseName\.ssh”.</p>
<p style="text-align: justify;"><span id="more-3115"></span>For SSH login, let’s take example of “Unfuddle”, where we need to connect to Git using SSH protocol.</p>
<p style="text-align: justify;">In Unfuddle, navigate to “Personal Setting” and at the bottom of page you will find option to add “public Keys”. Copy the key generated in above screen and paste it in Unfuddle personal Setting.</p>
<p style="text-align: justify;">Follow all steps of setting up Git as per <a title="Integrate Salesforce, Git using Eclipse and EGit" href="http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/">previous article</a>.</p>
<p style="text-align: justify;">The only change we need to configure is while setting up Push or fetch URLs.</p>
<div id="attachment_3116" class="wp-caption aligncenter" style="width: 568px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Configure-Push-for-SSH-Authentication-in-Git.png" rel="nofollow"><img class="size-full wp-image-3116" title="Configure Push for SSH Authentication in Git" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Configure-Push-for-SSH-Authentication-in-Git.png" alt="Configure Push for SSH Authentication in Git" width="558" height="525" /></a><p class="wp-caption-text">Configure Push for SSH Authentication in Git</p></div>
<p style="text-align: justify;">As you can see in above image, we have used the protocol “SSH” instead of “https” as compared to our last article.</p>
<p style="text-align: justify;">I hope, it will help many users to set up Git for Salesforce using eclipse in case they need “SSH” authentication.</p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/' rel='bookmark' title='Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control'>Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/install-force-com-ide-in-eclipse-salesforce-com/' rel='bookmark' title='Install Force.com IDE in Eclipse &#8211; Salesforce.com'>Install Force.com IDE in Eclipse &#8211; Salesforce.com</a></li>
<li><a href='http://shivasoft.in/blog/others/tips/change-default-keyboard-shortcuts-in-eclipse/' rel='bookmark' title='Change default Keyboard shortcuts in eclipse'>Change default Keyboard shortcuts in eclipse</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/authenticate-git-using-ssh-protocol-with-eclipse-and-egit-salesforce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Salesforce Interview Question – Part 13</title>
		<link>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-13/</link>
		<comments>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-13/#comments</comments>
		<pubDate>Mon, 24 Sep 2012 18:48:55 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Visualforce]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3112</guid>
		<description><![CDATA[121 : Consider we have overall 90% code coverage however there is one class which have 0% code coverage. Can we still able to deploy that class on production? Ans : Yes. Minimum 1% required for every trigger and there is no such restriction for Apex class. 122 : How to get selected records ID [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/life-cycle-of-visual-force-page-during-get-request-salesforce-interview-question/' rel='bookmark' title='Life Cycle of Visualforce page during GET Request- Salesforce Interview question'>Life Cycle of Visualforce page during GET Request- Salesforce Interview question</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-12/' rel='bookmark' title='Salesforce Interview Question &#8211; Part 12'>Salesforce Interview Question &#8211; Part 12</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/backup-the-salesforce-data/' rel='bookmark' title='Schedule export backup of your Salesforce Data &#8211; Interview Question'>Schedule export backup of your Salesforce Data &#8211; Interview Question</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[
<!-- iframe plugin v.2.7 wordpress.org/plugins/iframe/ -->
<iframe src="http://shivasoft.in/blog/SFDCInterviewList.php" height="100px" width="100%" scrolling="no" class="iframe-class" frameborder="0"></iframe>
<hr />
<p style="text-align: justify;"><strong>121 : Consider we have overall 90% code coverage however there is one class which have 0% code coverage. Can we still able to deploy that class on production?</strong><br />
<strong> Ans :</strong> Yes. Minimum 1% required for every trigger and there is no such restriction for Apex class.</p>
<hr />
<p style="text-align: justify;"><strong>122 : How to get selected records ID from List View using Javascript / Ajax Toolkit, when custom button is added on List View page?</strong><br />
<strong> Ans :</strong> Create a new Button on Lead of type List Button. Add the button on Lead List View Layout and write below Javascript code:</p>
<pre class="brush: jscript; title: ; notranslate">
{!RequireScript(&quot;/js/functions.js&quot;)}

var recordsSelected = {!GetRecordIds($ObjectType.Lead)}
for(var i=0; i &lt; recordsSelected .length ; i++) {
     alert('Selected ID '+recordsSelected[i]);
}
</pre>
<hr />
<p style="text-align: justify;"><strong>123 : In Ajax toolkit for custom Javascript button, you have to explicitly login to API because global Session variable is not available. In that case it is security vulnerable because anybody logged in can see the javascript code and your username and password. So is there any way to avoid this?</strong><br />
<strong> Ans:</strong> We can create a visualforce page with output type as JavaScript. Global session variable is available in VF page. Initialize the global javascript variable in that VF page. include VF page as a javascript file and we are done!</p>
<hr />
<p style="text-align: justify;"><strong>124 : In Custom Component How we can return value to Custom Controller or Controller Extension?</strong><br />
<strong> Ans:</strong> In Apex, Objects are passed by reference (<a title="Pass by value and pass by reference in Salesforce" href="http://shivasoft.in/blog/java/pass-by-value-and-pass-by-reference/">read this article to understand Pass by Value and Pass by reference in Salesforce</a> and also <a title="Salesforce blog pass by value and pass by reference" href="http://blogs.developerforce.com/developer-relations/2012/05/passing-parameters-by-reference-and-by-value-in-apex.html" rel="nofollow">read this Salesforce blog article</a>). So supply an argument of wrapper class (object) type to custom component. If its value is changed in Custom component we will get updated value in controller also.<span id="more-3112"></span></p>
<hr />
<p style="text-align: justify;"><strong>125 : Lets consider you had created outbound changeset previously. After that, some class is modified which is part of that old changeset. If you clone that Changeset, current updated class will be included or that previous class will be included in changset?</strong><br />
<strong> Ans :</strong> Once changeset is created it cannot be modified. After creation of changset, if we modify any component it will not reflected and when we clone the changeset, all components (offcource old copy of component) will be added to changeset.</p>
<hr />
<p style="text-align: justify;"><strong>126 : We have a &#8220;Time Based Workflow&#8221; and there is Action scheduled to be executed. If we Deactivate the workflow, Scheduled actions will be removed from queue or not?</strong><br />
<strong> Ans :</strong> Even after deactivation of workflow, its action will be active in queue.</p>
<hr />
<p style="text-align: justify;"><strong>127 : We have &#8220;Time Based Workflow&#8221; and there is action scheduled to be executed. Can we delete that workflow?</strong><br />
<strong> Ans :</strong> If a workflow have any pending time dependent action, then we cannot delete the workflow.</p>
<hr />
<p style="text-align: justify;"><strong>128 : How to clear the Time based workflow action queue ?</strong><br />
<strong> Ans :</strong> Two ways to achieve this : 1. Make criteria false for all those records. 2. Navigate to &#8220;Set up | Monitoring | Time Based Workflow&#8221;, search for scheduled actions and remove from queue.</p>
<hr />
<p style="text-align: justify;"><strong>129 : While creating workflow on Task, what difference observed on available actions?</strong><br />
<strong> Ans :</strong> &#8220;Send Email&#8221; action is not available while creating workflow on task.</p>
<hr />
<p style="text-align: justify;"><strong>130 : In trigger, lets say we have system.debug() statement after adderror() method. Will system.debug() be statement executed in Trigger after adderror() method?</strong><br />
<strong> Ans:</strong> adderror() method is not error statement rather its normal execution flow and all the statements written after adderror() will be executed normally.</p>
<hr />

<!-- iframe plugin v.2.7 wordpress.org/plugins/iframe/ -->
<iframe src="http://shivasoft.in/blog/SFDCInterviewList.php" height="100px" width="100%" scrolling="no" class="iframe-class" frameborder="0"></iframe>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/life-cycle-of-visual-force-page-during-get-request-salesforce-interview-question/' rel='bookmark' title='Life Cycle of Visualforce page during GET Request- Salesforce Interview question'>Life Cycle of Visualforce page during GET Request- Salesforce Interview question</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-12/' rel='bookmark' title='Salesforce Interview Question &#8211; Part 12'>Salesforce Interview Question &#8211; Part 12</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/backup-the-salesforce-data/' rel='bookmark' title='Schedule export backup of your Salesforce Data &#8211; Interview Question'>Schedule export backup of your Salesforce Data &#8211; Interview Question</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-13/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Change year range in Datepicker &#8211; Salesforce</title>
		<link>http://shivasoft.in/blog/salesforce/change-year-range-in-datepicker-salesforce/</link>
		<comments>http://shivasoft.in/blog/salesforce/change-year-range-in-datepicker-salesforce/#comments</comments>
		<pubDate>Thu, 20 Sep 2012 12:52:49 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Web Technology]]></category>
		<category><![CDATA[Home page Component]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3106</guid>
		<description><![CDATA[In Datepicker control of salesforce, most of the developers must have faced issue on year range for Datepicker control. We cannot configure the year range in standard date picker control. However, for a long time i am using a JQuery code to change the range of years in Datepicker and thought to share with you. [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/gantt-chart-in-salesforce-using-jquery-and-json/' rel='bookmark' title='Gantt Chart in Salesforce using JQuery and JSON'>Gantt Chart in Salesforce using JQuery and JSON</a></li>
<li><a href='http://shivasoft.in/blog/webtech/web/highlight-current-field-using-jquery/' rel='bookmark' title='Highlight Current field using JQuery'>Highlight Current field using JQuery</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-questions-part-10/' rel='bookmark' title='Salesforce Interview Questions – Part 10'>Salesforce Interview Questions – Part 10</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">In Datepicker control of salesforce, most of the developers must have faced issue on year range for Datepicker control. We cannot configure the year range in standard date picker control. However, for a long time i am using a JQuery code to change the range of years in Datepicker and thought to share with you. You can find similar solution at many places but thought to add in my articles library also.</p>
<div id="attachment_3107" class="wp-caption aligncenter" style="width: 235px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Year-Range-in-Salesforce-Date-Picker.png"><img class="size-full wp-image-3107" title="Year Range in Salesforce Date Picker" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Year-Range-in-Salesforce-Date-Picker.png" alt="Year Range in Salesforce Date Picker" width="225" height="184" /></a><p class="wp-caption-text">Year Range in Salesforce Date Picker</p></div>
<p style="text-align: justify;">So, lets start to resolve this problem. The only thing we will need is Javascript based Home page Component.<br />
Navigate to <strong>&#8220;Set up | App SetUp | Customize | Home | Home Page Components&#8221;</strong>.<br />
click on &#8220;New&#8221; Custom Component. In Next screen you will prompted with the type of Homepage component.<span id="more-3106"></span></p>
<div id="attachment_3108" class="wp-caption aligncenter" style="width: 603px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Homepage-Component-Type-in-Salesforce.png"><img class="size-full wp-image-3108" title="Homepage Component Type in Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Homepage-Component-Type-in-Salesforce.png" alt="Homepage Component Type in Salesforce" width="593" height="307" /></a><p class="wp-caption-text">Homepage Component Type in Salesforce</p></div>
<p>Select &#8220;HTML Area&#8221;.<br />
In Next screen, click on checkbox &#8220;Show HTML&#8221; as shown in below image.</p>
<div id="attachment_3109" class="wp-caption aligncenter" style="width: 450px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Javascript-code-in-Home-Page-component-Salesforce.png"><img class="size-full wp-image-3109" title="Javascript code in Home Page component - Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Javascript-code-in-Home-Page-component-Salesforce.png" alt="Javascript code in Home Page component - Salesforce" width="440" height="389" /></a><p class="wp-caption-text">Javascript code in Home Page component &#8211; Salesforce</p></div>
<p>Now write below Javascript code in HTML area :</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; src=&quot;//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;span id=&quot;hideThisHomePageComp&quot;&gt;&lt;/span&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$j = jQuery.noConflict();
$j(document).ready(function() {
                var startYear=1985;
                var endYear=2024;
                var htmlStr='';
                if(startYear&lt;endYear){
                                for(i=startYear;i&lt;endYear+1;i++){
                                                htmlStr += &quot;&lt;option value=\&quot;&quot;+i+&quot;\&quot;&gt;&quot;+i+&quot;&lt;/option&gt;&quot;;
                                }
                                $j('#calYearPicker').html(htmlStr);
                }
                $j('#sidebarDiv #hideThisHomePageComp').parent().parent().hide();
                }
);
&lt;/script&gt;
</pre>
<p><span style="text-decoration: underline;"><strong>Note:</strong></span></p>
<ul>
<li>While importing JQuery from Google or any other CDN, don&#8217;t write &#8220;http&#8221; protocol. It will automatically detect the protocol.</li>
<li>Don&#8217;t write any single line comment, as Salesforce will internally convert above Javascript code into single line. And if you write any single line comment then everything after that will be commented. Multiple line comment will work.</li>
<li>If you are using Datepicker in custom Visualforce page and if sidebar is not enabled then above work around will not work.</li>
<li>We are hiding the home page component itself by line &#8220;parent().parent().hide()&#8221;, as there is no need to show this component to end user.</li>
</ul>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/gantt-chart-in-salesforce-using-jquery-and-json/' rel='bookmark' title='Gantt Chart in Salesforce using JQuery and JSON'>Gantt Chart in Salesforce using JQuery and JSON</a></li>
<li><a href='http://shivasoft.in/blog/webtech/web/highlight-current-field-using-jquery/' rel='bookmark' title='Highlight Current field using JQuery'>Highlight Current field using JQuery</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/salesforce-interview-questions-part-10/' rel='bookmark' title='Salesforce Interview Questions – Part 10'>Salesforce Interview Questions – Part 10</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/change-year-range-in-datepicker-salesforce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control</title>
		<link>http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/</link>
		<comments>http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/#comments</comments>
		<pubDate>Sat, 15 Sep 2012 22:02:01 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[BitBucket]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[EGit]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Unfuddle]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3086</guid>
		<description><![CDATA[During my J2EE and .Net days, I was much dependent on the subversion repository. I had never thought my code without SVN. When I moved to Salesforce few years back, the first thing I missed is code repository to have better source code control. As svn creates either “.svn” or “_svn” folder, it was not [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/others/tips/locate-source-file-on-local-disc-in-eclipse-external-tool/' rel='bookmark' title='Locate source file on Local Disc in Eclipse &#8211; External tool'>Locate source file on Local Disc in Eclipse &#8211; External tool</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/install-force-com-ide-in-eclipse-salesforce-com/' rel='bookmark' title='Install Force.com IDE in Eclipse &#8211; Salesforce.com'>Install Force.com IDE in Eclipse &#8211; Salesforce.com</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/how-to-create-s-control-in-salesforce/' rel='bookmark' title='How to create S-Control in Salesforce'>How to create S-Control in Salesforce</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">During my J2EE and .Net days, I was much dependent on the <a title="Subversion" href="http://en.wikipedia.org/wiki/Apache_Subversion" rel="nofollow">subversion </a>repository. I had never thought my code without SVN. When I moved to Salesforce few years back, the first thing I missed is code repository to have better source code control. As svn creates either “.svn” or “_svn” folder, it was not supported by the force.com IDE and I struggled much to get it work out. Salesforce saves only real time information. So it is very difficult to know what was changed in past related to any issue as well as complete code backup.</p>
<p style="text-align: justify;"><strong>Era of Git</strong></p>
<p style="text-align: justify;">Git has emerged as the most powerful source code repository and widely accepted by the developer communities. If I will talk about Git this article is going to be out of discussion scope.</p>
<div id="attachment_3097" class="wp-caption aligncenter" style="width: 419px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Architecture-of-GIT.png"><img class="size-full wp-image-3097" title="Architecture of GIT" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Architecture-of-GIT.png" alt="Architecture of GIT" width="409" height="446" /></a><p class="wp-caption-text">Architecture of GIT</p></div>
<p>Above figure describes Architect of Git. The one thing to notice in above figure is that Git has local repository as well as remote repository which make it better and more flexible than any other code repository tool.</p>
<div id="attachment_3094" class="wp-caption aligncenter" style="width: 637px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Remote-and-Local-Repository-in-GIT.png"><img class="size-full wp-image-3094" title="Remote and Local Repository in GIT" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Remote-and-Local-Repository-in-GIT.png" alt="Remote and Local Repository in GIT" width="627" height="342" /></a><p class="wp-caption-text">Remote and Local Repository in GIT</p></div>
<p>As you can see in above diagram also, user can work on completely different branch which is stored on his local repository and when he thinks that he is ready to push the code on Git, just commit the changes on remote repository.</p>
<p style="text-align: justify;"><strong><span id="more-3086"></span>Step 1:</strong><br />
So, let’s start with using Git with Salesforce using Eclipse plug-in EGit.</p>
<p style="text-align: justify;">EGit is an Eclipse Team provider for the distributed version control system Git. EGit allows performing Git commands from the Eclipse IDE.</p>
<p style="text-align: justify;">EGit is based on the JGit library. JGit is a library which implements the Git functionality in Java.<br />
Most Eclipse 4.2 packages from Eclipse.org contain EGit in there default configuration. In this case no additional installation is required.</p>
<p style="text-align: justify;">If EGit is missing in your Eclipse installation, you can install it via the Eclipse Update Manager via: Help ?Install new Software. EGit can be installed from the following URL: <a title="Eclipse Egit Plugin" href="http://download.eclipse.org/egit/updates" rel="nofllow">http://download.eclipse.org/egit/updates</a></p>
<p><strong>Step 2:</strong><br />
Gets the Salesforce code in local workspace using force.com IDE.</p>
<p style="text-align: justify;"><strong>Step 3:</strong><br />
Now, it is the time to configure repository on your local system which is also known as “Local Repository”. Navigate to “Right click on Project | Team | Share Project”</p>
<div id="attachment_3095" class="wp-caption aligncenter" style="width: 596px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Share-Salesforce-Project-in-Eclipse.png"><img class="size-full wp-image-3095" title="Share Salesforce Project in Eclipse" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Share-Salesforce-Project-in-Eclipse.png" alt="Share Salesforce Project in Eclipse" width="586" height="509" /></a><p class="wp-caption-text">Share Salesforce Project in Eclipse</p></div>
<p style="text-align: justify;">On the basis of your eclipse configuration, you will get options like CVS, Git, SVN etc. Select “Git” and click on Next button.</p>
<p><strong>Step 4:</strong><br />
Click on “create” button as shown in below image</p>
<div id="attachment_3100" class="wp-caption aligncenter" style="width: 616px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Configure-Git-Repository-in-Eclipse.png"><img class=" wp-image-3100 " title="Configure Git Repository in Eclipse" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Configure-Git-Repository-in-Eclipse.png" alt="Configure Git Repository in Eclipse" width="606" height="363" /></a><p class="wp-caption-text">Configure Git Repository in Eclipse</p></div>
<p style="text-align: justify;">A new pop up will open where we can give Local repository name as well as location where we want to save the local repository. In this article, I am using the name “GITDemo” name. Now click on Finish button.</p>
<div id="attachment_3093" class="wp-caption aligncenter" style="width: 270px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Non-Indexed-Local-GIT-Repository.png"><img class="size-full wp-image-3093" title="Non Indexed Local GIT Repository" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Non-Indexed-Local-GIT-Repository.png" alt="Non Indexed Local GIT Repository" width="260" height="219" /></a><p class="wp-caption-text">Non Indexed Local GIT Repository</p></div>
<p style="text-align: justify;">If you check the Salesforce project, the folder will look something like above image with questions marks (“?”) on folders. Question marks means Git does not know what to do with files, either you can schedule them for commit or add few of them in ignore list (means they will not saved in Git).</p>
<p style="text-align: justify;"><strong>Step 5:</strong><br />
Now we will commit our files and folder in Local repository. Before commit we have to mention that which files and folder should be committed and ignored. In this case I am adding complete salesforce directory for commit. To do this, write click on “Project | Team | Add to Index”. After this operation your icons should be something like below image:</p>
<div id="attachment_3092" class="wp-caption aligncenter" style="width: 240px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Indexed-but-Non-Committed-changes-in-GIT-Eclipse-Salesforce.png"><img class="size-full wp-image-3092" title="Indexed but Non Committed changes in GIT - Eclipse - Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Indexed-but-Non-Committed-changes-in-GIT-Eclipse-Salesforce.png" alt="Indexed but Non Committed changes in GIT - Eclipse - Salesforce" width="230" height="219" /></a><p class="wp-caption-text">Indexed but Non Committed changes in GIT &#8211; Eclipse &#8211; Salesforce</p></div>
<p style="text-align: justify;">It’s time to commit all indexed files and folders in local repository. Again navigate to “Project | Team | Commit”. New Popup window will appear and ask for comment. It is mandatory to provide meaningful comment for each commit as it will be very easy for diagnosis in case needed in future.</p>
<div id="attachment_3098" class="wp-caption aligncenter" style="width: 673px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Commit-Changes-to-Git-Repository-Eclipse-Salesforce.png"><img class="size-full wp-image-3098" title="Commit Changes to Git Repository - Eclipse - Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Commit-Changes-to-Git-Repository-Eclipse-Salesforce.png" alt="Commit Changes to Git Repository - Eclipse - Salesforce" width="663" height="621" /></a><p class="wp-caption-text">Commit Changes to Git Repository &#8211; Eclipse &#8211; Salesforce</p></div>
<p>After commit the folder structure will appear with following icons:</p>
<div id="attachment_3099" class="wp-caption aligncenter" style="width: 229px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Committed-folders-in-Salesforce-Eclipse-using-Git.png"><img class="size-full wp-image-3099" title="Committed folders in Salesforce Eclipse using Git" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Committed-folders-in-Salesforce-Eclipse-using-Git.png" alt="Committed folders in Salesforce Eclipse using Git" width="219" height="221" /></a><p class="wp-caption-text">Committed folders in Salesforce Eclipse using Git</p></div>
<p style="text-align: justify;"><strong>Step 6:</strong><br />
Until here, we have done configuration for Local repository. Let’s move on to create a remote repository. There are lots of options available for hosting your code which supports Git. Few of them are</p>
<ol>
<li><a title="GitHub" href="https://github.com/" rel="nofollow">GitHub</a></li>
<li><a title="Bit Bucket" href="https://bitbucket.org/" rel="nofollow">BitBucket</a></li>
<li><a title="UnFuddle" href="https://unfuddle.com/" rel="nofollow">Unfuddle</a></li>
</ol>
<p style="text-align: justify;">Choice is up to us, which depends on license cost and many other factors. For demo, I am using the “BitBucket”.</p>
<p style="text-align: justify;">Create a free new account at “BitBucket” and create a repository. After successful creation of Git repository you will get the URL for your repository. There will be two URL provided, https and SSH.<br />
For this demo, I am using https URL. The URL format will be something like</p>
<blockquote><p>https://YOURUSERNAME@bitbucket.org/YOURUSERNAME/YOUR_REPOSITORY_Name.git</p></blockquote>
<p>In Eclipse, at upper right corner, change the perspective to “Git Repository Exploring” as shown in below image.</p>
<div id="attachment_3091" class="wp-caption aligncenter" style="width: 217px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Git-Repository-Perspective-in-Eclipse.png"><img class="size-full wp-image-3091" title="Git Repository Perspective in Eclipse" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Git-Repository-Perspective-in-Eclipse.png" alt="Git Repository Perspective in Eclipse" width="207" height="212" /></a><p class="wp-caption-text">Git Repository Perspective in Eclipse</p></div>
<p style="text-align: justify;">You will get the list of all Local Repository in this perspective. Now in Remotes, right click to create new Remote as shown in below image.</p>
<div id="attachment_3088" class="wp-caption aligncenter" style="width: 368px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Create-Remote-Git-Repository-Eclipse-for-Salesforce.png"><img class="size-full wp-image-3088" title="Create Remote Git Repository Eclipse for Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Create-Remote-Git-Repository-Eclipse-for-Salesforce.png" alt="Create Remote Git Repository Eclipse for Salesforce" width="358" height="108" /></a><p class="wp-caption-text">Create Remote Git Repository Eclipse for Salesforce</p></div>
<p>One new popup will appear like below</p>
<div id="attachment_3089" class="wp-caption aligncenter" style="width: 545px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Git-Create-New-Remote-in-Eclipse-Salesforce.png"><img class="size-full wp-image-3089" title="Git Create New Remote in Eclipse - Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Git-Create-New-Remote-in-Eclipse-Salesforce.png" alt="Git Create New Remote in Eclipse - Salesforce" width="535" height="295" /></a><p class="wp-caption-text">Git Create New Remote in Eclipse &#8211; Salesforce</p></div>
<p style="text-align: justify;">First select the option “Push” and give name of remote repository Name. “Push” means you are going to save changes on remote repository and “Fetch” means you are going to fetch code from remote repository.<br />
When you will click on Ok button new window will open.</p>
<div id="attachment_3087" class="wp-caption aligncenter" style="width: 531px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Configure-Push-for-remote-repository-Git-Eclipse-Salesforce.png"><img class="size-full wp-image-3087" title="Configure Push for remote repository - Git - Eclipse - Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Configure-Push-for-remote-repository-Git-Eclipse-Salesforce.png" alt="Configure Push for remote repository - Git - Eclipse - Salesforce" width="521" height="661" /></a><p class="wp-caption-text">Configure Push for remote repository &#8211; Git &#8211; Eclipse &#8211; Salesforce</p></div>
<p style="text-align: justify;">In new window click on “Change” (1) button as shown in above image. Again new pop up window will open. At location 2 provide your complete Git https URL. At location 3 provide your username and password. Don’t forget to check the box at location 4 which says “Store in Secure Store”. Now click on Finish Button.</p>
<div id="attachment_3090" class="wp-caption aligncenter" style="width: 527px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Git-Ref-Mappings-Eclipse-Salesforce.png"><img class="size-full wp-image-3090" title="Git Ref Mappings - Eclipse - Salesforce" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Git-Ref-Mappings-Eclipse-Salesforce.png" alt="Git Ref Mappings - Eclipse - Salesforce" width="517" height="570" /></a><p class="wp-caption-text">Git Ref Mappings &#8211; Eclipse &#8211; Salesforce</p></div>
<p style="text-align: justify;">On Parent window click on Add (1) button. In new window, in Local branch text box and Remote branch enter “refs/heads/master” or you can press “Ctrl + Space Bar”.</p>
<p style="text-align: justify;">After everything, click on “Dry-run” button to check, whether everything is properly configured or not? If everything is properly configured then it will show the repository name else it will show the error message.</p>
<p style="text-align: justify;">Now click on “Save and Push” button to move changes from local repository to remote repository.</p>
<p style="text-align: justify;">In the same way you can configure “fetch” to get the code from remote repository.</p>
<p style="text-align: justify;">I hope it will be help full for learners. I am waiting for your feedback. In next article I will show how to connect using SSH instead of https protocol.</p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/others/tips/locate-source-file-on-local-disc-in-eclipse-external-tool/' rel='bookmark' title='Locate source file on Local Disc in Eclipse &#8211; External tool'>Locate source file on Local Disc in Eclipse &#8211; External tool</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/install-force-com-ide-in-eclipse-salesforce-com/' rel='bookmark' title='Install Force.com IDE in Eclipse &#8211; Salesforce.com'>Install Force.com IDE in Eclipse &#8211; Salesforce.com</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/how-to-create-s-control-in-salesforce/' rel='bookmark' title='How to create S-Control in Salesforce'>How to create S-Control in Salesforce</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/salesforce-git-eclipse-egit-better-and-distributed-source-control/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Salesforce Interview Question &#8211; Part 12</title>
		<link>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-12/</link>
		<comments>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-12/#comments</comments>
		<pubDate>Thu, 13 Sep 2012 07:59:24 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[Visualforce]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3042</guid>
		<description><![CDATA[111 : How to get the Recordtype Id using Dynamic Apex? Ans: Normally to get the RecordtypeId for any sObject we use SOQL and it will count against your limit. So below method will bypass the need of SOQL Query. 112 : Write Apex code which will take the RecordID as input and on the [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/very-useful-tips-and-tricks-of-the-apex-salesforce-interview-questions-part-4/' rel='bookmark' title='Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex'>Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/explain-the-mvc-design-pattern-of-salesforce-com-interview-question/' rel='bookmark' title='Explain the MVC design pattern of Salesforce.com &#8211; Interview Question'>Explain the MVC design pattern of Salesforce.com &#8211; Interview Question</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/life-cycle-of-visual-force-page-during-get-request-salesforce-interview-question/' rel='bookmark' title='Life Cycle of Visualforce page during GET Request- Salesforce Interview question'>Life Cycle of Visualforce page during GET Request- Salesforce Interview question</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>
<!-- iframe plugin v.2.7 wordpress.org/plugins/iframe/ -->
<iframe src="http://shivasoft.in/blog/SFDCInterviewList.php" height="100px" width="100%" scrolling="no" class="iframe-class" frameborder="0"></iframe><br />
<strong>111 : How to get the Recordtype Id using Dynamic Apex?</strong><br />
<strong>Ans:</strong><br />
Normally to get the RecordtypeId for any sObject we use SOQL and it will count against your limit. So below method will bypass the need of SOQL Query.</p>
<pre class="brush: java; title: ; notranslate">
Map&lt;String, Schema.SObjectType&gt; m  = Schema.getGlobalDescribe() ;
Schema.SObjectType s = m.get('API_Name_Of_SObject') ;
Schema.DescribeSObjectResult cfrSchema = s.getDescribe() ;
Map&lt;String,Schema.RecordTypeInfo&gt; RecordTypeInfo = cfrSchema.getRecordTypeInfosByName();
Id rtId = RecordTypeInfo.get('Record Type Name').getRecordTypeId();
</pre>
<hr />
<p><strong>112 : Write Apex code which will take the RecordID as input and on the basis of that it will print the Object name and field names of sObject.</strong><br />
<strong> Ans:</strong></p>
<pre class="brush: java; title: ; notranslate">
List&lt;Schema.SObjectType&gt; gd = Schema.getGlobalDescribe().Values();
Map&lt;String,String&gt; objectMap = new Map&lt;String,String&gt;();
for(Schema.SObjectType f : gd)
{
     objectMap.put(f.getDescribe().getKeyPrefix(), f.getDescribe().getName());
}

String sampleId ='00390000003LIVw';
String prefix =  sampleId.substring(0,3);
String objectName = objectMap.get(prefix);
System.debug('** SObject Name ** '+objectName);

Map&lt;String, Schema.SObjectField&gt; desResult = Schema.getGlobalDescribe().get(objectName).getDescribe().Fields.getMap();
List&lt;String&gt; fieldList = new List&lt;String&gt;();
fieldList.addAll(desResult.keySet());
for(integer i =0;i&lt;fieldList.size();i++)
{
    System.debug('** Field Name ** '+fieldList[i]);
}
</pre>
<hr />
<p><strong>113. Consider a scenario where you have created a Visualforce page and Controller. You want to restrict the controller action for users which are logged in using &#8220;Grant Login Access&#8221;. How to acheive this?</strong></p>
<p><strong>Ans:</strong></p>
<p>When System admin logged in on the behalf of any other user. On upper right corner message is displayed that user is logged-in on behalf of some other user. In Visualforce page we can search for the element with class name present or not? If the element with that Class name exist means logged-in user is not a actual user.</p>
<hr />
<p><strong>114. How to get &#8220;https&#8221; link instead of &#8220;http&#8221; for Visualforce page using URLFOR() in Email Template ?</strong><br />
<strong> Ans:</strong> When you create the Link using URLFOR() in Email Template, it creates link in &#8220;http&#8221; format instead of &#8220;https&#8221; and thus causes end user to logged into salesforce again.</p>
<p>So instead of</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a href='{!URLFOR('/apex/SomePage', null, [id=Some_Object__c.Id,retURL=&quot;/apex/SomeOtherPage&quot;])}'&gt;Go to SomePage here!&lt;/a&gt;
</pre>
<p>We can use something like :</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a href='{!SUBSTITUTE(URLFOR('/apex/SomePage', null, [id=Some_Object__c.Id,retURL=&quot;/apex/SomeOtherPage&quot;]),'http:','https:')}'&gt;Go to SomePage here!&lt;/a&gt;
</pre>
<hr />
<p><span id="more-3042"></span><br />
<strong>115. What is the best way to check whether organization have PersonAccount enable or not using Apex?</strong><br />
<strong> Ans:</strong></p>
<p><strong>Method 1:</strong></p>
<pre class="brush: java; title: ; notranslate">
// Test to see if person accounts are enabled.
public Boolean personAccountsEnabled()
{
    try
    {
        // Try to use the isPersonAccount field.
        sObject testObject = new Account();
        testObject.get( 'isPersonAccount' );
        // If we got here without an exception, return true.
        return true;
    }
    catch( Exception ex )
    {
        // An exception was generated trying to access the isPersonAccount field
        // so person accounts aren't enabled; return false.
        return false;
    }
}
</pre>
<p><strong>Method 2:</strong></p>
<pre class="brush: java; title: ; notranslate">
// Check to see if person accounts are enabled.
public Boolean personAccountsEnabled()
{
    // Describe the Account object to get a map of all fields
    // then check to see if the map contains the field 'isPersonAccount'
    return Schema.sObjectType.Account.fields.getMap().containsKey( 'isPersonAccount' );
}
</pre>
<hr />
<p><strong>116 : When you get the error &#8220;Non-selective query against large object type&#8221;? how to resolve it?</strong><br />
<strong> Ans :</strong> Whenever an object has greater than 100K records any query on that object must be &#8220;selective&#8221;. For a query to be selective it must have enough indexed filters (where clauses) so that less than 10% of the records (in our example 10K) are returned before applying the limit statement.</p>
<hr />
<p><strong>117 : How to get the debug log of Connection user in salesforce to salesforce Integration?</strong><br />
<strong> Ans :</strong> When configuring Debug Logs, you cannot choose a Salesforce to Salesforce Connection User from the User Lookup, but there is a workaround to</p>
<p>achieve this.</p>
<p>To begin capturing Debug Logs for a Connection User open the following URL in your browser:</p>
<blockquote><p>https://XXX.salesforce.com/p/setup/layout/AddApexDebugLogUser?retURL=%2Fsetup%2Fui%2FlistApexTraces.apexp&amp;UserLookupInput_lkid=YYYYYYYYYYYYYY<br />
&amp;UserLookupInput=Connection%20User</p></blockquote>
<p>Replace XXX with your salesforce instance, UserLookupInput_lkid is the ID of the Connection User and UserLookupInput is the User name. You can find</p>
<p>the user ID of the connection user, by inspecting the CreatedById for a record created by this user. (eg. via eclipse or Force.com explorer)</p>
<p>Courtesy : <a title="Debug log for Salesforce to Salesforce" href="http://screenfields.nl/blog/2012/08/09/debugging-salesforce-2-salesforce/" rel="nofollow">http://screenfields.nl/blog/2012/08/09/debugging-salesforce-2-salesforce/</a></p>
<hr />
<p><strong>118 : In Controller extension, you are getting the error &#8220;SObject row was retrieved via SOQL without querying the requested field&#8221; while accessing the field of parent Custom Object or standard Object for which the Controller extension was written. How to resolve that?</strong><br />
<strong> Ans :</strong> In Constructor of the Controller extension, only Id of Custom Object is supplied. We need to query all the required field explicitly in order to use in remaining part of the code.</p>
<hr />
<p><strong>119: Using Apex how you can determine that user is in Sandbox or production?</strong><br />
<strong> Ans :</strong> <a title="Determine that user is in production or sandbox using Apex in Salesforce" href="http://www.michaelforce.org/recipeView?id=a0Ga000000Ekp65EAB" rel="nofollow">read this URL for answer</a></p>
<hr />
<p><strong>120: Can you use aggregate expressions inside inner query?<br />
Explanation &#8211; Can you use Group by clause inside inner query in SOQL?<br />
Example : Something like :</strong></p>
<pre class="brush: sql; title: ; notranslate">
 SELECT Id, Name,(SELECT Count(Id),Name FROM Contacts Group By Name Having count(Id) &gt; 1 ) FROM Account
</pre>
<p><strong>Ans: </strong> No. only root queries support aggregate expressions. Return type is List&lt;AggregateResult&gt; for above query However the root result expects List&lt;Account&gt; and there is no syntax or provision available in Salesforce to specify that child results are of type &#8220;<strong>AggregateResult</strong>&#8220;.<br />

<!-- iframe plugin v.2.7 wordpress.org/plugins/iframe/ -->
<iframe src="http://shivasoft.in/blog/SFDCInterviewList.php" height="100px" width="100%" scrolling="no" class="iframe-class" frameborder="0"></iframe></p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/salesforce/very-useful-tips-and-tricks-of-the-apex-salesforce-interview-questions-part-4/' rel='bookmark' title='Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex'>Latest Salesforce Interview Questions &#8211; Part 4 &#8211; Related to Dynamic Apex</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/explain-the-mvc-design-pattern-of-salesforce-com-interview-question/' rel='bookmark' title='Explain the MVC design pattern of Salesforce.com &#8211; Interview Question'>Explain the MVC design pattern of Salesforce.com &#8211; Interview Question</a></li>
<li><a href='http://shivasoft.in/blog/salesforce/life-cycle-of-visual-force-page-during-get-request-salesforce-interview-question/' rel='bookmark' title='Life Cycle of Visualforce page during GET Request- Salesforce Interview question'>Life Cycle of Visualforce page during GET Request- Salesforce Interview question</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/salesforce/salesforce-interview-question-part-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple guide to setup SSL in Tomcat</title>
		<link>http://shivasoft.in/blog/java/simple-guide-to-setup-ssl-in-tomcat/</link>
		<comments>http://shivasoft.in/blog/java/simple-guide-to-setup-ssl-in-tomcat/#comments</comments>
		<pubDate>Sat, 08 Sep 2012 19:31:49 +0000</pubDate>
		<dc:creator>jitadmin</dc:creator>
				<category><![CDATA[JAVA]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[Servlet]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://shivasoft.in/blog/?p=3070</guid>
		<description><![CDATA[I have enabled SSL in tomcat many times however initially I struggled to get it in running condition. So I thought to share a simple approach I am following now days. Step 1: Run tool “Keytool” provided by the JRE to create a “keystore file”. The command to run tool is: keytool -genkey -alias tomcat [...]<div class='yarpp-related-rss'>

Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/java/how-to-start-the-tomcat-in-debug-mode-for-debugging-in-eclipse/' rel='bookmark' title='How to start the tomcat in debug mode for debugging in eclipse'>How to start the tomcat in debug mode for debugging in eclipse</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">I have enabled SSL in tomcat many times however initially I struggled to get it in running condition. So I thought to share a simple approach I am following now days.</p>
<p><strong>Step 1:</strong></p>
<p>Run tool “<strong>Keytool</strong>” provided by the JRE to create a “keystore file”.<br />
The command to run tool is:</p>
<blockquote><p>keytool -genkey -alias tomcat -keyalg RSA -keystore D:/.keyStore</p></blockquote>
<p>Where “D:/.keystore” is the path where file should be created.<br />
Instead of alias “tomcat” any other name can be used.<br />
After running above command, you will be asked many questions, so answer them correctly as shown in below image:</p>
<div id="attachment_3071" class="wp-caption aligncenter" style="width: 637px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Tomcat-SSL-keytool-to-create-keystore-file.png"><img class="size-full wp-image-3071" title="Tomcat SSL keytool to create keystore file" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Tomcat-SSL-keytool-to-create-keystore-file.png" alt="Tomcat SSL keytool to create keystore file" width="627" height="319" /></a><p class="wp-caption-text">Tomcat SSL keytool to create keystore file</p></div>
<p>Remember the password provided, as it will be needed in next step.<span id="more-3070"></span></p>
<p><strong>Step 2:</strong></p>
<p>Now, in next step go to “conf” folder of tomcat, and open file “server.xml”.<br />
There you will find lines of code something like:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 --&gt;
&lt;!--
&lt;Connector
           port=&quot;8443&quot; minProcessors=&quot;5&quot; maxProcessors=&quot;75&quot;
           enableLookups=&quot;true&quot; disableUploadTimeout=&quot;true&quot;
           acceptCount=&quot;100&quot; debug=&quot;0&quot; scheme=&quot;https&quot; secure=&quot;true&quot;;
           clientAuth=&quot;false&quot; sslProtocol=&quot;TLS&quot;/&gt;
--&gt;
</pre>
<p>So, to enable the SSL, uncomment above code and tweek like below:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;Connector
	protocol=&quot;org.apache.coyote.http11.Http11Protocol&quot;
	port=&quot;8443&quot; maxHttpHeaderSize=&quot;8192&quot;
    maxThreads=&quot;150&quot; minSpareThreads=&quot;25&quot; maxSpareThreads=&quot;75&quot;
    enableLookups=&quot;true&quot; disableUploadTimeout=&quot;true&quot;
    acceptCount=&quot;100&quot; scheme=&quot;https&quot; secure=&quot;true&quot;
    clientAuth=&quot;false&quot; sslProtocol=&quot;TLS&quot;
	keystoreFile=&quot;F:\eclipse\Frameworks\apache-tomcat-5.5.31 - SSL Configured\.keyStore&quot;
	keystorePass=&quot;YOURpwd&quot;/&gt;
</pre>
<p>As you can see, I have added few more attributes like:</p>
<p style="text-align: justify;"><strong>Protocol :</strong> If the APR (<strong>Apache Portable Runtime</strong>) is enabled in tomcat (maximum time it is enabled by default), then this approach will not work. so configure tomcat that we want to use Java (JSSE) connector, regardless of whether the APR library is loaded or not.<br />
<strong>keystoreFile :</strong> Full path of the keystore file creates in step 1.<br />
<strong>keystorePass:</strong> Password used while creating file in step1.</p>
<p style="text-align: justify;">After these changes, save Server.xml and navigate to: https://localhost:8443/ , As you can see in below image, SSL is enabled.</p>
<div id="attachment_3072" class="wp-caption aligncenter" style="width: 333px"><a href="http://shivasoft.in/blog/wp-content/uploads/2012/09/Https-protocol-in-Tomcat-SSL-ENabled.png"><img class="size-full wp-image-3072" title="Https protocol in Tomcat - SSL Enabled" src="http://shivasoft.in/blog/wp-content/uploads/2012/09/Https-protocol-in-Tomcat-SSL-ENabled.png" alt="Https protocol in Tomcat - SSL Enabled" width="323" height="437" /></a><p class="wp-caption-text">https protocol in Tomcat &#8211; SSL Enabled</p></div>
<p style="text-align: justify;">Now, as you can see, although we have created SSL certificate for local server, browser is showing that it is not secured.</p>
<p style="text-align: justify;">SSL verifies the authenticity of a site&#8217;s certificate by using something called a &#8220;chain of trust,&#8221; which basically means that during the handshake, SSL initiates an additional handshake with the Certificate Authority (CA) specified in your site&#8217;s certificate, to verify that you haven&#8217;t simply made up your own CA (Which actually we have done in our case <img src='http://shivasoft.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<p style="text-align: justify;">If you want to remove error, you have to get certificate from some Certificate Authority so that during handshake, accuracy of your certificate can be validated.<br />
If you have valid certificates then please <a title="Enabling SSL certificates in Tomcat" href="http://www.mulesoft.com/tomcat-ssl ">read this article</a>.</p>
<!-- Start Shareaholic Recommendations Automatic --><!-- End Shareaholic Recommendations Automatic --><div class='yarpp-related-rss'>
<p>Possibly Related posts:<ol>
<li><a href='http://shivasoft.in/blog/java/how-to-start-the-tomcat-in-debug-mode-for-debugging-in-eclipse/' rel='bookmark' title='How to start the tomcat in debug mode for debugging in eclipse'>How to start the tomcat in debug mode for debugging in eclipse</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shivasoft.in/blog/java/simple-guide-to-setup-ssl-in-tomcat/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
