You need to sign in to do that
Don't have an account?
When validating a change set in production I get an "Inactive User" error on a ChatterAnswers class
Here is the error I am getting:
Failure Message: "System.DmlException: Insert failed. First exception on row 0; first error: INACTIVE_OWNER_OR_USER, operation performed with inactive user: []", Failure Stack Trace: "Class.ChatterAnswers.createAccount: line 4, column 1 Class.ChatterAnswersCreateAccountTest.validateAccountCreation: line 10, column 1"
I am stumped. I was able to validate and deploy from my dev sandbox to my UAT sandbox but now I get this error in production when I go to validate.
I looked to see if I had any assignment rules that were trying to assign to an inactive user. I also looked to make sure I didn't have any inactive users that are Chatter Answers users.
Any ideas?
Hi,
Yes, it refers all the users. Here in your code try including the condition highlighted.
User[] user = [SELECT Id, Firstname, Lastname from User where isActive =: true];
This might work. Try this and inform me if there is any problem.
Hope so this helps you...!
Please mark this answer a Solution and please give kudos by clicking on the star icon, if you found this answer as helpful.
All Answers
Hi,
This error has occured while validating deployment details in Production alone rgt?
This seems to be your production environment user is inactive and that user id might be referred in the following controllers as well as test classes.
Class.ChatterAnswers.createAccount: line 4
and
Class.ChatterAnswersCreateAccountTest.validateAccountCreation: line 10
Check the line mentioned in the failure message.
Hope so this helps you...!
Please mark this answer a Solution and please give kudos by clicking on the star icon, if you found this answer as helpful.
Here is what those two lines say:
User[] user = [SELECT Id, Firstname, Lastname from User];
So it seems it does refer to any user.
Hi,
Yes, it refers all the users. Here in your code try including the condition highlighted.
User[] user = [SELECT Id, Firstname, Lastname from User where isActive =: true];
This might work. Try this and inform me if there is any problem.
Hope so this helps you...!
Please mark this answer a Solution and please give kudos by clicking on the star icon, if you found this answer as helpful.
That was it. Thank you so much.