+ Start a Discussion
Abhi sfdcAbhi sfdc 

getting an error while deploying code from sandbox to production.....................................

Getting an error:

ChatterAnswersAuthProviderRegTest.validateCreateUpdateUser(), Details: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [ProfileId]: [ProfileId] Class.ChatterAnswersAuthProviderRegTest.validateCreateUpdateUser: line 31, column 1
SonamSonam (Salesforce Developers) 
As mentioned in the error message : Are you inserting a user in code where the profileID is missing?