How to start learning Salesforce – Trailhead is good answer

In last 3-4 years, Salesforce is well known cloud computing platform between IT professionals and fresh college graduates. Dreamforce, well known for largest conference on planet breaking its own record every year. Salesforce is also top Innovative company in world as per forbes.

Change is inevitable – well adapted by Salesforce. Unlike traditional languages, Admins and developers needs to be updated every four months with each release. Many system limitations we know get addressed in next release. It has many products like Sales Cloud, Service Cloud, Force.com, Data.com, Marketing cloud, Analytics cloud and very easy to lost in those sections.

I been working on Salesforce from last 6 years and questions regarding how to start with Salesforce is increasing day by day.

Salesforce knows that “With great power comes great responsibility” and they already started to address this Developer/Admin adaption problem with introduction of Trailhead.

What is Trailhead ?

In my words, “Trailhead is innovative training application developed and maintained by Salesforce which supports realtime module assignment validations and Trailhead badges on public profile”. It is getting updated with new contents and challenges frequently.

Why should our company start using Trailhead for training and why buzz every where ?

It checks module completion exercises realtime using ToolingAPI to confirm if trainee has really completed assignment or not? After completion of each module user will be awarded with points which will be visible on public profile.

I would suggest everyone who wants to learn Salesforce to complete module and showcase their Trailhead profile as a proof confirming completion of modules.

Questionnaire at end of modules

This is recently added modification Salesforce team has introduced in Trailhead. Who doesn’t likes to validate their understanding ? At end of each module, now we have to answer questions to earn points of modules, and it supports multi-choice also.

Continue reading

Salesforce FAQ – Part 20 – Lightning Questions

191. Why do we still need Visualforce once Lightning will be GA ?
Ans : Visualforce provides the facility for delivering template-driven web pages and email messages. In addition, developers wishing to simply utilize a basic container and maintain more control over the lifecycle of the request may choose Visualforce pages. Finally, organizations that can’t use Apex code can’t use Lightning Components, but they can use Visualforce.


192. What is difference between Visualforce Components and Lightning Components ?
Ans : Visualforce provides the facility for delivering template-driven web pages and email messages. In addition, developers wishing to simply utilize a basic container and maintain more control over the lifecycle of the request may choose Visualforce pages. Finally, organizations that can’t use Apex code can’t use Lightning Components, but they can use Visualforce.


193. Currently, can you show Lightning components tab in Mobile as well in desktop ?
Ans : Currently you can only use Lightning Components in the Salesforce1 Mobile App or a standalone app. Continue reading

Generating Single Executable jar file with all dependencies and libraries using Netbeans and Eclipse

