+ Start a Discussion
Rama NPSPRama NPSP 

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: []

Hi 
I am working on Trailhead module: Test your Process. I followed all the steps in creating Process Builder through Trailhead and I am getting below error:
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: []
Can one of you help or let me know, what I am doing wrong.
Thanks
Best Answer chosen by Rama NPSP
Roman RiabenskyiRoman Riabenskyi
Do you have a validation rule on this object? Try to deactivate all validation rules on this object and run the process builder again 

All Answers

Roman RiabenskyiRoman Riabenskyi
Do you have a validation rule on this object? Try to deactivate all validation rules on this object and run the process builder again 
This was selected as the best answer
Rama NPSPRama NPSP
Thank you Roman,
After I deactivate validation rules on this object, I was able to run the process builder.
Rama NPSPRama NPSP
Hi 
I am working on a Super badge Business Administration specialist. I am unable to complete: Create Reports and Dashboards for Sales and Marketing Managers badge. I am getting below error. I tried couple of times and unable to complete this badge :(
Challenge Not yet complete... here's what's wrong: 
Could not find a report named 'Opportunities by Rep and Close Month' in the 'Global Sales Reports' folder.
VARUN GULATI 30VARUN GULATI 30
Hi Roman,
Deleting the validation Rule helps clearing the challenge, however, can you help me understand why the Validation Rule conflicts over here in first place itself.


Thanks & Regards,
Varun Gulati
PKayPKay
Guys... I have same question as above. The process was to run on Account address change, to update all contact addresses. Doing the same playground trailhead. 
Deactivating a validation rule on Contact address field didn't help. It worked after I removed validation rules from account numbers as well.

What's the logic behind this? Any insights will be greatly appreciated. Thank you.
Megan GallagherMegan Gallagher
I know it's been a bit since you asked this, but make sure you've deactivated all your account triggers that you might have created.  The challenge is adding an account and deleting it, and if, like me, you've been using this dev ed for awhile, you probably have an account trigger that prevents deletes from a previous module.  Deactivating that trigger resolved the issue for me.
Claire McMurtryClaire McMurtry
Hi all, I"m a beginner with SF and am encountering a new error message that I'm mystified by - can you help? I've run this process with Dataloader a bunch of times and have enver gotten this message: TDTM_Contact: execution of AfterUpdatecaused by: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Use one of these records?: [](npsp)

I checked and there's only one Validation Rule for contacts and it's been in place since we set up Salesforce back in December, so that can't be the cause... Help??
Yoona LeeYoona Lee
Hi @Claire McMurtry,

I had the same issue initially- Do check Validatio Rule for Account, Contracts, Opportunity to be safe. In my case, I had a Validation Rule set up under Account object, which caused the error.

My error said, 
"FIELD_CUSTOM_VALIDATION_EXCEPTION, Account number must be 8 characters long: []"
In the previous exercise, I had to set up a Validation Rule to ensure my account number was at least 8 characters long. Once I deactivated this rule, I was able to pass the training. 

Hope this helps!
Rohit BiradarRohit Biradar
Hello,

This error comes when there is some some validation rule set up for Account object. Remove or Delete that validation rule should help you.

Peace.
Artjom DzugArtjom Dzug
I got this error with a completly clean org when i tried to make the process builder. Weird part is, the process works as it should, but the trailhead won't let me pass further... Any suggestions ? 
P.S. I actually double checked, but i dont have any validation rules on any objects.
David ArisaDavid Arisa
I am having the same issue i don't have any validation rules set. The error message persists
Cristine Otero 2Cristine Otero 2
Check your triggers on account and opportunities objects 
Jitender Singh 2589Jitender Singh 2589
you need to go to account object, validation rule & open - Account_Number_8_Characters (this was created for an earlier exercise). Deactivate it and then recheck the test. Worked for me.
Labhansh Gupta 3Labhansh Gupta 3

Hi , I got Similar error while doing the SUPERBADGE - Process Automation Specialist . In the first part of this superbadge , there is a need to create a validation . 

I used following formula - 

State <> 'US'
 || 
LEN(State) <> 2
 || 
NOT(Country  ="US"  || Country = "USA"  || Country = "United States")

Here the error was "

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, State should only be US: []
Close errors " . 

 

Can someone please help me . I cannot deactivate or delete the Validation because it is the primary requirement for the first part of the Superbadge. 

Becca Sanchez 8Becca Sanchez 8
Deleting all validation rules soled my problem. Can someone answer why validation rules on this object would affect the email approval process? Seems like the validation rules shouldn't affect it.
Guilherme Cardoso 9Guilherme Cardoso 9
Hi everyone! I've tried it, but does not worked:

"Do you have a validation rule on this object? Try to deactivate all validation rules on this object and run the process builder again"
Victor Manhani 6Victor Manhani 6

Thanks to Megan Gallagher, my resolution is desactivate the trigger "AccountDeletion" from the Account object.

Only for support, it also can be Validation Rule from the object, required field and process builder... Thanks for all help!

Mohamed RtibiMohamed Rtibi
Hi,
try to delet Contact validation rules. it works.
 
Saumitra Tripathi 2Saumitra Tripathi 2
Hi , I got Similar error while doing the SUPERBADGE - Process Automation Specialist . In the first part of this superbadge , there is a need to create a validation  rule.Here is my validation rule:
LEN( State )  <> 2 ||  CONTAINS( Country ,"U.S")   ||  CONTAINS( Country ,"u.s.a")  ||   CONTAINS( Country ,"United State")  ||  CONTAINS(Country,"United States of America")  ||  CONTAINS(Country,"U.S.A")  ||   NOT( ISBLANK( Country ) )


Here the error was "
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, State should only be US: []
Close errors " . 
jyotijyoti
For those doing the Process Automation Specialist badge, this is clearly an error in the validation script as the requirement call for verification of both the State and Country fields.  For what it's worth, having a validation rule on just the State length allowed me to pass the first step.
Bart Van LaerBart Van Laer
I'm doing the module Admin Intermediate > Lightning Flow > Automate Simple Business Processes with Process Builder.

I have to create a process to grKeep contact addresses in sync with their account's address
"You've been given a requirement to keep contact addresses in sync with the accounts they belong to. Use Process Builder to create a process on the Account object that updates child Contact addresses when an account's address is updated."


I get the following error, although I have deleted both the validation rules on Contact and Account:

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 0013X00002pFftsQAC; first error: FIELD_INTEGRITY_EXCEPTION, There's a problem with this country, even though it may appear correct. Please select a country/territory from the list of valid countries.: [ShippingCountry]

Does anybody  know what I'm doing wrong?
Kana Ram YadavKana Ram Yadav
NOTE: To complete this challenge, you may have to deactivate the validation rule for the Account object
Piyush Borse 11Piyush Borse 11
Hi, Try following 2 steps:-
1) Goto object manager -> account -> validation rules -> deactivate any validation rule if one is active.
2) If error persists, goto developer console -> open trigger -> see if any trigger related to account is triggering on this operation,
if yes deactivate it. 
Hope it solves your problem:)