+ 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.