Nerdforce #15 – Analogies, Formula1 and King Lear’s Fool

This week we have a very enthusiastic Guest Accomplice in Mr. Dale Zeigler @DZieg11.  We talk about where #awesome Admins can go to get answers.  He gives us insight to his latest idea for a Dreamforce Session and we collaborate to solve a Nerdforce problem.  Nana and I got a solid lesson in Formula1 Racing.

GrabBag01, GrabBag02, GrabBag03, GrabBag04, GrabBag05, GrabBag06, GrabBag07, GrabBag08

How to Break Something Critical

How to break something critical right before you go to Orlando for a week & How to clean up the mess.

Well, I really stuck my foot in the mud on this one.  All of you Solo Admins are more likely susceptible to this but we “Mavericks” aren’t the only ones to engage in this type of brash behavior.  I am betting that a good number of you have found yourself just hours away from beginning a vacation and you were scrambling to wrap up a number of projects so you would have less to come back to the following week.  You were writing new formula fields directly in Production or making quick changes to profiles because someone whined about their visibility.  You get that Disney-Brain and all you want to do is wrap out some quick wins to end on a good note.  This week, I will tell you how I cut a few corners, broke a handful of rules, paid the price for my fool hardiness and dug myself out of the hole.

So to understand what I did, you will need a brief understanding of some of my data structure.  I have two custom objects, Project Task and Model.  Hanging below these objects is another custom object called EQLines.  An EQLine will be a child record of either the Project Task or Model but never both.  Due to a lack of foresight on my part when we had a trigger developed for us, we occasionally get orphaned EQLines floating around in the datasphere.  It’s really not a big deal.  I just need to pull the IDs of those orphans and euthanize them on a quarterly basis.  Simple Spring cleaning, right?  Well, if I were just cleaning up these records, I would have likely done it right.  I would have pulled the report that I had already saved for just this occasion and removed them from the system with ease.

So Anyways, I was just revising a Process Builder that established a semi-unrelated lookup relationship DIRECTLY IN PRODUCTION… Did you all just here that?  That was the sound of thousands of Admins slapping their palms to foreheads.  I know, I know: but you must remember that I had a reservation to eat dinner with Belle and the Beast in their Castle.  Who has time to think about validating change sets?  Anyhow, to test this change I would need a report to confirm the process was running accurately.  BINGO, it worked perfectly! Oh, and now this report is giving me list of all those Orphan Records.  I’ll just use this list to remove them from the system.  One last thing to worry about, right?

This is where you yell at the movie screen.  “No Drew Barrymore!!  Don’t go outside!  Don’t rapidly delete a couple thousand records because this list ‘should’ be the same as the one you know is correct!”

DON'T GO OUTSIDE!!!
DON’T GO OUTSIDE!!!

All right.  Did you get it out of your system?  Good, because it happened and there is nothing I can do to fix this short of jumping in the DeLorean with Doc Brown.  Actually, I had this opportunity last week and I didn’t take it.  I was too focused on getting Doc to tell me whether he needed road where he was going.  Seriously, I never thought I would get so giddy about meeting a man pretending to be Time Traveler.

Where we're going, We don't need Roads.
Where we’re going, We don’t need Roads.

So if you didn’t catch on, my big mistake was when I deleted all those orphan records I also deleted ~1400 records linked to all the Models in our system.  My Engineer has graciously decided not to string me up for this mistake.  Now let’s review what can be done in recovering errantly deleted data.

The easiest place to find deleted data is the Recycle Bin.  Salesforce Help Doc: Using the Recycle Bin  It can be found at the bottom of the left hand menu.  The Recycle Bin has come in handy in the past when a User calls up crying that they totally didn’t mean to delete Record-X.  I would groan about how this will be a difficult rebuild and I may need some time to search the foundation data and I can’t guarantee every field has not been corrupted.  I imagine most of them know I making all that up; but if some of my colleagues believe I do literal data spelunking’ what’s the harm?  I could just show them where to find the Recycle Bin themselves, but I don’t want them to rely on a safety net when they delete data.  We are also small enough that I can generally handle these requests directly.  So why didn’t this work for me?  The recycle bin only holds so many records before it starts permanently removes the records.  It also has a time limit, so if this did not arise as an issue for two weeks, we could have lost all of it.  I found ~900 records but I really wanted to get all of them in one swipe.  I’ll set this to the side for now.

This next option is by far the best choice, IF you have done a bit of leg work up front.  How many of you have set up your Exporting Data Backup? Salesforce Help Doc: Exporting Backup Data  It is super simple and the best thing to protect yourself from any damage that those pesky humans can do to the records in your org.  Once it is set up, you get an email once a week or month that leads you to spot in Setup where you can download a zip file copy of your data.  What I learned this week, (or relearned.  Who knows, I set this up such a long time ago) is that you can set the export to only pick specific objects.  There is a simple check box that says “Include All Data”.  I have no idea why I didn’t check that box when I set this up.  Would you believe I never selected EQLines as something to be exported?  That means, in this case, my trusty data backup was completely worthless to me.  Please set up a weekly Data Export and for Kermit’s Sake, select “Include All Data”.  Don’t gamble on which records will be needed.

So where does that leave me?  I was about to go back to my Engineer with the good news that he only has to rewrite 1/3 of the EQLines in our system when it occurred to me that I have an X-App that I use to load my Sandboxes after a refresh.

For those of you who haven’t heard me blab on about X-Author, a brief synopsis:  X-Author is an app from Apttus that allows you to build excel templates which can pull and push data into a Salesforce Org.  It’s an amazing tool.  Look it up. AppExchange: X-Author for Excel

