Salesforce Weekly Export Service: Beware the Start of the NEXT Scheduled Export…

Salesforce provides a “Weekly Export Service” for customers with Enterprise, Performance, and Unlimited Editions.  I expect that many of us aiming to use this service as a Salesforce automated backup solution find our way to this “Exporting Backup Data” page in the Salesforce Success Community.  Very clearly on that page, one can read the following about how long those backup files will remain in place once they arrive upon backup completion:  “Zip files are deleted 48 hours after the email is sent. The 48-hour time limit doesn’t include weekends, which means if your download file is ready on Thursday at 4 p.m., that file isn’t deleted until Monday at 4 p.m.”

However, that’s not always the case.  I recently started a new job with a company that’s been using Salesforce for 7 years, and the org has A LOT of data; so much, in fact, that it took 12 days for the first full “weekly export” to arrive.  At least, I THINK it took that long; let me explain why I’m uncertain.  What I learned yesterday is that the initiation of the NEXT export job results in deletion of the backup files from the PREVIOUS export job.  So, I got an announcement at about 10:00 AM on Saturday, 12/20/14, that my export was complete.  On Monday morning, the FIRST business day after the announcement of the export’s completion, I started downloading files at about 8:30 AM EST.  At about 10:00 AM EST, the backup files, all 241 of them, disappeared.  I’d downloaded about 4.

When I called in to Salesforce Premier Support to rave that I should have almost two full business days left to download these files, the rep explained that it wasn’t the 48 hours over business days schedule that resulted in the deletion of the backup files.  It was, indeed, the next export job commencing that caused the deletion.

The solution I was pitched was to delete the weekly scheduled job, and allow the currently executed job to complete.  Then, when that job finishes and my team has downloaded all the files, we can manually kick off our next export.  That should prevent this problem moving forward, but it adds another point of opportunity for human error in maintaining the backup process, about which I’m not thrilled.

The truth is, this discovery is just one more factor that is increasing the urgency of figuring out an automated backup solution for our Salesforce org.  We need a frequent backup to protect us against data losses / corruptions caused by human error.  Yes, Salesforce backs up data for “disaster recovery purposes,” but make sure you read up on what that means.  According to Salesforce, it costs a minimum of $10,000 (US) and “and usually takes a minimum of 15 business days (3 calendar weeks).”  I don’t know about your company, but 15 days waiting for a data restoration in any emergency that would justify a $10,000 fee would be WAY too long to wait for us.

I’m curious about what other users with large amounts of Salesforce data have done to automate a frequent backup process.  I’m looking at scripting with Salesforce DataLoader, I’ve started experimenting with the Jitterbit Data Loader, and I’m open to just about anything.  If you have any thoughts on the subject, I’d love to get a comment from you here.  Thanks in advance!

Salesforce DataLoader Error: The sobject initialization failed…

I encountered a really strange issue today when trying to export data from Salesforce using DataLoader.  In Step 2 of the export process (the “Select Data Objects” step), for many of  the objects in my company’s org, I was getting an error message that read, “The sobject initialization failed.  Please try again,” when I would select the object and then clicked, “Next.”  I tried everything I could think of to fix the problem.  I checked object access levels in Salesforce.  I tried uninstalling and reinstalling DataLoader (version 32).  I tried restarting my machine.   None of it worked.

Then, I tried another machine that had DataLoader installed.  It was version 30, and it worked.  Sadly, though, the version difference was a red herring, and had nothing to do with the problem.   I installed version 32 on that other machine, and it still worked.  So, that led me to think their was some issue on the other machine preventing DataLoader from properly initializing some SObjects.

My Google searches for the error message didn’t yield much, but I did find my way to a labels.properties file in the GitHub space for the DataLoader project.  In that file, I saw the error message I’d been searching for on Google:  “The sobject initialization failed. Please try again.”  That made me think, “Hey, DataLoader is built in Java.  I wonder if this failure has anything to do with my Java installation.”  I actually have multiple versions of Java on the machine.  My system path had both of the following references:

C:\ProgramData\Oracle\Java\javapath;
C:\Program Files\Java\jdk1.7.0_71\bin;

I thought to myself, “I wonder if the multiple versions of Java are messing things up.  So, I removed the second of those two entries from my path variable, restarted DataLoader, and the I was then able to get past the point where I had been getting that error message.

Here’s the funny part, though.  After I had succeeded, I put my path variable value back to what it had been previously.  I had pasted it into Notepad++ so I could restore it afterword.  I closed and reopened DataLoader…and I could still initialize the SObject that was failing before.   So, I restarted my computer, confirmed that the path was what it had been originally…and I STILL didn’t get the error.

Frankly, I can’t explain exactly what’s going on here.  But, changing the path entries for Java as I did seems to have resolved the problem. If you encounter this problem and have multiple versions of Java, you might try removing one of the installation paths from your system path variable.

For reference, here are the Java versions on that machine:

Java 7 Update 67
Java 7 Update 71 (64 bit)
Java 8 Update 25
Java SE Development Kit 7 Update 71 (64 bit)

I now post this in the hope that it will save some developer / administrator out there in the world the hours of troubleshooting I just went through…

