“Last week I introduced you to fellow Salesforce MVP Brian Kwong. He is the Salesforce Wizard and has the hat to prove it. He has been a Salesforce Administrator for six years. In addition to being a ButtonClick Admin, Brian also utilizes Salesforce Apex and Visualforce. You know he is a driven MVP because he took on the challenge of 2 back-to-back posts about the Salesforce.com Workbench on ButtonClick Admin! So let’s continue our learning about the Salesforce Workbench!” -Mike
Welcome back! In my last post we looked three of the most common tools I use on the Salesforce Workbench: Password Management, Object Information and Query. This time we’re going to look at some more specialized tools and one potential replacement for the data loader.
Tool # 1 – Configuration Deploys
This is a specialize tool to retrieve and deploy configuration setup or “Metadata.” We have lots of options for doing deploys. We could re-create our sandbox work (ick!), we could use Change Sets, or the Force.com IDE. For most of my deploys I choose Change Sets or the IDE. There are two situations where I’ll use this tool:
- Deploy Configuration to a Developer Org
- Save Sandbox work so I can for a refresh
We’ve all been there. We’re working on a project in Sandbox and we get the Salesforce Preview email. We need to refresh to get the preview! Oh No! All our hard work! What do we do? Deploy to production hiding everything? Start over again? No way.
With Workbench we can create a “back up” of our configuration and deploy back to our sandbox after I refresh. This is a bit involved, so for small projects this may not be the route to take. It’ll be something to decide. We need to do a few things.
- Either we need a package to “download” or we need to create a Package.xml There’s lots of sample here
- We select that package in our “Retrieve” tool. Review our objects and click Retrieve
We’re done! The retrieve tool will create a zip file to download. Now we can use the workbench to deploy our metadata. The process is just as simple:
- Select “Deploy” from Migration
- Select our zip file and click next
Tool # 2 – Streaming Push Topic (Secret Admin Notifications)
Think workflow email alert – without the email. Streaming Push Topics are typically used by developers to create awesome pages that refresh when Salesforce records are updated. This can also be a tool for the Button Click Admin who wants to have some mischievous fun.
Yes, I said fun. We’re going to create ourselves a workflow free notification and spook our end users into believing we’re the all knowing and powerful people we are.
Here’s the setup, we’re onboarding a new group and we want to post in Chatter to congratulate when the first few people create records. Yes, we could use a list view, a report, or an email alert. This is a one-time thing and we will have to constantly refresh a view or report. No! We shall use Push Topics!
First, we need to create a push topic. This is easy. We just need a SOQL query. Any field in the query will cause a notification when a value is changed. We also want to filter the query so it only includes records we care about.
You don’t know how to write a SOQL query? Go back to our last post! Workbench includes almost entirely point-and-click query creator.
- We name our Push Topic
- Paste our Query
- Save & Subscribe!
We’re done! Now as records that meet your SOQL are created or updated we’ll get a post in Workbench. The post will have a lot information in it, just skip to the area that says “sObject” and you’ll see the fields from your query and their value.
Tool # 3 – ‘Cloud’ Data Loader
Workbench includes the same tools available in the data loader: Insert, Upsert, Update, Delete, Undelete, and Purge. So why not use the Apex Data Loader? We’re Cloud Admins! Who wants to download software! The Workbench is available anywhere and everywhere we can access Salesforce. So let’s go to the cloud!
Just like the Data Loader, we need to have a CSV file with the Record IDs (except Inserts) and field values. Once we have this file we go to our workbench and:
- Under Data Select our Desired function (Insert, Update, Etc)
- Select the sObject
- Select “From File” and pick our CSV and click Next
- Map our CSV columns to Salesforce Fields
We’re done! When you thousands of records you can use the Bulk API. Just click the checkbox before you hit the confirm button.
There’s a lot more than the Workbench. There’s a REST explorer and the ability to execute APEX code. The Workbench is a great tool for the Button Click Admin. It has useful tools you can use immediately and it has tools that can let you dip your toe into that developer realm. This Workbench is truly a great companion for any great ButtonClick Craftsman.