Everything to know about SFDC Workbench

Everything to know about SFDC Workbench

In this blog, we will explore everything to know about SFDC Workbench from what it is, to how to use it and why it’s a great tool in the Salesforce ecosystem.

Salesforce is a platform which provides us with a wide range of tools for developers and administrators to manage its environment. One of the tools is SFDC Workbench which is quite similar to Data Import Wizard, and Data Loader.

Whether you are an experienced developer or just getting started, understanding how to use Workbench can significantly streamline your workflow and enhance productivity.

What is SFDC Workbench?

SFDC Workbench is a potent web-based tool. Developed by Ryan Brainard. It interacts with the Salesforce organization by allowing us to perform various database operations. Also, it helps us to run SOQL, and SOSL queries, manage metadata, test APIs, and much more.

If you have worked on other Salesforce Data management tools, you will realize it is quite better. Below are the reasons why SFDC Workbench stands out around other Salesforce Data Management tools:

1. Data Import Wizard which doesn’t support Opportunities and also does not let you perform delete however Workbench gives us those benefits.

2. It is very fast and has a user-friendly interface which makes it more efficient and easy to use.

3. It is capable of performing operations on bulk records of up to 5 Million.

How to log in to Salesforce Workbench?

Step 1: To log in to Workbench click here

Salesforce workbench login page

Step 2: In the Environment drop-down, you have two options: Production and Sandbox. So, you have to choose accordingly. Then check the terms and conditions checkbox. Click on the Login with Salesforce button. If you don’t have an active session, it will redirect you to the Salesforce login page.

Here, I want to connect my developer edition org, so I have chosen Production because it will redirect you to the login.salesforce.com page.

Then you have to click allow to give workbench permission to connect with your org.

Allow Workbench

 

Now, we are all set with login. Below will be the next page on your screen with a Jump option with the drop-downs where you can select the actions you want to perform.

Action page

Additionally in the menu bar also we have options available. If you hover over each icon, then it contains different actions on them.

Different options

 

Now let’s talk about the actions available in Salesforce Workbench

Standard & Custom Objects

Here we have one option available as Standard & Custom objects which display information about your objects such as fields, record types, child relationships, attributes and many more.

Standard & Custom object

When you hit the select button, below will be a page shown to you which displays various details about your object. If you expand those you can check the details. Like in Attributes, it will show you the object details such as plural label, label, API Name, edit, update, and create URL specific to the object.

options in stan and custom

 

Metadata Types and Components

This option will display the details regarding your metadata in the system. When you select the option, it will take you to the page where you can select which component details you want to check. Below is the screenshot of the different options available to us. Here, we have selected the Apex Class.

 

metadata types option

 

Select the option and then you can expand the component to check the list of your data.

SOQL Query

With this option, we can perform SOQL (Salesforce Object Query Language) most efficiently. If you are not a programmer, this is the most easy way to work with SOQL and to extract your data.

Here, you have to choose SOQL and select the object you want to perform SOQL from the drop-down. I have selected Account here. The page that will open will be below.

SOQL

As you can see we have various options here. So suppose I want to extract the Account’s list with records created today and sorted alphabetically in ascending order by Account Name. Let’s check how we can write this SOQL.

SOQL Steps
First, you have to specify which columns you want to display. Filter your results if you want. Sort your data by selecting the fields from the drop-down then the next columns specify ascending or descending order and then we can choose whether we want to see Nulls record first or last. As here I have also selected Max Records as 10, so the result will only show me records up to 1o.

Below is the result in the form of a list.

SOQL result

We can also select whether we want data from the recycle bin or not, If yes we can filter our data by IsDeleted = true. Here I have deleted my 2 records. Below is the result by executing the IsDeleted = true filter.

isDeleted filter

 

Data Manipulation

This option allows us to insert, update, delete, and undelete records without actually using the developer console. Here I have taken the example of the Insert operation.

After selecting Insert and object from the drop-down, we will get these options on the next page.

Insert

After clicking on Next it will redirect you to fill out the fields to insert the record. Required fields will be in Red text color as shown below for the Name field.

Insert fill details

