function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
travis.truetttravis.truett 

Can't Disable Trigger

I have a trigger in my company's salesforce instance that I need to disable. I was told that in order to do this, I simply need to mark the trigger as inactive in my sandbox and then upload it again via a change set. When I do this, however, I get an error and it doesn't deploy my code. Here's the error:

System.AssertException: Assertion Failed: Expected: true, Actual: false 
Stack Trace: Class.testEditSchedule.testUpdateSchedule: line 108, column 1

The reason that the error is being thrown is because when I try to upload the deactivated trigger, my test class, which is uploaded with my trigger in my initial change set, fails at its assertion statement. I thought that maybe I needed to deactivate the test and re-upload that along with the deactivated trigger, but I can't figure out how to do that. 

I need to get this trigger down, because it's interfering with our company's ability to make new opportunity products. Hopefully someone can figure out why I can't manage to disable it.

Thanks
Best Answer chosen by travis.truett
Vivek DeshmaneVivek Deshmane
Hi Travis,
Comment the either assert statement in test class or comment out whole class code (/** ccccccc**/) and deploy it. please let me know if it works.

Best Regards,
-Vivek 

All Answers

Vivek DeshmaneVivek Deshmane
Hi Travis,
Comment the either assert statement in test class or comment out whole class code (/** ccccccc**/) and deploy it. please let me know if it works.

Best Regards,
-Vivek 
This was selected as the best answer
travis.truetttravis.truett
That worked. Thanks