My first deployment from Sandbox to the Production, I'm so excited. Until I validate...two apex issues one with an unmanged package we've downloaded that allows us to require contact roles and one with a piece of Salesforce Chatter code that was enabled with Chatter Answers.
Here begins the adventure...and thanks to all the fine people on the forums who provided the necessary fixes.
https://developer.salesforce.com/forums?id=9060G000000XaOUQA0
https://developer.salesforce.com/forums?id=906F0000000AZDbIAO
Round 1: If Your Deployment Fails, Try, Try Again.
Initially, I thought the failure was related to missing parts of the package which were caught when I first attempted to validate the deployment I received in from my Sandbox environment. I repackaged the system in Sandbox with the additional information and then waited for the upload.
This time though, it was the Apex testing that kept me from successfully deploying. And interestingly enough the process is also causing an error in a workflow, because when I try to validate I get email message that one of my workflows, one related to Case management fails to fire properly.
Turns out that is related. Time to hit the forum with some error messages to see what we can find.
Round 2: If Your Deployment Fails Because of Apex Issues in Production...Perplexion Ensues
Fortunately and not surprisingly, I'm not the first person to have this problem. A search of the key components of the error messages, revealed fixes...the problem is I can't deploy those either.
The first error in a test class on a unmanaged package is easy to fix. I drop into Sandboxes Developer Console, make the change, do some testing. No errors, no problems.
So I jump into production, and try to do the same thing there. An error message ensues. I can't save changes to production.
Makes sense. So I'll deploy a package from Sandbox that contains the fixed class (I'm new at this...brand new.).
That doesn't work either. I can't get passed the error for both classes.
Now this is starting to have the feel of an infinite loop and I'm starting to consider just rebuilding this project from scratch in production. I now know i have these same errors in production and that they aren't actually interrupting anything in my environment, so they may keep me from deploying, but not executing my processes. Still I'm working on page with what will be around or over 100 formula fields, and I don't want to re-craft that in any way in production once it's tested, so I need to get this fixed.
I chat with the user who needs this packaged deployed. The timeline isn't quite as tight as I thought...which is good, because this is clearly going to take some time.
So how do I solve this problem? The forums tell me I need new software.
Round 3: A Hunt for Java: No not the Coffee or the Country
Yeah, you knew that already, but both those options were sounding pretty good. The software package didn't seem nearly as appealing.
This article informed me that I needed the Java SE Runtime Environment, so that I can install a different software that runs an interface on top of this package, so that I can hook back into Salesforce and make my change. I sort of feel like I should have a treasure map in hand, where X marks the spot in time where I succeed in fixing my production environment.
Don't get me wrong, I really appreciate the documentation and time...I'm just totally overwhelmed.
Once Java was successfully installed, I need to find Eclipse. The link there is great too, but it took me a while to confirm that the one I wanted was Eclipse Neon. I got to it from here, and choose the most recent version in the list. And the eclipse download site link was on the linked page.
Round 4: Installing Eclipse & Force.Ide
And apparently I think I'm a little more savvy than I actually am...because I assumed when they were talking about the 32 or 64 bit download, that it corresponded to your system settings. My system is 64 bit, and so that's what I downloaded. When that clearly wasn't going to work. I went back for the 32 bit.
https://developer.salesforce.com/docs/atlas.en-us.eclipse.meta/eclipse/ide_install.htm
Round 5: Installation Success Still Utterly Puzzled.
https://salesforce.stackexchange.com/questions/14559/disabling-chatter-answers/15529#15529
https://developer.salesforce.com/forums?id=906F00000008pUeIAI
Round 6: A New Place to Play
Created new sandbox to mirror dev, deleted class causing error and fixed test class for contact role assignment.
New errors:
| ChatterAnswersEscalationTriggerTest | validateQuestionEscalation | System.QueryException: List has no rows for assignment to SObject Stack Trace: Class.ChatterAnswersEscalationTriggerTest.validateQuestionEscalation: line 17, column 1 |
| invoiceextTest | invoiceextTest | System.EmailException: SendEmail failed. First exception on row 0; first error: NO_MASS_MAIL_PERMISSION, Single email is not enabled for your organization or profile.: [] Stack Trace: Class.invoiceext.send: line 170, column 1 Class.invoiceext.<init>: line 129, column 1 Class.invoiceextTest.invoiceextTest: line 38, column 1 |
Deleted Chatter Answers. Solved problem 1
Researching problem 2: sln: https://developer.salesforce.com/forums/?id=906F00000008xsLIAQ
Round 7: Discovering the functionality of Force.Ide
Round 8: Deploy. Hooray!
