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
Sheida Saedifaez 5Sheida Saedifaez 5 

Hi there, i am taking the process builder test and i get a DML 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: Update failed. First exception on row 0 with id 001o000000YgPyRAAV; first error: FIELD_INTEGRITY_EXCEPTION, There's a problem with this country, even though it may appear correct. Please select a country from the list of valid countries.: Shipping Country: [ShippingCountry]

this is the one that updates contacts mailing address when the account shipping address is changed. 
Best Answer chosen by Sheida Saedifaez 5
Boris BachovskiBoris Bachovski
By the looks of it, I think you've enabled standard state and country picklists in your org and you're trying to create a record through APEX which has a ShippingCountry that does not match to it's picklist value. For an example if your standard picklist value is "USA" and you try to set ShippingCountry to be "United States of America" - you'd get that error. Please check the set value as well as the picklist value for that country.

All Answers

Boris BachovskiBoris Bachovski
By the looks of it, I think you've enabled standard state and country picklists in your org and you're trying to create a record through APEX which has a ShippingCountry that does not match to it's picklist value. For an example if your standard picklist value is "USA" and you try to set ShippingCountry to be "United States of America" - you'd get that error. Please check the set value as well as the picklist value for that country.
This was selected as the best answer
Sheida Saedifaez 5Sheida Saedifaez 5
Thanks Amit and Boris, i am trying out the suggestions now and will post soon. Thanks, Sheida.
Sheida Saedifaez 5Sheida Saedifaez 5
the problem was fixed by disabling the State/Country pick list. I validated it in a controlled environment, got it working with disabling it, checked the challenge, it worked, enabled it, and rechecked and it failed.Thanks both!!
Boris BachovskiBoris Bachovski
I'm glad you resolved the problem Sheida.

@Amit, please do not post irrelevant answers and threads that tell the users to accept your answer. This will keep the forums clean and relevant.
Kajal KantariaKajal Kantaria
Boris,
You are simply the best. I had  been dealing with the same error showing above and asked for help. No one told me what you just mantioned about " State and Country Picklist". Yes, I enabled standard state and country picklists in my org few days ago as i was learning all new tools. but now I just desable standard state and country picklists and problem solved.

Thank you soooooo much.
Nitish BandariNitish Bandari
Hey Boris,
I was taking the same test and went through the same error. i tried disabling the State and Country/Territory picklists. but after disabling it, i got the following error:

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: CANNOT_EXECUTE_FLOW_TRIGGER, We can't save this record because the “Address Change” process failed. Give your Salesforce admin these details. <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Error ID: 1451929444-59578 (7442595):

Please help me in resolving this. Thanks in advance.