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
Darshan FarswanDarshan Farswan 

Why is there mismatch in the User fields between the test class and trigger?

I made a trigger to delete the Opportunity Sales Team Members whenever the User is made inactive. The trigger is working perfectly as expected. The user i fetched in the test class is an active user. And then i added the user to an opportunity sales team. In the test class when i set the active status of the User to false and update the user object, the values for isActive is still true in the trigger. The tigger is an after Update trigger on User.