Category: sfdc developer

What is Workbench Salesforce ?

What is Workbench Salesforce ?

Workbench Salesforce is a powerful, web-based suite of tools designed for Salesforce administrators and developers to interact with organization via APIs. Using Salesforce Workbench, administrators and developers can quick view their organization’s data, Data Loading, can perform SOQL Query, SOSL search, session settings, test, deploy and troubleshoot their own application.

How to login Workbench Salesforce?

There are different ways that we can login Salesforce Workbench. Workbench supports standard username / password login, we can login with a session id and using OAuth 2.0 remote access login. Salesforce users can also use firefox browser extension to use  Salesforce Workbench.

  • Workbench Salesforce login URL :
  • Login to Workbench Salesforce using account credentials.
  • Select your Environment as Production or Sandbox.
  • Select I agree to the terms and conditions.
  • Now click on Login with Salesforce.

Workbench Salesforce

  • After login to Workbench Salesforce successfully, the pages allows Salesforce user to jump to different options like Standard and Custom objects, Metadata Type and components, SOQL query, SOSL search, Insert, Update, Upsert, Delete, Insert, Undelete, Purge, deploy, retrieve and many more.

Workbench Salesforce

  • Select any one from the options and select object from the list. Here we will select Standard & Custom objects.

Workbench Salesforce

In this Salesforce tutorial, we will learn how to get session information, how to build SOQL query in Workbench Salesforce, How to create, update, delete records using Apex execute and how to reset password using Workbench Salesforce.

 Session Information.

System administrators can cancel user sessions in Salesforce. Session Information in Workbench displays details about current user session like Connection, Accessibility mode, profileId, Session seconds valid,user Email, user FullName, UserLocale, UserType and many more.

Session information

How to perform SOSL search in Workbench Salesforce?

SOSL stands for Salesforce Object Search language. Using SOSL search we can search text based search queries against the search index. So how to perform SOSL search in Workbench Salesforce? Follow the steps given below.

  • Navigate to Queries | SOSL Search.

SOSL search in workbench Salesforce

As shown in above SOSL search, we searched for Prasanth in the Lead Object in the Name field. When we click on Search. List of all results will be returned as shown above.

How to execute Apex code in  Salesforce Workbench?

Salesforce Workbench

You can also create new objects from SOQL queries on existing ones. The following example creates a new contact for the first account with the number of employees greater than 10. Note that the newly created object contains null values for its fields, which will need to be set.

How to reset password in Workbench Salesforce?

Salesforce login password can be set and can be reset using Workbench in Salesforce. Follow the steps given below.

password reset in Workbench Salesforce

  • Click on Utilities and select password management link.
  • Now select Set or Rest.
  • Click on Change Password button.

Salesforce Governor Limits PDF download

Salesforce Governor Limits  | List of Governor Limits in Salesforce.

In this Salesforce developer tutorial we are going to learn about Salesforce Governor Limits, Limitations of Salesforce Governor Limits and how to set up governor limit email warning in Salesforce?

What is a Governor Limit in Salesforce?

Salesforce Governor Limits are the run time limits that are apply in order to have some performance to the database since it runs on multi tenancy environment.

List of Salesforce Governor Limits.

  • Only one batch apex job’s start method can run at a time in an organization.
  • Up to 5 queued or active batch jobs are allowed for apex.
  • Maximum 2,50,000 batch apex method executed per a 24 hour period.
  • The batch apexstart method can have up to 15 query cursors open at a time per user.
  • Maximum of 50 million record can be returned in the database. Querylocator object.
  • Maximum number of SOSL Queries – only 20.
  • Maximum number of SOQL Queries – 100.
  • No of DML statements – 150.
  • No of record written by a query – 50000.
  • maximum number of DML rows – 10,000.
  • Maximum number of script statements – 2,00,000.
  • Maximum heap size – 6MB.
  • Maximum number of call outs – 10.
  • Maximum number of future calls – 10.
  • Maximum number of picklist describe – 10.
  • Maximum number of record type describe – 100.
  • Maximum number of relationship describe – 100.
  • Maximum number of fields describe – 100.
  • Maximum number of Email invocations – 10.

Note :- If we have 1000 records with scope of 200 records then they are divided into 5 batches.


  • Methods declared as future aren’t allowed in the classes that implement Database. Batchable interface.
  • Methods declared as future can’t be called from Batch Apex class.
  • For sharing recalculations, we recommend that the execute method delete and then re-create all Apex manages sharing for the records in the batch.

How to Overcome Governor limits in Salesforce?

To overcome Salesforce Governor Limits a special care must be taken while writing code.

  1. Never make any SOQL and DML operation inside the loop.
  2. Use les number of script statements.
  3. Use batch apex, when working with above 50000 records.
  4. Use @future.
  5. Use Batch Apex.
  6. Use Annotations.
  7. Use for loop.
  8. Using ‘in’ clause.

How to set up governor limit email warning in Salesforce?

We can specify user’s to receive an email notification when they invoke Apex code that surpasses 50% of allocated Salesforce Governor Limits. Follow the steps given below to set up governor limit email warning in Salesforce.

  • Go to Setup | Administer | Manage users | Users | Edit

Salesforce Governor limits

To activate send Apex Warning Emails check box user must have administrator profile. If not we can not activate send Apex warning Emails in Salesforce.

Click here :- Download list of Governor limits in Salesforce PDF file.