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
Paula Jarvis 4Paula Jarvis 4 

oitemControllerTest.testorderNew1(), Details: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Ship_To_Email_Address__c]: [Ship_To_Email_Address__c]

I am trying to deploy a change set to PROD and I get the above error. The field that is being referenced in the error is part of a custom object but not related to this code. Any thoughts?
kevin lamkevin lam
I think you need to check the log, it could be a trigger or workflow field update that is fired by the unit test.
Amit Chaudhary 8Amit Chaudhary 8
Hi Paula,

I hope you are adding required custom field and same field is being used in some other test classes(oitemControllerTest) where required field value is missing. 
To Resolve this issue.
Step 1 :-Please modify "oitemControllerTest" class and add required field data.
Step 2 :- Make a clone of you your change set and retry.

Please let us know if this will help you.

Amit Chaudhary
Paula Jarvis 4Paula Jarvis 4
Hello Amit, Thank you for responding. My class is set to private and not public. Could that be an issue as well? Should I be adding a field that has nothing to do with the particular Object? Paula J Jarvis Salesforce Administrator E D (646) 582-9154