Hi Guys
I am extremely stuck, i am moving data from a sand box into production and i am getting the below 2 errors
TerritoryManualSwitchControllerTest.test1()
Class
95
Failure Message: "System.QueryException: List has no rows for assignment to SObject", Failure Stack Trace: "Class.TerritoryManualSwitchController.<init>: line 95, column 15 Class.TerritoryManualSwitchControllerTest.test1: line 25, column 48 External entry point"
TerritoryUpdateRecordsControllerTest.test1()
Class
36
Failure Message: "System.QueryException: List has no rows for assignment to SObject", Failure Stack Trace: "Class.TerritoryUpdateRecordsController.<init>: line 36, column 16 Class.TerritoryUpdateRecordsControllerTest.test1: line 25, column 49 External entry point"
I think i have found them in the system and they relate to apex classes, i have found what i think they are in the system, and need to disable them, i have read how to do it, it said go to the sandbox make them inactive then move in to production, i am wondering if this is correct, also i only want to disable them for an hour or so, so i can move my changes form the sand box to live, as this is preventing me from doing it, my main question is if i activate the classes in the sand box again will they go back to the way they was before i made them inactive, any feedback would be massively appreciated as i cannot call up the guys who wrote the apex classes for us as it is the weekend an their office is closed, this is a problem because we have Monday as the go live date for the business for the new changes :S. I thought everything would transferee over fine as i only made a fresh copy of the live environment on Thursday to start transferring data from the sand box where all the new changes were made, so because there was no errors i though going in to the live system it would be fine how wrongs was i :S
Thanks
James
I'm going to take a stab at this, even though it's 3 months old and the problem is probably already resolved:
The two failures come from a test class. When you make code inactive in Sandbox and migrate to Production, you need to make its corresponding test code inactivate (or comment it out), and migrate both code and corresponding test code together. Likewise, when you make something active again, you have to activate the code and activate corresponding test classes/un-comment corresponding test code.