Generating Single Jar file with all dependencies in Eclipse is easy. We just need to follow below steps :

  1. Either from the context menu or from the menu bar’s File menu, select Export.
  2. Expand the Java node and select JAR file. Click Next.
  3. In the JAR File Specification page, select the resources that you want to export in the Select the resources to export field.
  4. Select the appropriate checkbox to specify whether you want to Export generated class files and resources or Export Java source files and resources. (Note: Selected resources are exported in both cases.
  5. If there are other files or resources you want to include they must be in a an open project. Browse to their location via the directory tree on the left and ensure the file or resource is checked in the window on the right.
  6. In the Select the export destination field, either type or click Browse to select a location for the JAR file.
  7. Select or clear the Overwrite existing files without warning checkbox. If you clear this checkbox, then you will be prompted to confirm the replacement of each file that will be overwritten.
  8. Click Finish to create the JAR file immediately.
  9. Now, navigate to the location you specified for the jar. The icon you see and the behavior you get if you double click it will vary depending on how your computer is set up.
  10. You can use this article for images and more detail.

Continue reading

Salesforce Spring 15 – some highlighted features

Download PDF version of release notes from here.

1. Import Account / Contact from 16 different sources (previously generic csv was only option to import).

Import Account Contact in Salesforce - 16 sources

Import Account / Contact in Salesforce – 16 sources

2. Salesforce Analytics Query language (SAQL)
We already know about SOQL and SOSL. This is new Query language for Analytics cloud to enable ad hoc analysis of data stored in dataset. This is still in pilot.

3. Enhanced version of “Notes”

In this release, Salesforce has released new version of notes, which has many advantages over old like Create Standalone Notes, Relate same notes to multiple records, include bullet or numbered list, search only on notes, Create tasks from notes, Report on notes.

To enable Notes – Build | Customize | Notes | Settings | Enable Notes.

Salesforce Spring 15 Notes

Salesforce Spring 15 Notes [Click to enlarge]

 As you can see in image3, new Notes can relate to multiple records. Continue reading

Automate Command Line Dataloader using ANT with Dynamic arguments and SOQL query

As we know, there are multiple ways to load data inside Salesforce like using Workbench, Jitterbit, API etc… Salesforce also provides standard tool to load data into Salesforce using DataLoader. Dataloader by default supports User Interface or Command Line interface. Most of us already know that User interface based Dataloader needs manual interaction by end user. However if you want to automate data related operations, better choice would be Command Line Data Loader. Assuming you already have basic knowledge about how CLI Data loader works, I will go more advance in this article.

Automate Command Line Data Loader

Automate Command Line Data Loader

Following are basic steps for CLI Dataloader :

  1. Download and install DataLoader
  2. Generate Secret key file
  3. Generate Password on basis of Secret key generated
  4. Create “Process-conf.xml” (here is the problem)
  5. Create field mapping (sdl) file if required
  6. Execute Data loader from Command line

Continue reading

Salesforce – Drag and Drop File Uploader Component with Progress Bar – HTML5 and Pure Javascript Based

HTML5 Drag And Drop File

HTML5 based Drag And Drop File

You may find many ways to upload attachments in Salesforce using visualforce however most of them uses some Javascript libraries (means either you need to depend on static resources or add CDN in remote site settings) or they do not have progress bar or they are not drag and drop. I thought to create one simple Visualforce component which can show progress bar and have drag and drop capabilities.

Initially i gave though to use visualforce remoting however challenge was how to show progress bar and same challenge was with custom controller or extension also. So, i decided to create one simple Apex REST API to upload attachment.

Continue reading

Salesforce FAQ – Part 19

181. Lets consider your custom Object named “Training__c” has field “Trainer__c”. You have set some default value in that field. Will that default value apply to new record created by apex code ?
OR
How to make sure that record created from apex code should respect default value of fields ?
OR
Default value in field from Apex code.
Ans :

After API 20, it should automatically populate However there is known issue for same here, click here if it impacts you.
Workaround :
If Default value of field is not getting populated by Apex then we have to use “Dynamic Apex”.  Create instance of object from sObjectType like shown below:

Training__c tr= (Training__c) Training__c.sObjectType.newSObject(null, true);

//Check if Value in field "Trainer__c" is default value
System.assertEquals('Jitendra', tr.Trainer__c);

182. What is best practice to refer dynamic custom messages in Visualforce with multi-language support ?
Ans :
Using Custom Label or OutputField or InputField tag, Platform itself will take care of internationalization. However in some cases, Message needs to be dynamic at the same time it should also support muti-language. In Custom Label, we cannot save dynamic String.

Let’s assume we want to show message something like “DEVELOPERNAME is not authorized to access this page”.
Here, Developername should be dynamically changed in visualforce which supports multilanguage. For each developername, it is not feasible to create custom labels. So below workaround can be used :

Step 1 : Create a Custom Label with text “{0} is not authorized to access this page“. In every language, dynamic value should represented by {0}.

Step 2 : In Controller of Visualforce write something like this :

String developerName = 'Some DeveloperName';
String message = String.format(Label.DEVELOPERNA, new String[] { developerName });

Continue reading

Access Camera and Audio recorder of Mobile device in Visualforce and upload as chatter file

In this article we will see how to use Camera and Audio recorder of mobile device in Visualforce and upload as chatter file. It may look that it is very tricky to access device camera and audio control in Visualforce however you may be right if there were no HTML5. Thanks to HTML5 for magic.

Visualforce Camera Access - Front Page

Visualforce Camera Access – Front Page

Visualforce Camera Access - Use Camera Prompt

Visualforce Camera Access – Use Camera Prompt

Continue reading

Why to use Bower for your web developement

What is Bower
It is client side package Manager and Great tool to manage all you web dependencies like JavaScript libraries and other assets.

Bower

Bower

What can be done from Bower
Web sites are made of lots of things — frameworks, libraries, assets, utilities, and rainbows. Bower manages all these things for you.

# registered package
$ bower install jquery

# GitHub shorthand – download repository SOQLBuilder from user Jitendra on Git
$ bower install JitendraZaa/SOQLBuilder

# Git endpoint
$ bower install git://github.com/user/package.git

# URL
$ bower install http://somewebsiteURL.com/script.js

Continue reading