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
Benjamin Lewis 8Benjamin Lewis 8 

Chatter Answers Apex Class Errors

Hello - I am trying to deploy some apex classes from sandbox to production and keep getting the two errors even though what I am doing has nothing to do with chatter.  Our organization does not use chatter, it was recently enabled inadvertently by another individual who was given system administrative access, but it is harder to remove than activate unfortunately.  I need help figuring out how to eliminate the errors below either by removing chatter or any other work around anyone can think of.  Thanks for your help!

ChatterAnswersAuthProviderRegTestvalidateCreateUpdateUserSystem.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [ProfileId]: [ProfileId] 
Stack Trace: Class.ChatterAnswersAuthProviderRegTest.validateCreateUpdateUser: line 31, column 1

ChatterAnswersEscalationTriggerTestvalidateQuestionEscalationSystem.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: [] 
Stack Trace: Class.ChatterAnswersEscalationTriggerTest.validateQuestionEscalation: line 14, column 1
Best Answer chosen by Benjamin Lewis 8
Benjamin Lewis 8Benjamin Lewis 8
I was able to remove chatter answers altogether (it had been activated inadvertently as it was) by logging in to a sandbox environment through Eclipse Neon and deploying the change to production.  

All Answers

Hemant_SoniHemant_Soni
Hi Benjamin,
WHen you are deploying you change set which option you have selected.Means when we are deploying change set please select Run Specific test option. As above mentioned errors these errors are causing in test classes so you can skip these test classes by choosing Run Specified Test option.
Let me know if it not help or you are still getting same errors.

Thanks
Hemant
Benjamin Lewis 8Benjamin Lewis 8
Hi Hemant, when I do that, the "Run Apex Tests" comes up as a "fatal error"
Hemant_SoniHemant_Soni
Hi Benjamin,
In that case you need to try with Ant migration tool that tool definatly helps you.
https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/
Thanks
Hemant
Benjamin Lewis 8Benjamin Lewis 8
I was able to remove chatter answers altogether (it had been activated inadvertently as it was) by logging in to a sandbox environment through Eclipse Neon and deploying the change to production.  
This was selected as the best answer