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
DevelopersDevelopers 

How to write code coverage for Apex trigger?

Hi,

 

In my project, i am facing deploying issue while uploading the Apex trigger from Sandbox to Production. While deploying the code, i am facing below issue.

 

Error:

System.DmlException: Update failed. First exception on row 0 with id 001L000000DbXA1IAN; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, The Account record is locked until the SAP Customer / Master creation has been completed.: []

 

Can any one help me to solve this issue.

 

Thanks in advance.

 

Regards,

Kumar

Best Answer chosen by Admin (Salesforce Developers) 
souvik9086souvik9086

Just check in production account whether there is any validation rule for account. If exists then de-activate that. Then after your deployment again activate that.

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

All Answers

souvik9086souvik9086

Just check in production account whether there is any validation rule for account. If exists then de-activate that. Then after your deployment again activate that.

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

This was selected as the best answer
sambasamba

Check your test method and validation rule.

 

 

Thanks,

Samba

DevelopersDevelopers

Thanks Souvik Dutta.

 

I checked and did the same. Now, i deployed the code successfully into PROD.

 

Thank you very much for your response.

 

Regards,

kumar

DevelopersDevelopers
Thanks for the response Samba. I got the solution.

Regards,
kuamr