The EQLines are important for testing so I have copy of all the records loaded there.  The X-App was last updated the first week of this January.  YAYYYY!  I know that this was a one-off case.  Nearly no other person would have something like this to fall back on, but YAYYY anyway.  I massaged the data a bit.  The Recycle Bin Records will be the most up to date so I revived them first.  Then I compared that list to the list on my X-App.  This gave me another ~500 records to load.  The only records that are now missing are any EQLines written since January that were not found in the Recycle Bin.  I felt a lot better going to my Engineer with 98% of the data retrieved than any other option.

So what did we learn?  Set rules and boundaries for yourself.  I know it can be easy break the rules when you are the ref as well player, but they are there for a reason.  Use your sandbox and change sets.  The Recycle Bin is a great safety net but don’t rely on it.  Set up your Weekly Data Export.  Be lucky enough to have a copy of your records lying around.  Finally, be super nice to anyone who has to spend a day reviewing and rewriting records because you didn’t follow any of the points listed here.

So carry on Nerds, & learn from my mistakes or you will be destined to learn from yours.

Save the day & Create a Task Complete Workflow Email!!!

For years now, I have heard grumbling from other Admins about the functionality of the native Task on the Salesforce Platform.  We have been unable to create Workflow Email on Tasks or Events.  My inability to send an automatic “Task Complete” email to the delegator of said task, has caused my team to give me a less that lackluster enthusiasm for user adoption of Salesforce Activities.  For five years I have heard my colleagues at User Group Meetings and Dreamforce sessions mention this fail in passing as if this was just one of the few downsides that we Kool-aide drinkers are willing to look past.  That is why I am so surprised that there is not an #AwesomeAdmin parade being thrown for these 38 words on page 340 of the Spring16 Release Notes:

Send Email Alerts for Tasks and Events

You can now create email alerts for activities (tasks and events). Once you create an email alert, you can add it to a process, workflow rule, milestone, approval process, or flow.

 

I KNOW!!!! AMAZING RIGHT!!!  I don’t know.  Maybe it wasn’t as big an issue for others as much as I had made it out in my own mind.  Regardless, this was one of the last bricks holding back my company adopting Salesforce Activities in our day-to-day business.  What follows is not an explicit and specific How-To.  I mean it is, but, what I am saying is there are a dozen ways build a TARDIS out of Legos, just as there a dozen ways to use this new feature to your advantage.  What you will find here is simply what I did to create an automated email to notify a delegator that their task has been completed.

First thing I need to declare; all of you should be using your sandboxes and change sets to introduce any new development.  I won’t be discussing any of the details of how to build and deploy a change set, you dig into any of these blogs on the issue.

www.sfdc99.com – How to deploy code from Sandbox to Production

www.adminhero.com – Saving Time With Change Sets

www.arkusinc.com – Salesforce Change Sets for System Administrators

Now, with that out there, I should disclose that I encountered a problem with my first Change Set.  Turns out, we are currently unable to deploy Workflow Email Alerts on Events or Tasks using Change Sets.  I was thoroughly confused by this, but after a brief amount of research I found that Salesforce was already on the case.  There is a Known Issue that states the problem should be fixed by the next release.  YAYYY Salesforce!

Known Issue – Unable to deploy Workflow Email Alerts on Events or Tasks using Change Sets

To send out an email, we need an email template (Setup-Communication Templates – Email Templates.  For reference, this is what the email looks like when a Task is newly assigned to a user.

BlogPic 001 I noticed that we can’t reference the name of the Assigned To from the Task in your email merge.  I opened an idea to fix this.  In the meantime, I created a new Activity Custom Field called AssignedToName.  It is a formula field with the following equation.

Owner:User.FirstName & ” ” & Owner:User.LastName

Note the Idea I submitted once I discovered this issue.

Idea Exchange – Merge the AssignedTo Name

Here is my Email Template.  Feel free to be as creative as you deem suitable in your own email.BlogPic002Now we need a Work Flow Rule.  I named it Task Complete; Keep it Simple.

Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria

Rule Criteria should run this rule if the following formulates to be true.

AND( OwnerId  <>  CreatedById ,    ISPICKVAL(Status, “Completed”))

 All we have left do is to create the Email Alert.  Now if you are doing this in your sandbox, (We are all doing this in our sandboxes, right?) we can’t do much more here.  We can still build this out the rest of the way in the sandbox to test, but make sure the Email task is NOT included in your Change Set.  It will cause the validation to fail.  Once you have everything loaded into a Change Set and deployed into production, write your Email task on the workflow and assign the Email template created earlier.  Make sure it is activated and test it out.

To notify the boss that this new toy is active and ready, I logged in as him, created a task and assigned it to myself.  I logged out and then completed the task with an explanation of the new feature in the Comment section of the Task.  That might be a bit elaborate and unnecessary in some organizations, but what is a life without some levity.  Feel free to tell me what you did or would do different.  Hopefully this small win, can make a rough day into a Nerd-tastic day.

Nerdforce #14 – The Administrator

This week, Nana and I put together something special.  This is the first issue admin fiction where we take the amaizing worlds of Salesforce and Nerdom and crash them together.  This is purely creative endeavor of love.  If this strikes inspiration in you, lets us know at @Nanahg3 & @ADM_Nerdforce.  Big thanks to Lauren Jordan (@saasygeek) who acted as a creative consultant during the writing process. Oh, also, my 10yr old acted as an enunciation coach when it comes to the names Ashilr and Ahkaten. Thanks for listening!