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
Mai Sackerlotzky 8Mai Sackerlotzky 8 

Lightning SuperBadge Issue in challenge #6

I'm receiving the following error on challenge #6 of the Lightning Superbadge:

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: Delete failed. First exception on row 0 with id 0035000002hUBgRAAW; first error: DELETE_FAILED, Your attempt to delete Sam the ninja could not be completed because it is associated with the following adventure packages.: null, null : []

Looking at the Developer Console, it looks like the code which checks the system is forgetting to delete the Adventure Package records before deleting the Contact. Has anyone else run into this issue?

Thank you!
Best Answer chosen by Mai Sackerlotzky 8
Mai Sackerlotzky 8Mai Sackerlotzky 8
Just a quick update, I was able to resolve this issue by removing the strict lookup relationship to Contact on the Adventure Package object. The Explorer__c field was set to "Required" and "What to do if the lookup record is deleted?" was set to "Don't allow deletion of the lookup record that's part of a lookup relationship.". I updated the "Required" to false and changed "What to do if the lookup record is deleted?" to "Clear the value of this field. You can't choose this option if you make this field required."

This fixed the Challenge Check code error, and I was able to finally get a confirmed Complete checkmark.

All Answers

Mai Sackerlotzky 8Mai Sackerlotzky 8
Just a quick update, I was able to resolve this issue by removing the strict lookup relationship to Contact on the Adventure Package object. The Explorer__c field was set to "Required" and "What to do if the lookup record is deleted?" was set to "Don't allow deletion of the lookup record that's part of a lookup relationship.". I updated the "Required" to false and changed "What to do if the lookup record is deleted?" to "Clear the value of this field. You can't choose this option if you make this field required."

This fixed the Challenge Check code error, and I was able to finally get a confirmed Complete checkmark.
This was selected as the best answer
Kasper JensenKasper Jensen
Thank you, Mai!
Ronald OlechRonald Olech
Thank you!  That fixed my issue too.
Michael RuckerMichael Rucker
This solved my problem also. How in the world did you figure that one out? Was it the Dev Console log details ?
I was looking at these messages, but putting 2 and 2 together to tweak that constraint was a little beyond me.
Thanks!
Ian Carswell 24Ian Carswell 24
Thanks this solved the problem for me.
Venkatesan SundaramVenkatesan Sundaram
Thank you. Was helpful. Got the super badge today !
ForceMantis (Amit Jain)ForceMantis (Amit Jain)
Thank you Mai Sackerlotzky 8.
Mai Sackerlotzky 8Mai Sackerlotzky 8
Jeff M, it may be a different relationship. I had to go through the entire debug log to find this issue.

It's also been quite a while since I ran into this problem; it may be that updates have been made with the Winter '17 release that changed the data import process for this super badge. Can you please post your error to a new question and I will look at it?
SamarjeetSamarjeet
Thanks Mai Sackerlotzky 8, after spending many hours this thread helped me. 
Thaddeus Ward 2Thaddeus Ward 2
Yes.  Very helpful.  I believe this should be logged as a bug in the process.  It has nothing to do with what we are testing here.
Harpreet AjimalHarpreet Ajimal
Hi ,
I am facing an issue in #6

here is my process flow below:

 Fulfillment Object to start my Process - when record is created or edited 

entry criteria
{Fulfillment_c}.Status equals cancelled 


Immediate Actions 

Update Record - [Fullfillments_c].Opportunity.OpportunityLineItems

Set New fields

Sales Price reference {Fulfillment_c].Deposit_c


The issue is that i am unable to access [Fullfillments_c].Package.OpportunityLineItems
and is there somethng related to deleting a record and Liine Item ID Equals Formula [Fulfillment__c}.AdventurePackageId__c ???
Do I need to create a field named Package ??
I have already installed the unmanaged package

the error is:
Challenge Not yet complete... here's what's wrong: 
The Fulfillment Cancellation Automation process does not appear to be working properly. Make sure that a cancelled Fulfillment updates the Adventure Package correctly.
Mai Sackerlotzky 8Mai Sackerlotzky 8
Harpeet, I would recommend posting this issue to a new question, as your error is different from the one I had. When you repost, make sure to provide your exact process criteria. It sounds like you may be missing a filter somewhere.
Harpreet AjimalHarpreet Ajimal
Hi Mai,
thanks for your reply,
Actually my concern is that as its written in the challenge that we need to create Fulfillment Cancellation Automation to handle cleaning up data if an opportunity is cancelled,
1. So for deleting the explorer related to adventure package do i need to accomplish through apex using process builder?
2. I am unable to access 
[Fullfillments_c].Package.OpportunityLineItems    
instead m using
[Fullfillments_c].Opportunity.OpportunityLineItems so, is trhere any problem related to it?
3.Do i need to use any criteria in case of scheduled adventure date?


 
Harpreet AjimalHarpreet Ajimal
Hi,
please help me pass this challenge, its really frustating
i am unable to access the opportunityLineItem id , so how would pass that to an apex class which i have created for the deletion of explorer records
Paolo CartaPaolo Carta
Thank you!
Megan HooserMegan Hooser
Thank you! I got so confused seeing an error on Sam the ninja haha
Devender TharejaDevender Thareja
Thanks Mai Sackerlotzky 8.
Amy Bucciferro 24Amy Bucciferro 24
Thank you for this, solved the issue!
Babita Dadarwal 10Babita Dadarwal 10
Thank you Mai Sackerlotzky 8 !!!
Robert Christensen 7Robert Christensen 7
Thanks Mai Sackerlotzky 8!  Your solution worked like a charm.
Yury BondarauYury Bondarau

Since there 50 likes on this solution  - the problem occurs quite often

Thanks Mai
 

Bob RhodesBob Rhodes
Thank you Mai, this solution worked.  I hope all is well
Nicolás KacowiczNicolás Kacowicz
@Harpreet Ajimal you have to use a Formula Field, not just Reference.
Taryn Murray 245Taryn Murray 245
@mai

My process builder is setup correctly (with filter criteria), my Explorer fields are no longer required, but I still get the same 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.QueryException: List has no rows for assignment to SObject

​This is driving me crazy! Please can someone assist?
Yashad TayalYashad Tayal
@Taryn, 

I am getting the same error. --- There was an unexpected error in your org which is preventing this assessment check from completing: System.QueryException: List has no rows for assignment to SObject

Were you able to solve the issue?
Teresa AlukuTeresa Aluku
@ Mai

Trying to complete Step 4 of the Ligthning Experience Specialist and I am receiving the following 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 0064x000005xJW9AAM; first error: CANNOT_EXECUTE_FLOW_TRIGGER, We can't save this record because the “Sales Automation 1” process failed. Give your Salesforce admin these details. No applicable approval process was found. Error ID: 748213608-39244 (1294680136): []

Please help...Thanks