I Passed the Salesforce.com Certified Force.com Advanced Developer Programming Assignment and Essay Exam!!

It’s been awhile since I made a Salesforce post.  I’m so happy to be able to make this one.  I feel so grateful, blessed, and humbled right now.  About four weeks ago, I was given an amazing new job opportunity with a company called ACI Worldwide as a Salesforce Architect.  They brought me in knowing I had a lot to learn to really live up to that title, but that I was passionate about the Salesforce Platform as a Service, and want to learn as much as I can about anything and everything that can be done with it.  I’m very excited about this chance to learn, but it’s pretty intense right now as I’m surrounded by a new business context and a lot of new ideas.  Tonight, right when I could use a bit of a pick-me-up as I’m working hard to learn fast and add value quickly in the new job, I found out that I PASSED the Salesforce.com Certified Force.com Advanced Developer Programming Assignment and Essay Exam on my first attempt!

I couldn’t have done this without all the encouragement I received from my former colleagues at The MENTOR Network, in particular Kate Miller, Shaun Wood, Bridget Samuel, Paul Perisic and Jeffrey Cohen, among many others.  They may never see this post, but I want to record my gratitude for the encouragement and assistance they provided as I was learning Salesforce and diving in to the certification process.  And, frankly, I want to thank Dan Appleman and Jason Ouellette.  Their books on advanced apex and Force.com platform development, respectively, are the resources that I think most helped me make the transition from intermediate-PHP-MySQL-Web 2.0-self-taught developer to someone able to pass this programming assignment.  Thank you to the review panel who graded my programming assignment for their comments, including the constructive criticism included therein.  Mostly, though, I want to thank my wife, who pretty much got used to me getting done with work, grabbing a sandwich, and going right back to my home office for most of the month of October 2014.  She picked up a lot of slack as I was focusing on the programming assignment, and I’m very grateful.

Now, back to that constructive criticism from the review panel, since anyone prepping for the Advanced Developer certification process who actually found their way to this blog post from a search engine result deserves at least an attempt from me at providing helpful information.  I don’t even want to brush the edges of sharing any proprietary information about this certification programming assignment because I worked WAY too hard to risk losing it for an ethics violation or anything like that.  So, I’m going to have to speak in pretty generic terms.  But, what I feel comfortable saying is that the comments really weren’t that unexpected, and I think they were very fair (even the negative ones, which aren’t ever really easy to get, but I’m focusing on the chance to improve that they represent!).  They focused on Salesforce best practices, that are documented all over developerforce.com, the success community, etc.  There was one comment that I should have expected.  When I was approaching one piece of the assignment, I thought to myself, “I wonder if I can do this with [a piece of standard Salesforce functionality] rather than with this cool, but perhaps over-engineered, chunk of code I’ve written.”  If you find yourself thinking something like that, stop, and go read the pertinent documentation!  That thought leads me to the two pieces of advice I would give to anyone preparing for this certification:  1)  Read Development with the Force.com Platform by Jason Ouellette and Advanced Apex Programming by Dan Appleman, and 2) remember that you’re being tested on THE SALESFORCE PLATFORM.  As you’re designing your solution, think about what Salesforce has done to make certain things easy for you as a developer, and make sure you’re not writing code to solve problems they’ve already solved.  I was “guilty as charged” on that count for one thing, and I’m going to go back and think my way through the “better way” that was described in my comments.  Thank you again for the feedback, review panel, whoever you are!!

Actually, one more thing:  The certification website and other sources on the web have language like, “Plan at least 20 hours for the programming assignment, but be ready to possibly spend more to do a good job…”  I guess I have a third piece of advice for folks going after this one:  Unless you REALLY know what you’re doing, I’d at least double that 20 hour estimate.  I read the assignment the first night, read it again the next day, did some thinking / planning / design, then started coding.  I think, in the end, I put in more like 50 hours.  I grant you, some of that was in obsessing, reworking a bad design choice I caught last minute, etc.  I also seriously underestimated the amount of time it would take to write test code for EVERY permutation I could think of for use of the simple interface, and truthfully, I left some positive and negative use cases untested simply because I ran out of time.  I think I got to 98% or 99% code coverage, and I’m proud of that, but the funny thing about getting code coverage that high in this context is that the handful of lines I couldn’t cover DROVE ME CRAZY!!!  There was one line of Apex code I tried to cover about a dozen different ways, and finally had to give up.  I was SURE it was possible to cover, but for some reason my usual bag of tricks wasn’t cutting it.  Ah, well; I’m proud that I was more focused on testing every use case I could think of than just getting the code coverage.

OK, call it FOUR pieces of advice, since I think this is just restating a Force.com development best practice and doesn’t give anything away about the assignment:  Don’t be lazy; actually DO the “worst case” analysis we all know we should always do to determine if a solution will scale BEFORE you start coding.  I caught a design flaw in my assignment two nights before it was due because I went back to the beginning of the prompt and decided to think my way through the whole thing one more time.  Had I not done that and caught the issue to which I’m referring here, I’m almost certain I would have failed.

Good luck to those of you pursuing this certification!  It’s hard work, but it feels great when you pass, so go for it!!

 

dev copy dev_adv