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
amagaamaga 

Test user isActive = false when executing test method

Hi All,

 

I'm seeing some strange behavior in my test methods.  To summarize, I insert a test user and a test object.  The test object has a custom lookup to user.  I assign the test user to that custom lookup. 

 

When I first insert the user I debug its isActive flag and it shows true.  But when I execute my test method and debug its isActive flag in the class I'm testing it shows as false and causes my tests to fail.  I recently added this check for customUserLookup.isActive and that's when the tests started breaking.  

 

Has anyone else run into this issue?

 

Thanks for your help.

 

aj_sfdcaj_sfdc

Hi Amaga, 

I know this is old post but wondering if were able to figure out the solution. 

I have similar issue. 

 

thanks in advance.