Click on the Confirm Insert button. It will take you to the next page which will display the newly generated recordId. Similarly, for the update, delete, and undelete operation, we have to specify the recordId and then we can operate.

Retrieve

This option in the SFDC Workbench is a great feature for extracting metadata from your Salesforce org. Metadata includes components like custom objects, fields, workflows, page layouts, Apex classes and more. Retrieving metadata is essential when you want to analyze, back up, or migrate configurations from one environment to another.

Retrieve Initial Page

Here we don’t require any setup in VS code, only a package XML file with the component name we want to retrieve. I have chosen on package.xml file here to retrieve my components from org and hit the next button.

Retrieve 2 page

It will show you the components that you have in the package XML file to retrieve. Click on the below retrieve button.

Retrieve 3 page

This feature is beneficial for quick retrieval, It offers a faster solution compared to setting up more complex tools. With just a few clicks, you can retrieve the exact components you need, making it an essential tool.

Deploy

This feature allows us to push changes metadata changes in the Salesforce environment. It allows us to move various components such as Apex Class, Trigger, LWC, Objects, and many more. To perform this we don’t need to setup anything as it is a web-based tool.

Deploy

The only thing is we need to prepare the Zip file including our package XML file with the component details we want to deploy and the component file itself. We can choose the Test Level as NoTestRun to not run any test class and other options to run the test classes as it is necessary to deploy it in production.

Check Only validates the changes before deployment. Rollback On Error will roll back the changes if deployment hits with an error.

Rest Explore

It is a great feature to interact with Rest API. REST (Representational State Transfer) APIs enable you to perform a wide variety of operations in Salesforce, such as querying records, inserting or updating data, and interacting with metadata, all through HTTP requests.

The REST Explorer in Workbench is particularly useful for:

  • Testing API endpoints.
  • Fetching or modifying Salesforce data using REST calls.
  • Exploring REST API capabilities without writing code in external tools.
  • Troubleshooting and debugging integrations.

Below is an example of GET. In the query parameter, we gave our SOQL query with a limit of 10.

Get

 

Let’s also understand about POST. It will be used to create the new record. Below is the screenshot showing how can we do that. Here, we have to specify the sObject for which we want to perform POST. Also in Request Body, we have to specify the data to be filled in respective fields in A JSON format. It will show you the success or error message with the generated recordId.

Post

FAQ’s

1. What are the other features available in REST Explorer?

Using REST Explorer, you can perform several key operations in Salesforce, such as:

  • GET: This operation retrieves data from Salesforce. It is often used to query records or get details of specific records by passing the record ID in the API request.
  • POST: The POST operation allows you to create new records in Salesforce by sending data in the request body in JSON format.
  • PATCH: The PATCH operation is used to update existing records. You can specify the fields to update in the request body, and Salesforce will only modify those fields for the specified record.
  • DELETE: As the name suggests, the DELETE operation allows you to delete records from Salesforce. This is particularly useful for managing data cleanup through API calls.

2. Can I use Workbench to retrieve or deploy data in bulk?

Answer: Yes, Workbench provides data manipulation options that allow for bulk insert, update, delete, and upsert operations. You can upload CSV files and perform bulk data actions through the “Data” tab, making it a great option for handling large datasets.

3. What is the difference between Workbench and Data Loader?

Data Loader is solely used to perform DML operations, and import & export features. Workbench is a web-based tool and offers additional features such as metadata deployment, REST API testing, and SOQL/SOSL queries.

Conclusion

SFDC Workbench is an incredibly powerful tool that every Salesforce professional should be familiar with. Whether you’re running queries, managing data, or testing APIs, Workbench provides a convenient and efficient way to interact with your Salesforce org. The flexibility and ease of use make it a go-to resource for both administrators and developers.

Share Now

Kashish have extensive Salesforce development experience, holding 4 Salesforce certifications. she posses expertise in Apex, Lightning Web Components, and Salesforce Admin, with a track record of successful project delivery. As a dedicated Salesforce enthusiast, she actively seek and embrace new challenges and opportunities within the dynamic Salesforce ecosystem.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *