You need to sign in to do that
Don't have an account?
Chermadurai
Reg: RunAs
Hello..
Is there any update for System.RunAs in Summer 13.
My testcase runs successful in Sandbox. but getting error in Production..
System.TypeException:System.RunAs can only be used with an active user
At the time of query for an User which you are using for runAs returning an Inactive user.
Try to add one more filter while querying for an User which is IsActive =: true
This will return a active user.
Thanks,
Devendra
i will be much batter if you create user with in the test method
that what salesforce suggest in this kind of casses