List of IDE available for Salesforce coding

1. Force.com IDE (Eclipse)

This was first and official IDE from Salesforce and enjoyed monopoly as one and only IDE for many years.
The Force.com IDE is a powerful client application for creating, modifying and deploying Force.com applications. Based on the Eclipse platform and built on the Tooling API, the Force.com IDE provides a comfortable environment for programmers familiar with integrated development environments, letting you code, compile, test, package, and deploy all from within the IDE. Much of the actual work, such as compilation, happens on the Force.com platform—the Force.com IDE performs the communication and result parsing transparently.
The Force.com IDE is open-source and you can download the source code on GitHub.

Force.com IDE

Force.com IDE

Continue reading

using cURL with Salesforce Rest API

Workbench is one of widely used tool in Salesforce when it comes to exploring REST API of Salesforce. However I wanted to export REST API response in Binary format and therefore used cURL. cURL is open source command line library mostly used to test http request. It can be downloaded from here and official documentation about how to use cURL can be referred from here.

To use cURL with Salesforce REST API, we will need to use username – password flow of OAuth2. To use OAuth2, we need to create connected App. You can check “Create Connected app” section of this post. You can enter any URL for callback or if you have already created any connected app in past, then it can be used. After creating connected app, note “Consumer key” and “Consumer Secret” somewhere.

create file “LoginInfo.txt” file which will have all required login information in URL encoded format

grant_type=password& client_id= 3MVG9iTxZANhwsdsdsdsdspr0Lu3QNRNKk4c2FejzTys5Mlp43UeSHBuhWWgRjEUyV6xE7N0GostjR3sRat & client_secret=21961212323233121943 & username=jitendra.zaa@demo.com & password=myPWDAndSecurityToken

make sure there is no space in above file. I have added some space for sake of readability.

grant_type=password informs Salesforce to use “Username and password” flow of OAuth2, We are also passing client_id, client_secret, username and password. Continue reading

Barcode scanner component in Salesforce lightning – Video

This post is rewritten of previous post for decoding Barcode using JavaScript in Salesforce1 mobile application. Assuming you already have static resource of javascript library  QuaggaJS (we need only js file from dist folder).

This code was written live on my streaming channel on 10-Jul-2015, You can find recording here.

Barcode Scanner Lightning App

Barcode Scanner Lightning App

I have not added capability for image preview like I did in previous did, but it can be easily done by referring this blog post from Peter Knolle.

Continue reading

Javascript based Barcode decoder in Salesforce1 – Very fast and Simple

Recently there was a need for Barcode decoder  component in Salesforce1 using Javascript. I tried few libraries like JOB (Javascript Only Barcodereader), this post from Bob Buzzard (it uses JOB library) and QuaggaJS. And after comparing all these, decided to go with quaggajs library because of its speed. Bob Buzzard already wrote very good article on JOB library and I would suggest to try that code as well. You can find same code rewritten for lightning component here.

Quaggajs supports Code 128Code 39, Code 39 VIN, EAN, EAN-8UPC, UPC-E and Codabar format of Barcode.

To run this code you will need 3 static resources in your visualforce page :

  1. JQuery
  2. Bootstrap (totally optional and can be safely ignored) and
  3. QuaggaJs

If you want, below images can be used to try this code. Also, please note – If you are using mobile camera to capture barcode, make sure image is white else this library will not work.

Barcode decoder sample in Salesforce 1

Barcode decoder sample in Salesforce 1

Barcode decoder sample in Salesforce 1

Barcode decoder sample in Salesforce 1

Continue reading

Compilation of resources to learn Lightning Components in Salesforce

  1. Lightning Component developers guide
  2. Salesforce style Bootstrap CSS
  3. Lightning Components tutorial on trailhead
  4. Basics of Lightning components by Jitendra
  5. Building lightning components in Spring 15 by Jeff Doughlas
  6. Pure Javascript based Collapsable panel component by Jitendra
  7. Search bar and contact list component in Lightning by Salesforce
  8. Working with controllers by Peter Knolle
  9. Handling custom events in Lightning Component by Peter Knolle
  10. Debugging Lightning Components by Peter Knolle
  11. Extending Lightning Components by Peter Knolle Continue reading

Become expert in formulas – Salesforce Video Newsletter – July 2015

Below are short videos on how to get things done in Salesforce from documentation and user interface team.

Formulas

Formulas are very powerful. They can help you to do everything from pulling informations from parent to child objects or caluclate something on basis of other field present on same record or parent record. Below are list of videos to make you more productive on formula.

Continue reading

Most frequently used code snippets for Salesforce Developers – FAQ part 21

201. Common Apex page attributes.

<apex:page sidebar="false" standardStylesheets="false" showHeader="false">

202. Declare Visualforce page as HTML5.

<apex:page docType="html-5.0" />

203. Visualforce page output as JSON.

<apex:page controller="ControllerName"  contentType="application/x-JavaScript; charset=utf-8" showHeader="false" standardStylesheets="false" sidebar="false">
{!jsonString}
</apex:page>

Continue reading

My favorite AppExchange products

Free

Continue reading

Advance Apex debugging in Salesforce and best practices – Videos

While developing applications on Force.com platform using Apex, I am sure you may have been in need of debugging your code. Salesforce being cloud platform, method to debug code is very different as compared to other programming languages. In this post we will discuss all about Apex code debugging, challenges, solutions and other best practices.

Salesforce Advance Apex debugging

Salesforce Advance Apex debugging

How many ways to debug Apex code

  1. Eclipse Force.com IDE
  2. Debug log
  3. Developer console
  4. Fetch debug log using Tooling API

Continue reading