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
Stephanie SneddenStephanie Snedden 

First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Account number must be 8 characters long.: [AccountNumber]

Trying to complete the "Create an approval process that validates when a Prospect Account becomes a Customer."

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Account number must be 8 characters long.: [AccountNumber]

 
jigarshahjigarshah
Stephanie,

The Account record that you are trying to insert should have its name with a minimum length of 8 characters. There is a custom validation rule existing, in your Salesforce org which mandates this rule and thus causes your Account insert operation to fail.

Try inserting the Account record with a name longer than 8 characters.

Please do not forget to mark this thread as SOLVED and answer as the BEST ANSWER if it helps resolve your issue.
Chris Cool 6Chris Cool 6
For the purposes of Trailhead verification, you can temporarily deactivate the custom validation rule assigned to the Account field.
jigarshahjigarshah
Stephanie,

Are you still facing this issue? I just read through your issue again, and seems that when Trailhead is trying to verify the implementation of your module it is failing because of the AccountNumber validation rule. 

You can deactivate the specific validation rule and try verifying the completeness of the Hands on Exercise. It should go through.
killian gilbert-smith 5killian gilbert-smith 5
thank you! I deactivated my validaion rule from a previous challenge - that was the problem. whew! :)
Raj AmoliRaj Amoli
Thanks! I was also facing the same problem. Deactivating the Account validation rule from previous challenge resolved this problem.
Malli 6Malli 6
Hi Stephanie,
I deactivated my validaion rule from a previous challenge and increased the AccountNumber longer than 8 characters. 
Even though getting Error. Plz help me with this.

There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Account Number must be 8 characters long.: []
Gunjan RathoreGunjan Rathore
@chris cool thanks by deactivating validation it works.
Nadine AwsyNadine Awsy
I got the below error:

There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Update failed. First exception on row 0 with id 0018d00000GisvWAAR; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Account number must be 8 characters long.: []

Sol. was to deactivtate validation rule :
User-added image
Snehal BrahmbhattSnehal Brahmbhatt

Please follow below steps to clear the Trailhead Challenge.

  1. Open your organization by clicking Launch button
  2. Click on Object Manager
  3. Search for Account and click on it
  4. Click on Validation Rules
  5. Remove custom validation Rule as displayed in screenshot below
  6. User-added image