How to call Rest Service using OAuth REST API ?

We created a REST Service in Salesforce in our previous blog, and now we want to call the REST service from another application. Salesforce DO NOT allow using Basic Authentication (Username & Password) for incoming REST calls. This is still true even if you are calling from another Salesforce instance.  We have to use OAuth to authenticate…

How to create and use Apex Rest Services in Salesforce ?

The Force.com REST API lets you integrate external system with Force.com applications using simple HTTP methods, in either XML or JSON formats, making this an ideal API for developing mobile applications or third party applications. Following are the benefits of using the REST API in your integrations: Easy Access: Use standard HTTP method call-outs, available on…

How to write test class for Batch Apex in Salesforce ?

We should always test batch class with good amount of data (minimum 200 records) in our test class. Here is the example of batch apex testing. In below code, we are updating name of all accounts with “Updated” keyword in the last of account name. Batch Class: global class AccountUpdate implements Database.Batchable { global Database.QueryLocator…