Workbench: An Admin’s Best Friend

Workbench- An Admin's Best Friend (1)Before I was a Salesforce admin – and to be honest, even as a junior admin – I had never heard of a SOQL query. One day, I was complaining about some information that I could not access within Salesforce, and a developer friend of mine said, “Just run a SOQL query in Workbench.” As an inexperienced admin with zero technical background prior to Salesforce, I instantly felt 1) intimidated and 2) not quite as intelligent as usual.

I mean, really, what is this Workbench thing? It even has “developer” in the URL, so it must not be for admins!

Wrong. My developer buddy took pity on me and walked me through how to get the information I was looking for. It was so simple once I knew where to look – and when I show you some of the problems it has solved for me, you will be blown away by its capabilities. Get ready, admins – Workbench is about to become your new best friend!

First, the basics:

  • Workbench is cloud-based – you login via your browser, here – and if you are already logged into Salesforce, it will prompt you to click on your username and then log you in.
  • You can choose to log into production, or a sandbox.

Picture1Now, the problems. Here are some of the questions I’ve been asked, and how I used workbench to get an answer or solve a problem.

How many times has each of our email templates been used?

This request has come to me from Sales and Marketing. It’s also something I like to know if I am doing an email template cleanup. Workbench gives you an easy way to find out!

After you are logged in, go to SOQL Query and select EmailTemplate from the object list.

Picture2

In the next screen, you can set up your query:

  1. Select the fields you want displayed in the results.
  2. Select how to display the results – for a quick query, I will select List, which will display the results on the page. If I want to update or analyze a large set of data, I will select Bulk CSV so that I have a downloadable file.
  3. If you want to sort by one field, you can do that as well – for this example, I want to sort by Times Used, to make it easier to see the rarely-used templates.
  4. You can add filters to your query – for email templates, I usually want only the active templates.
  5. Click Query. That’s it!

Picture3

Someone deleted an opportunity, but we don’t know who, and we need it back.

Yes, this is a real question (and whether or not to allow sales reps to delete opportunities should be its own blog post someday). But it happens! You can search your org’s recycle bin for deleted records, but you will be limited by the fields available in search results. And if there are too many to look through, it will take a really long time.

Just like the above example, start with a SOQL query, this time on the object that you want to find. The concept is the same for deleted records, with a couple of key differences:

  • Make sure to pull in “Last Modified By” to find out who deleted it.
  • Include deleted records.
  • Add a filter to pull only deleted records into your query results (IsDeleted = true – which you cannot pull into a Salesforce report).

Picture5

Other examples of useful SOQL queries in Workbench:

  • Frozen or locked out users (object: UserLogin, filter: IsFrozen = true or IsPasswordLocked = true)
  • Users with Knowledge licenses (object: User, filter: UserPermissionsKnowledgeUser = true)
  • Who created a report folder or a dashboard folder (object: Folder, and include the CreatedById field)

I’m getting an error message that gives me a process or flow ID, but not the name.

This happened to me recently – the error message referred to “Flow with version ID 301U0000000XyZv” – but I didn’t know which flow or process it was referring to, and you can’t report on this within Salesforce.

Here’s how to access metadata components (flows, workflow rules, Apex classes, etc.) in Workbench:

After login, you can select Metadata Types & Components (you cannot select an object, just click Select and go to the next screen), or you can use the menu bar at the top of the page.

Picture6Picture7

Then, select your metadata component (for this example, I am using Flow, which will include both Visual Workflow and Process Builder components):

Picture8

It will tell you how many of those components exist. Click “Expand All” to see the attributes of each of them (created by/date, last modified by/date, name, ID, etc.). If you are looking for a specific ID, use Ctrl + F and paste the ID to find that flow.

Is there a quick way to find out how many Apex classes/installed packages/sharing rules we have?

I was once asked to provide a count of metadata components in Salesforce, as part of a system audit. There are two ways to do this: 1) you can go to Setup and manually count these things, or 2) you can go into Workbench and have all of those numbers in a few seconds!

Just like the previous example, you start at the Metadata Types & Components page. Then select what you want to see – and voila! There are your totals.

Picture10 Picture11

Some caveats:

  • For some metadata types, the number of components will show you the number of objects – for instance, the components total for Workflow Rules gave me 21. This really means that I have workflow rules on 21 objects. Unfortunately, there’s no good way around that one!
  • If you are looking for the number of Roles, keep in mind that it will also include external portal or community roles in that total.

I want to assign a specific password to a user.

I recently had a Sales user who could not log in, and was not getting the password reset email when either of us tried to reset her password. We did not have time to submit a case to Salesforce support – but Workbench saved the day!

Setting or resetting a password is the easiest thing to do in Workbench – and in my situation, it really helped my Sales user get back to work quickly. You can access password management from the Utilities menu:

Picture12

