How to get started with Salesforce development

November 14, 2014 Leave a comment

Setting up Developer Environment

  1. Register developer account at https://developer.salesforce.com/
  2. You can login your org from http://www.salesforce.com/
  3. Install Salesforce IDE for eclipse https://developer.salesforce.com/page/Force.com_IDE_Installation

Understand the different Salesforce Environment

Developer ,Sandbox, Production

Deployment

 Deployment by Changeset Best practice

CI and team development with Salesforce

How To Use Git, GitHub and the Force.com IDE with Open Source Labs Apps

Using Force.com with Subversion for Team Development

http://www.soliantconsulting.com/blog/2013/03/salesforcecomforcecom-team-development

http://salesforce.stackexchange.com/questions/18881/how-to-use-git-on-multi-dev-environment

Deployment is a one-way transaction

There is no easy way to roll back changes deployed in Production. As documented here . It is another reason we should look at the next support level. A change set is deployed in a single transaction. If the deployment is unable to complete for any reason, the entire transaction is rolled back. After a deployment completes successfully, all changes are committed to your organization and the deployment can’t be rolled back.

Salesforce known issues

https://success.salesforce.com/issues_index

Salesforce Books

  1. Salesforce workbook
  2. Cheat Sheets
  3. Documentation

Videos Training

  1. Search for Dreamforce from YouTube , Dreamforce is the salesforce conference , like the Teched in Microsoft.
  2. Pluralsight offer some good developer training
  3. cbtnuggets offers Power user training
  4. Beginner Tutorials
  5. http://www.forceprepare.com/

Blogs

http://www.shellblack.com/blog/

http://blog.jeffdouglas.com/

Documentations from Salesforce

Considerations for Relationships

Salesforce Limit

Understanding Encrypted Custom Fields

Encrypted Field Limits

How to change xmx in SoapUI

November 4, 2014 Leave a comment

Recently, I have to run some integration test using SoapUI. Due to the test file size , I got the error (the memory setting is too low). To fix this , I have to change the xmx from the default 2048m to 4096m.

Update soapui xmx settings:

Make sure you back-up the file before you change the default settings and open file as administrator.

1. Update testrunner.bat for running in command line

testrunner.bat is the Soap UI batch file. It is located in C:\Program Files\SmartBear\SoapUI-Pro-5.0.0\bin (Soap UI Pro 5.0.0 default installation location) Update the Xmx setting in this file before starting the test suite (open file as Administrator).

2. Update SoapUI-Pro-5.1.2.vmoptions for running using UI

SoapUI-Pro-5.1.2.vmoptions is the Soap UI configuration file. It is located in C:\Program Files\SmartBear\SoapUI-Pro-5.0.0\bin (Soap UI Pro 5.0.0 default installation location) Update the Xmx setting in this file before starting the test suite (open file as Administrator).

References:

Java Doc

-Xmxn
Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. The upper limit for this value will be approximately 4000m on Solaris 7 and Solaris 8 SPARC platforms and 2000m on Solaris 2.6 and x86 platforms, minus overhead amounts. Examples:

-Xmx83886080

-Xmx81920k

-Xmx80m

So, in simple words, you are saying Java to use Maximum of 1024 MB from available memory.

Notice there is NO SPACE between -Xmx and 1024m

Categories: SharePoint Tags: , , ,

How to fix the issue Unrecognized attribute ‘targetFramework’.

October 2, 2014 Leave a comment

Issue:

Recently, I am having issues with deploying asp.net mvc 4 application to Windows Server 2008 R2.After add the necessary role and features and I setup an application in IIS. However , I received the following error message: Unrecognized attribute ‘targetFramework’.

Solution:

It turns out that this is because App pool is not configured to use .net 4.0, after changing from .net 2.0 to .net 4.0. It works like a charm.


Note if .net v4.0x does not show up under .NET Framework version dropdown, you can need to install .net or re-register .NET 4 with IIS, you can check my previous blogpost to learn how to do it.

Salesforce deployment best practice?

October 1, 2014 1 comment

I am very new to Salesforce and as you can see from my blog, I am .Net developer and more specifically a SharePoint developer. In salesforce , there is no clear strategy for release management and I am asking the wider Salesforce community to help me to see if the proposed release plan is OK.

The current deployment model we use are multiple Sandbox environments and changeset to deploy change from Dev >> Test>>Preprod>>Prod . Here are the challenges I understand so far in Salesforce deployment.

  1. You cannot rollback after a changeset is successfully deployed
  2. Creating changeset is very manual

To address the first issue (You cannot rollback after a changeset is successfully deployed):

  1. Backup the data by scheduling a weekly data export (my question would be , how we can use the data export to restore the data)
  2. Backup the apex code (trigger, visual force…), we can use eclipse to deploy these changes so that the apex code can be rolled back.
  3. Document all the schema changes(custom object, custom fields, custom labels, tabs …) , if we do need rolled back we can manually delete all those changes..

To address second issue (Creating changeset is very manual)

We are looking at using Salesforce IDE or Salesforce migration tool to deploy the changes from environment to environment.

Reference:

Deploy Force.com Applications to Production Faster,

Using the Force.com IDE to Deploy Apex

How to fix: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

July 21, 2014 Leave a comment

Issue:

Recently, I am having issues with deploying asp.net mvc 4 application to Windows Server 2008 R2.After add the necessary role and features and I setup an application in IIS. However , I received the following error message: PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

 


Solution:

It turns out that this is because ASP.Net was not completely installed with IIS even though I checked that box in the “Add Feature” dialog.

 

To fix this, I simply ran the following command at the command prompt

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

If I had been on a 32 bit system, it would have looked like the following:

%windir%\Microsoft.NET\Framework\v4.0.21006\aspnet_regiis.exe –i

 

References:

http://stackoverflow.com/questions/6846544/how-to-fix-handler-pagehandlerfactory-integrated-has-a-bad-module-managedpip

Salesforce deployment guideline using Sandbox

July 10, 2014 Leave a comment
  1. Create Deployment connection
  2. Enable the inbound change set settings on the destination Environment you would like to deploy the solution to.
  3. Enable the outbound change set settings on the source Environment where you package your application.
  4. The best practice is to Package everything in the changeset and salesforce will only deploy the change into your destination environment. If you only package the change, you could miss some of the changes.
  5. You can clone the change set on the source destination however the initial packaging takes some time as you need to go through everything and select the components manually.
  6. After the change set is packaged, you need to upload the chagneset so that destination environment can see the change set in its incoming change set list.
  7. Click Validate the change set before deployment.

References:

Development Lifecycle Guide

Change Sets Best Practices

 

 

How to replace the SharePoint date calendar control with more user friendly jQuery calendar control

April 26, 2014 1 comment

When you use the SharePoint date and time type for date of birth field, you will notice that the calendar control is extremely non-user-friendly. You can only navigate month by month as shown below. To resolve the issue, you can customize the list form page using SharePoint designer and replace the OOB calendar control with popular jQuery control. The solution works for both SharePoint 2010,2013 and office365.

Here are the steps for how to achieve this.

1. Open SharePoint designer and create a New List Form called customNew and set as default form for the selected type.

2. Open style library in file explorer and copy jQuery and jQuery UI files into the style library in SharePoint site.

You can download the jQuery and jQuery UI from the web and the content of the contactPersonCustomNewForm.js is as below. I use the dd/mm/yy format as my locale in Regional Settings is English(New Zealand). You need to change this if you live in another country with different date format

$(document).ready(function() {
    	$("img#ctl00_m_g_540b9a50_52dc_4400_a58d_1db99555fddf_ff41_ctl00_ctl00_DateTimeField_DateTimeFieldDateDatePickerImage").parent().hide();
 		$("img#ctl00_m_g_540b9a50_52dc_4400_a58d_1db99555fddf_ff41_ctl00_ctl00_DateTimeField_DateTimeFieldDateDatePickerImage").hide();
	    $("input#ctl00_m_g_540b9a50_52dc_4400_a58d_1db99555fddf_ff41_ctl00_ctl00_DateTimeField_DateTimeFieldDate").datepicker({
		    changeMonth:true,
		    changeYear:true,
		    showOn: "button",
			buttonImage: "/_layouts/images/calendar.gif",
			buttonImageOnly: true,
			defaultDate:"01/01/1970",
			yearRange: "c-20:c+20",
			dateFormat: "dd/mm/yy"
	    });
});

In order to get the image and textbox selector above , you can open IE developer toolbar(click F12) and find the control ID as below:

3. Open SharePoint designer and edit the newly created New List Form customNew.aspx in advance mode. Then copy and paste the following links in the PlaceHolderAdditionalPageHead.

	<SharePoint:CssRegistration name="<%$SPUrl:~SiteCollection/Style Library/themes/ui-lightness/jquery-ui.css%>" runat="server"/>
	<SharePoint:ScriptLink language="javascript" name="~sitecollection/Style Library/jquery-1.10.2.js" Defer="false" runat="server"/>
	<SharePoint:ScriptLink language="javascript" name="~sitecollection/Style Library/jquery-ui-1.10.4.custom.min.js" Defer="false" runat="server"/>
	<SharePoint:ScriptLink language="javascript" name="~sitecollection/Style Library/contactPersonCustomNewForm.js" Defer="false" runat="server"/>

 

4. Now go to the list and click add, you will see the new calendar control as shown below

Follow

Get every new post delivered to your Inbox.

Join 176 other followers