I'm trying to deploy a few items to production. I tested all my classes/triggers and they are all at 90% or higher. Unfortunately, there is a class a consultant had written before I was here that is causing deployment to fail.
Here is the error code. The field is a picklist.
System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Custom Field must be complete.: [Custom_Field_c]
I took a look at the Test Class and noticed that this field was not set when creating the Opportunity object. I went in and added a value for the picklist, so the code woudn't fail. I ran the test and it passed (also works in in Execute Anonymous).
I tried to deploy again and received the error. I disabled the validation rule in the Sandbox, so I'm assuming I may need to disable it in production (but not sure).
Also, I ran a query in the production environment and there were thousands of records with that field blank, so I'm wondering if that could be causing an issue.
Thanks A