Then, simply provide the User ID and the password you want to give them. You can also reset their password by selecting the “Reset” option rather than “Set” – you only need the User ID.

Picture13

Workbench has many other capabilities – these are just some of my favorites. Check out this Trailhead module for even more Workbench magic – I hope you have fun exploring this powerful tool!

 

  • Admin Basics

    Workbench: An Admin’s Best Friend

    Tweet Pin Share ShareBefore I was a Salesforce admin – and to be honest, even as a junior admin – I ...
Load More Related Articles
  • Admin Basics

    Workbench: An Admin’s Best Friend

    Tweet Pin Share ShareBefore I was a Salesforce admin – and to be honest, even as a junior admin – I ...
Load More By Celeste Keller
Load More In Admin Basics

15 Comments


  1. Meg

    December 14, 2015 at 9:29 am

    great post – l did not know about this and I am already using! Thanks!

    Reply

  2. Yana

    December 14, 2015 at 9:49 am

    Hello,

    Great post and Article! Congrats!

    I am also Salesforce Admin/Consultant without any tech/developer experience and I am trying to catch up with.
    Is there any difference between Workbench and Data Loader apart from the fact that Workbench is web-based and Data Loader is a desktop app?

    Thanks

    Reply

    • Celeste Keller

      December 15, 2015 at 10:32 am

      Workbench and Data Loader have the same capabilities for mass updating or deleting records – but I like that Workbench has a simpler UI, and it gives me the option to just view a list of query results instead of having to export them to Excel. Also, I’m not sure that you can set a User password via Data Loader.

      Reply

  3. Roy

    December 14, 2015 at 11:34 am

    Very cool! Never occurred to me that this was possible. Thank you for sharing!

    Reply

  4. Charlie Sides

    December 14, 2015 at 12:14 pm

    As an old SQL guy, this is so in my wheelhouse yet somehow I never knew it existed. Thanks for bringing it to our attention, I have already found a couple of uses for it today! No more data dumps to an Access database just to research something.

    Reply

  5. Leigh Anna

    December 14, 2015 at 12:17 pm

    Love this!! This is great… so glad that you shared. I will certainly be using this tool!

    Reply

  6. Roy

    December 14, 2015 at 12:54 pm

    Follow up question: I have a custom object that has a lookup relationship to a standard object that I would love to be able to report on, but the custom report type tool won’t let me build a report that will associate the two (not sure why), so I have to export two reports and perform a vlookup in excel to get the cross reference I’m wanting.

    Would this be a good way to report on two objects that are associated via a lookup for which you can’t build a custom report?

    Reply

    • Celeste Keller

      December 15, 2015 at 10:40 am

      I’m not sure – I have not used Workbench for overly complex reporting – but you should be able to create a report type that works. After creating the report type, if you go into Edit Layout, there should be an “Add fields related via lookup” option in the box on the right-hand side. Give that a try – you should be able to get to the object you want that way. Another option is to reverse the order of the objects in your custom report type (meaning, start with the other object and see if you have better options for the related object).

      Reply

  7. Johan

    December 14, 2015 at 4:58 pm

    cool, never know there is a field called TimesUsed in EmailTemplate

    Reply

  8. Scott

    December 15, 2015 at 6:51 am

    Fantastic post! I’ve used workbench some but it’s been a while and this post was a great re-introduction for me. Already put the pword management tip to use today! Thanks!

    Reply

  9. Celeste Keller

    December 15, 2015 at 10:41 am

    Thanks so much for all of the kind feedback! I’m so glad I could share this awesome tool with my fellow admins. 🙂

    Reply

  10. Carol

    December 15, 2015 at 5:18 pm

    Hi, I’m trying to follow along with the first example (How many times has each of our email templates been used?) but can’t seem to get CreatedDate, CreatedById, ID, IsActive, etc. in the query at the same time. When I choose one, it removes the other. I’ve tried this in a couple different browsers and so far no luck. Total newbie at this. Any idea what I might be doing wrong? thanks!

    ps. I’m able to get the sort results and the filter results in the query, just can’t seem to add more than one field from the Fields box.

    Reply

    • Nicholas Zozaya

      December 24, 2016 at 8:32 pm

      Hold shift + click the different options. Sure you got it by now, just in case anyone else is referencing these comments.

      Reply

  11. Neal

    December 16, 2015 at 8:22 am

    Great article and I love workbench too but unfortunately it’s no longer the ISV partners best friend any more since it stopped functioning when Salesforce recently disabled OAuth Access when logged in as another user (i.e. via support login). Such a shame 🙁

    Reply

  12. Lissa

    December 17, 2015 at 5:16 pm

    Great post. I use Workbench because my last manager was a developer and admin, it was all she would use…so now it’s all I use. Thanks!

    Reply

Leave a Reply

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

Sponsors