0

I am trying to deploy the apex classes in my target org through force IDE but it showing error, Can you please suggest me where I am doing wrong Deploying showing error log :

StaticBusinessLogic.testUpdateSearchCreateTaskWhenReferralPlaced System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Email, Phone, Title and Role are Mandatory: []

UpdateLeadTriggerTest.testLeadandTrigger System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Email, Phone, Title and Role are Mandatory: []

ContactIsPortalUser Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required

AddHistory Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required

Average test coverage across all Apex Classes and Triggers is 69%, at least 75% test coverage is required.

1 Answer 1

0

I think the error log is self-explanatory. The first two errors are due to validation rules applied in the respective fields (for the 2nd error, your trigger is not providing those fields data which have validation rules).

3rd and 4th errors are for test coverage. You have a test class and it seems the classes do not cover the code in its coverage.

And the last one is, you have test coverage and it is not covering 75% of your code. It is a salesforce constrain that you can not deploy code without at least 75% of code coverage. (Though there are some hacks to overcome this, but it is not recommended)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.