Skip to main content

Hi everyone, 

 

I am working on the "Create Validation Rules" challenge and facing this background error when clicking the verification button:  

 

"An unexpected error occurred while inserting Opportunity records and we couldn't check your work. Make sure Opportunity records can be inserted in this org, and click 'Check Challenge' again." 

 

I have already created the validation rule 'Support_Plan_Expiration_Date_Required' on the Opportunity object. I also checked for picklist restrictions and field dependencies, but the background test data insertion is still failing.  

 

What other backend automations, flows, or duplicate rules on Account/Opportunity could be blocking this standard test data insertion?  

 

Any guidance would be highly appreciated. Thanks! 

 

 

#Trailhead Challenges

3 Antworten
  1. 21. Aug., 17:05

    Hey Tejsvi, 

     

    This error is confirmed as a real recurring issue, other people hit this exact "unexpected error inserting Opportunity records" message during this same challenge, and the fix in every case was disabling leftover triggers/automations from earlier Trailhead exercises, not the validation rule itself. 

     

    Fix: 

    1. Setup > Object Manager > Opportunity (and Account) > Triggers, deactivate any Apex triggers left active from previous modules 

    2. Also check Flows on Opportunity/Account (Setup > Flows), deactivate any that auto-run on insert 

    3. Check for any duplicate rules on Account/Opportunity that might silently block the test insert, temporarily deactivate them too 

    4. Once disabled, click Check Challenge again 

     

    Your validation rule itself sounds correctly built, the checker's background insert is failing due to something else in the org blocking Opportunity creation, not your rule's logic. 

     

    Reference:

    https://qiita.com/Keiji_otsubo/items/6d4f4262a0b82197dc89

0/9000