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
Karthikeyan ChandranKarthikeyan Chandran 

Need to fix the deployment error.

Hi,

Can anyone help me to resolve this deployment error?

System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Contract Date value is required to save: [] 
Stack Trace: Class.GIB_UtilityTest.createSingleOpptywt100Prob: line 47, column 1 Class.GIB_OpportunityHandlerTest.UnitTest_2: line 32, column 1


Thanks,
Karthikeyan Chandran
Carlos Campillo GallegoCarlos Campillo Gallego
Hi Karthikeyan,

Could you please elaborate more your question? what were you doing when you got that error?
Pankaj_GanwaniPankaj_Ganwani
Hi Karthik,

This error is coming due to validation rule which is present in Production and not in the sandbox. As per this validation rule, the Contract Date should be entered while saving a record. You will have to update the GIB_OpportunityHandlerTest to make sure that it is having contract date populated while saving object record and then try to deploy in Production.