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
Debbie DockeryDebbie Dockery 

This Apex trigger was set up years ago and I am trying to deactivate it and receive the following error message.

Class NameMethod NameError Message
CalculateBusinessHoursAgesTesttestBusinessHoursBucketerSystem.Exception: Assertion Failed 
Stack Trace: Class.CalculateBusinessHoursAgesTest.testBusinessHoursBucketer: line 33, column 1
ST_OppNewtestLinkMIEventSystem.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, A workflow or approval field update caused an error when saving this record. Contact your administrator to resolve it. Challenges-Short: data value too large: • Highly segmented business increases complexity to meet service level <br>• Reconciling agent schedule between scheduled and actual <br>• Ensure utilization of resources without negatively impacting agent engagement <br>• Meeting Occupancy Goals – balancing between Inbound/outbound/off-phone work <br>• Training being canceled and rescheduled creates extensive manual exceptions data entry <br>• Double digit aux code abuse (max length=255): [] 
Stack Trace: Class.ST_OppNew.testLinkMIEvent: line 290, column 1

Any help would be greatly appreciated, I have very little knowledge about this.  
Thanks,
Debbie
Khan AnasKhan Anas (Salesforce Developers) 
Hi Debbie,

Greetings to you!

According to Salesforce support:
  • During work hours, large no of users try to access the data, if you will disable the trigger and trigger were related of any of the events then the functionality stop working in production. Functionality like update the field, send an email, create a new record etc. which are executed by this trigger, all those functionalities is not working in production.
  • If any batch will be scheduled for a specific time for insert/update/delete functionality and if the trigger was related any of the functionality, stop working in production and might be its cause the error.
  • After disabling the trigger your functionality like, update the field, send an email, create a new record etc will not work. So might be It's affected your scheduled reports.
  • If the trigger is calling from another trigger handler class so after disabling the trigger its cause the error in a production environment.

Consideration:
  • Please check the functionality of trigger.
  • Please check the batch jobs which is related this trigger also please check all the dependencies of the trigger.
  • Please try to perform this functionality during off-hours because no of users is less and the probability of hitting any issues would be less.
  • Please create a debug logs after disabling the trigger, so you can easily find the error if its occurs.

Please refer to the below links which might help you further with the above issue.

https://sfdcfanboy.com/2017/11/23/a-tip-a-day-23-5-ways-to-stop-trigger-in-production/

https://salesforce.stackexchange.com/questions/15673/deactivating-classes-and-triggers

https://salesforce.stackexchange.com/questions/143338/disable-trigger-in-production-what-are-the-consequences

https://salesforce.stackexchange.com/questions/124025/deactivating-an-apex-trigger-in-production

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas