+ Start a Discussion
farouk fakunlefarouk fakunle 

Superbadge- Lightning Experience Step #9

I am get this error: "Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type".

I believe i configured the report according to the instructions but it is still showing and error. Any assistance or insight would be apreciated. 
Best Answer chosen by farouk fakunle
Jeff DouglasJeff Douglas
Farouk,

Go back and check the requiements again. We made an update yesterday and I think some of them has changed slightly. Check the report name, report type, groupings, filters and type of chart to make sure everything is correct.

Jeff Douglas
Trailhead Developer Advocate

All Answers

Jeff DouglasJeff Douglas
Farouk,

Go back and check the requiements again. We made an update yesterday and I think some of them has changed slightly. Check the report name, report type, groupings, filters and type of chart to make sure everything is correct.

Jeff Douglas
Trailhead Developer Advocate
This was selected as the best answer
farouk fakunlefarouk fakunle
Hello Jeff, Thank you for responding, are we creating a custom report type for this step?
farouk fakunlefarouk fakunle

Still getting an error:Has anyone completed #9, i am getting this error: Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type.

This is my customization - 

User-added image

 

User-added imagea

User-added image

 

 

sfdcFanBoysfdcFanBoy
Is this resolved?
 
bobnunny1bobnunny1

I am having the same problem as Farouk.  The requirements state: 

First, create a summary report on opportunities named Opp Stage by Adventure. Filter it by Product Date within the past year. For the purpose of this superbadge, assume this date range is 1/1/2026-12/31/2026. Second, add a stacked vertical bar chart of the number of explorers by product name, grouped by stage, to your summary report.

First question, is where is Product Date?  Can't find it on any object.  But can't seem to get past this piece.

bobnunny1bobnunny1
Found Product Date (it's now Adventure Date).  But I'm still getting:
Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type.

I'm using the Opportunities with Adventures Report Type and have the below.  Can anyone see what's wrong?
User-added image
sfdcFanBoysfdcFanBoy
What about the number of explorers count for each product?

Requirement: "A stacked vertical bar chart of the number of explorers by product name, grouped by stage"
sfdcFanBoysfdcFanBoy
@bobnunny1  Also, you filter shouldn't include Close Date.  It should just be on Product date (adventure date).
bobnunny1bobnunny1
I'm a little confused.  What on the chart isn't stacked?  Stage is on the bottom(group) and number of explorers is on the left with the product names for each stack in the legend.

But I actually made that Close Date change last night and that's the only thing I had wrong.  Still, they had conflicting requirements in my opinion.  Earlier they stated that the Opportunity Product Service Date should be 2026, but below, the Product Date should be 2026, and neither of them was adhering to the new naming convention of Adventure date.

Still, an interesting exercise.
sfdcFanBoysfdcFanBoy
Did it accept now? Or still an issue?
Prasad Ballari 7Prasad Ballari 7
I completed this superbadge.. WOW.. Good feeling indeed
sfdcFanBoysfdcFanBoy
@Prasad Ballari 7: can you let us know what the issue is here with bobnunny1's answer?
sfdcFanBoysfdcFanBoy
What is the report type to be used here?
Prasad Ballari 7Prasad Ballari 7
@sfdcFanBoy. We have to use Adventure Date which is in "Opportunities with Adventures" object. 
Prasad Ballari 7Prasad Ballari 7
@sfdcFanBoy - Report type is summary.
sfdcFanBoysfdcFanBoy

Waahhhh..   Stacked Vertical Bar Chart !!!  I missed the word Stacked.  That was the issue!  I was using just a vertical chart.  Completed the superbadge now!!

Prasad Ballari 7Prasad Ballari 7
Congratulations @SfdcFanBoy
Charles Cummings 7Charles Cummings 7
Can I get some feedback here. I'm getting the same error listed above. Here is my current report and what it looks like in the Lightning page. 

User-added image

User-added image
Charles Cummings 7Charles Cummings 7
I think my follow up question is how are explorers represented. In this scenario, there seems to be only 1 explorer per opportunity since there is 1 explorer as a contact role on each opportunity. Maybe this has something to do with it....
Scott G WaltersScott G Walters
I've tried everything in this forum and every other I can find. I cannot get passed step.
One questions though, I can't use the correct api name as I deleted a report and then emptied the recycle bin. I read in other forums that if the label of the report is
Opp Stage by Adventure

then the namje can be something like
Opp_Stage_by_Adventure3

Can anyone here confirm that?
Other than that, I'm lost. I've tried grouping by Stage and Product Name....

User-added imageUser-added image
Nothing seems to work... any more suggestions?
sfdcFanBoysfdcFanBoy
@Scott G Walters

You can try

Opp_Stage_by_Adventure_New

It did work for me.
Scott G WaltersScott G Walters
@sfdcFanBoy - thank you for your tip. It may have helped. 

Another issue I found after making the change sfdcFanBoy suggested was the fact I had an old report called:
oldOpp Stage by Adventure
oldOpp_Stage_by_Adventure

I renamed that report to:
old Stage by Adventure
old_Stage_by_Adventure

...and boom, complete.

Thanks for the help. 
srpjnzsrpjnz
So this is doing my head in.  I have the same problem, and followed this thread right to the end.  I have set up the report with report type "Opportunities with Adventures", and grouped by Stage then Adventure Name.  I have added in teh filter on Adventure Date.  And I have added in a vertical stacked chart.  It all looks good, see:
User-added image

But I still get the error:
Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type.

Can anyone else where I may be going wrong?  Thanks
srpjnzsrpjnz
OK fixed this.  I was going mad, so what I did was log out of my DEV instance and out of Trailhead.  Logged back into both and tried the challenge again and it worked.  No idea why, but it did.
Nick LiechtyNick Liechty
I was getting the same error noted above. I had another report named Opp Stage by Adventure 1 (Opp_Stage_by_Adventure1). Once I deleted that report it went right through!
Darrell GallegosDarrell Gallegos
Can somebody explain the requirement below?

UI Changes for Sales Reps
Sometimes reps show adventure records to prospective customers on their phones. Add the custom photo uploader component included in your unmanaged package to the top-level record view so that reps see it when they open an adventure record.

I'm either missing it or I'm not understanding what component in the unmanaged package this is referring to.

Thank you.
Debopriyo Dey 4Debopriyo Dey 4
Not completing though followed every step, showing the same error about report
Have tried and followed everything in the forum suggestion. But I still get the error:
Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type.

Please help.
Darrell GallegosDarrell Gallegos
@Debopriyo Dey 4 I was having the same problem. I changed my grouping to Product Name by Stage and it completed. I see you have Stage by Product Name. Give it a try with alternate grouping.
Debopriyo Dey 4Debopriyo Dey 4
@Darrell Gallegos Tried but did not solve yet. Is there Salesforce Help support where they can query the actual missing thing for the challenge?
Nazeer AhamedNazeer Ahamed
@Darrell Gallegos I' also looking at the same thing.. 
UI Changes for Sales Reps
Sometimes reps show adventure records to prospective customers on their phones. Add the custom photo uploader component included in your unmanaged package to the top-level record view so that reps see it when they open an adventure record.
themaxworldthemaxworld
@Darrell Gallegos did you complete the 'photo uploader component' step?
In case somebody else is looking for the same input, here it goes. There is a custom lightning component (PictureGallery) in the unmanaged LEX Superbadge package which we installed as part of the prework. You should be able to find the component in Lightning App Builder window, Custom component section.

Lightning App Builder with custom component

But to have the custom component available in the given window, we have to setup and configure My Domain first. Due to security standards, the custom components can't be used without My Domain enabled.
I have cleared the  superbadge - please drop a comment if I can share any other input on this.

Thanks!
themaxworldthemaxworld
@Debopriyo Dey 4 
Probably you have already resolved the above reporting issue now. Looks to me: it's about the chart type you have choosen. The challenge requirement asks for 'stacked vertical bar chart'. Depending on the axis choice and group by/ stack by parameters it should look like this:

Stacked Vertical Bar Chart

Hope this helps. Please let me know if I can share any other input. Thanks!
Debopriyo Dey 4Debopriyo Dey 4
nope not solved yet. tried everything suggested on this post.
themaxworldthemaxworld
@Debopriyo Dey 4 are you still getting the error around the 'Opp Stage by Adventure' report? I completed this with lightning experiece (but this should not make any difference). Did you try this out in a fresh org.? If not, give it a shot. Here is my configuration snapshots for your reference.

1. Report Type: Opportunities with Adventures

2. Check out report name and API names through Report Properties window:

User-added image

3. Check out filters and Grouping configurations.

User-added image

4. Then, I ran the report. In the report view page I configured the 'stacked vertical bar chart'.
This is how my report looks without the chart.
User-added image


5. Stacked vertical bar chart configurations:

User-added image

---

User-added image


These should  be all. Please let me know if this helps. Thanks!
 
MUSTAPHA ELMADIMUSTAPHA ELMADI

Finaly got the badge my probleme was the domaine i did have it but i didn't change the color background of the org 

Good luck

The Real Scott MorrisonThe Real Scott Morrison
I'm still getting the error, everything looks right to me in my org. @Trailhead people if you're listening, this is a very frustrating challenge and needs to be more specific with the error. 


User-added image
How does this fail? 



 
Reid Beckett 16Reid Beckett 16
@The Real Scott Morrison
It's not very clear in the instructions, but you need to switch the grouping so that it is by Adventure Name first, then the stage name.
User-added image
Donald Rivard.ax1922Donald Rivard.ax1922
Does not work for me either.
Martin Bristow 5Martin Bristow 5
I have worked my way through the superbadge and have passed everything up to the #9 challenge.  I submitted the 9th challenge and received the following error ...
Challenge Not yet complete... here's what's wrong: 
Could not find the setup of your My Domain in your org. Ensure that you have properly set the Background Color. Make sure that you've received an email from Salesforce notifying you that your domain is ready for testing before running this challenge.

I am using a trailhead playground and it has worked fine up to now.  Also I shouldn't need to set up My Domain in a trailhead playground!!!! Any help will be great .... hope I have done something really stupid
Martin Bristow 5Martin Bristow 5
Just answered my own question.  I believe @MUSTAPHA ELMADI had the same issue as well.  You need to change the background color on the org.  The thing that threw me was I used a trailhead playground so I didn't even need to set up an org and didn't see the reference to change the background color. Go to My Domain and edit the Authentication Configuration and then change the Background Color ... I believe any random color will do as long as you change it
Bo DikemanBo Dikeman
Thank you @srpjnz!!
After battling this forever, and not being able to find any mistakes, I did as you suggested and closed everything.  I logged back in and checked #9 again.  Boom, there's my superbadge.

Thanks again!
Uttirna DasUttirna Das
Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type.

Don't Know what is the problem. It's not happening. Stuck for 3 days. Please Help me. 

User-added image
User-added image
User-added image
shashi kumar 58shashi kumar 58
Please follow the below steps for Challenge no #9
Lightning Component Framework Specialist

1. AddBoatReview.cmp
 <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
    <aura:attribute name="boatReview" type="BoatReview__c" access="public"/>
    <aura:attribute name="boatReviewRecord" type="Object" access="public"/>
    <aura:attribute name="boat" type="Boat__c"/>
    <aura:attribute name="recordError" type="String" access="private"/>
    <aura:registerEvent name="BoatReviewAdded" type="c:BoatReviewAdded"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <force:recordData aura:id="service"
                      targetError="{!v.recordError}"
                      targetRecord="{!v.boatReviewRecord}"
                      targetFields="{!v.boatReview}"
                      fields="Id,Name,Comment__c,Boat__c"
                      recordUpdated="{!c.onRecordUpdated}"
                      />
    <lightning:layout multipleRows="true">
        <lightning:layoutItem size="12" padding="around-small">
            <lightning:input name="title" label="Title" value="{!v.boatReview.Name}"/>
        </lightning:layoutItem>
        
        <lightning:layoutItem size="12" padding="around-small">
            <label class="slds-form-element__label" for="input-id-01">Description</label>
            <lightning:inputRichText value="{!v.boatReview.Comment__c}" disabledCategories="FORMAT_FONT"/>
        </lightning:layoutItem>
        
        <lightning:layoutItem size="12" padding="around-small">
            <label class="slds-form-element__label" for="input-id-01">Description</label>
            <c:FiveStarRating value="{!v.boatReview.Rating__c}" readonly="false"/>
        </lightning:layoutItem>
        
        
        <lightning:layoutItem size="12" class="slds-align--absolute-center">
            <lightning:button iconName="utility:save" label="Submit" onclick="{!c.onSave}"/>
        </lightning:layoutItem>
    </lightning:layout>
    <aura:if isTrue="{!not(empty(v.recordError))}">
        <div class="recordError">
            <ui:message title="Error" severity="error" closable="true">
                {!v.recordError}
            </ui:message>
        </div>
    </aura:if>
</aura:component>

2. AddBoatReviewController.js
({
    doInit : function(component, event, helper) {
        helper.onInit(component,event);
    },
    onSave : function(component, event, helper) {
        component.set("v.boatReview.Boat__c",component.get("v.boat.Id"));
        component.find("service").saveRecord(function(saveResult){
            if(saveResult.state==="SUCCESS" || saveResult.state === "DRAFT")
            {
                
               var resultsToast = $A.get("e.force:showToast");
                if(resultsToast)
                {
                    resultsToast.setParams({
                        "title": "Saved",
                        "message": "Boat Review Created"
                    });
                    resultsToast.fire(); 
                }
                else
                {
                    alert('Boat Review Created');
                }
            }
            else if (saveResult.state === "ERROR") {
                var errMsg='';
                console.log('Problem saving record, error: ' + JSON.stringify(saveResult.error));
                for (var i = 0; i < saveResult.error.length; i++) {
                    errMsg += saveResult.error[i].message + "\n";
                }
                component.set("v.recordError", errMsg);
            }
            else
            {
                console.log('Unknown problem, state: ' + saveResult.state + ', error: ' + JSON.stringify(saveResult.error));
            }
            var boatReviewAddedEvnt=component.getEvent("boatReviewAdded");
                boatReviewAddedEvnt.fire();
                 helper.onInit(component,event,helper);
           
        });
       
    },
    onRecordUpdated : function(component, event, helper) {
        var eventParams = event.getParams();
        if(eventParams.changeType === "CHANGED") {
            var changedFields = eventParams.changedFields;
            var saveResultsToast = $A.get("e.force:showToast");
                if(saveResultsToast!='undefined')
                {
                    saveResultsToast.setParams({
                        "title": "Saved",
                        "message": "Boat Review Saved"
                    });
                    saveResultsToast.fire(); 
                }
                else
                {
                    alert('Boat Review Saved');
                }
        }
    }
})

3.AddBoatReviewHelper.js
({
    onInit : function(component,event) {
        component.find("service").getNewRecord(
            "BoatReview__c", // sObject type (entityAPIName)
            null,      // recordTypeId
            false,     // skip cache?
            $A.getCallback(function() {
                var rec = component.get("v.boatReview");
                var error = component.get("v.recordError");
                var boat=component.get("v.boat");
                if(error || (rec === null)) {
                    console.log("Error initializing record template: " + error);
                }
                else {
                    component.set("v.boatReviewRecord.Boat__c",boat.Id);
                    component.set("v.boatReview.Boat__c",boat.Id);
                }
            })
        );
    }
})

4. FiveStar.cmp
<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
    <aura:attribute name="value" type="Integer" default="0" />
    <aura:attribute name="readonly" type="Boolean" default="false" />
    <aura:handler name="change" value="{!v.value}" action="{!c.onValueChange}"/>
    <ltng:require styles="{!$Resource.fivestar.rating.css}" />
    <ltng:require scripts="{!$Resource.fivestar.rating.js}"
            afterScriptsLoaded="{!c.afterScriptsLoaded}" />    
    <ul aura:id="ratingarea" class="{!v.readonly ? 'readonly c-rating' : 'c-rating'}"></ul>
</aura:component>

5. FiveStarContoller.js
({
    afterScriptsLoaded : function(component, event, helper) {
        var domEl = component.find("ratingarea").getElement();
        var currentRating = component.get('v.value');
        var readOnly = component.get('v.readonly');
        var maxRating = 5;
        var callback = function(rating) {
            component.set('v.value',rating);
        }
        component.ratingObj = rating(domEl,currentRating,maxRating,callback,readOnly); 
    },
    
    onValueChange: function(component,event,helper) {
        if (component.ratingObj) {
            var value = component.get('v.value');
            component.ratingObj.setRating(value,false);
        }
    }
})

6. BoatReviews.cmp

<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" 
                controller="BoatReviews">
    
     
    <aura:attribute name="boat" type="Boat__c" access="public"/>
    <aura:attribute name="boatReviews" type="BoatReview__c[]" access="private"/>
    <aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
    <aura:handler name="change" value="{!v.boat}" action="{!c.doInit}"/>
     <aura:method name="refresh" action="{!c.doInit}"> 
     </aura:method>
    <aura:iteration items="{!v.boatReviews}" var="BoatReview">
        <c:FiveStarRating aura:id="FiveStarRating" value="{!BoatReview.Rating__c}" readonly="true"/>
    </aura:iteration>
    

    <aura:if isTrue="{!v.boatReviews.length==0}">
        <lightning:layoutItem class="slds-align_absolute-center" flexibility="auto" padding="around-small">   
              <ui:outputText value="No reviews available" />
        </lightning:layoutItem>
    </aura:if>
  <div class="slds-feed">
    <ul class="slds-feed__list">
         <ui:scrollerWrapper class="scrollerSize">
       <aura:iteration items="{!v.boatReviews}" var="review">
          
        <li class="slds-feed__item slds-scrollable_y">    
            <article class="slds-post">
                <header class="slds-post__header slds-media">
                <div class="slds-media__figure">
                    <a href="javascript:void(0);" class="slds-avatar slds-avatar_circle slds-avatar_large">
                        <img alt="{!review.CreatedBy.Name}" src="{!review.CreatedBy.SmallPhotoUrl}" title="{!review.CreatedBy.Name}"  />
                    </a>
                </div>
                <div class="slds-media__body">
                        <div class="slds-grid slds-grid_align-spread slds-has-flexi-truncate">
                            <p><a data-userid="{!review.CreatedBy.Id}" href="javascript:void(0);" title="{!review.CreatedBy.Name}" onclick="{!c.onUserInfoClick}">
                                {!review.CreatedBy.Name}
                                </a> 
                                — {!review.CreatedBy.CompanyName}
                            </p>
                        </div>
                        <p class="slds-text-body_small">
                            <lightning:formattedDateTime value="{!review.LastModifiedDate}" year="numeric" month="short" day="numeric"  hour="2-digit" minute="2-digit" second="2-digit" />
                        </p>
                    </div>
            </header>
             <div class="slds-post__content slds-text-longform">
                 <p class="slds-text-title_caps">{!review.Name}</p>
                 
                 <p class="slds-text-body_small"><lightning:formattedRichText value="{!review.Comment__c}"/> </p>
            </div>
             <footer class="slds-post__footer">
    <ul class="slds-post__footer-actions-list slds-list_horizontal">
        <li class="slds-col slds-item slds-m-right_medium">
            <c:FiveStarRating value="{!review.Rating__c}" readonly="true"/>
        </li>
        
    </ul>
                 
</footer>
            </article>
          </li>
          
        </aura:iteration>
              </ui:scrollerWrapper>
    </ul>
  </div>
</aura:component>

6. BoatReviewsContoller.js

({
    refresh : function(component,event,helper){
        console.log("refresh called")
        this.doInit;
    },
    doInit : function(component,event,helper){
        console.log("BRCjs: doInit");
        helper.onInit(component, event);
    },
    onUserInfoClick : function(component,event,helper){
        var userId = event.currentTarget.getAttribute("data-userid");
        var navEvt = $A.get("e.force:navigateToSObject");
        navEvt.setParams({
            "recordId" : userId,
        });
        navEvt.fire()

    },
})

7. BoatReviewsHelper.js
({
    onInit : function(component, event){
                var boat = component.get("v.boat");
                console.log("BRHjs:onInit started: boatId is " + boat.Id);
                var action = component.get("c.getAll");
                action.setParams({"boatId" : boat.Id});
                console.log("boatId: " + boat.Id);

                //add the callback behavior for when the response is received
                action.setCallback(this,function(response){
                    var state = response.getState();
                    if (state === "SUCCESS"){
                        component.set("v.boatReviews", response.getReturnValue());
                        console.log("APEX success");
                        }
                        else {
                        console.log("Failed with state: " + state);
                        }
                });
                //send action off to be executed in APEX
                $A.enqueueAction(action);
    },
})

Please like if you are able to clear your challenge.

Regards,
Shashi kumar
shashi kumar 58shashi kumar 58
Superbadge
Lightning Component Framework Specialist

Challenge No #8
1. AddBoatReview.cmp


2. AddBoatReviewController.js
({
    doInit : function(component, event, helper) {
        helper.onInit(component,event);
    },
    onSave : function(component, event, helper) {
        component.set("v.boatReview.Boat__c",component.get("v.boat.Id"));
        component.find("service").saveRecord(function(saveResult){
            if(saveResult.state==="SUCCESS" || saveResult.state === "DRAFT")
            {
                
               var resultsToast = $A.get("e.force:showToast");
                if(resultsToast)
                {
                    resultsToast.setParams({
                        "title": "Saved",
                        "message": "Boat Review Created"
                    });
                    resultsToast.fire(); 
                }
                else
                {
                    alert('Boat Review Created');
                }
            }
            else if (saveResult.state === "ERROR") {
                var errMsg='';
                console.log('Problem saving record, error: ' + JSON.stringify(saveResult.error));
                for (var i = 0; i < saveResult.error.length; i++) {
                    errMsg += saveResult.error[i].message + "\n";
                }
                component.set("v.recordError", errMsg);
            }
            else
            {
                console.log('Unknown problem, state: ' + saveResult.state + ', error: ' + JSON.stringify(saveResult.error));
            }
            var boatReviewAddedEvnt=component.getEvent("boatReviewAdded");
                boatReviewAddedEvnt.fire();
                 helper.onInit(component,event,helper);
           
        });
       
    },
    onRecordUpdated : function(component, event, helper) {
        var eventParams = event.getParams();
        if(eventParams.changeType === "CHANGED") {
            var changedFields = eventParams.changedFields;
            var saveResultsToast = $A.get("e.force:showToast");
                if(saveResultsToast!='undefined')
                {
                    saveResultsToast.setParams({
                        "title": "Saved",
                        "message": "Boat Review Saved"
                    });
                    saveResultsToast.fire(); 
                }
                else
                {
                    alert('Boat Review Saved');
                }
        }
    }
})

3. AddBoatReviewHelper.js
({
    onInit : function(component,event) {
        component.find("service").getNewRecord(
            "BoatReview__c", // sObject type (entityAPIName)
            null,      // recordTypeId
            false,     // skip cache?
            $A.getCallback(function() {
                var rec = component.get("v.boatReview");
                var error = component.get("v.recordError");
                var boat=component.get("v.boat");
                if(error || (rec === null)) {
                    console.log("Error initializing record template: " + error);
                }
                else {
                    component.set("v.boatReviewRecord.Boat__c",boat.Id);
                    component.set("v.boatReview.Boat__c",boat.Id);
                }
            })
        );
    }
})

4. BoatReviewAdded.evt
<aura:event type="Component" description="Event template">
    <aura:attribute name="BoatReviewAdded" type="Boat__c"/>
</aura:event>

5. BoatReviews.cmp

<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" 
                controller="BoatReviews">
    
     <aura:attribute name="boat" type="Boat__c" access="public"/>
    <aura:handler name="change" value="{!v.boat}" action="{!c.refresh}"/>
    <aura:attribute name="boatReviews" type="BoatReview__c[]" access="private"/>
    <!-- set up the aura:method for refresh -->
    <aura:method name="refresh" action="{!c.doInit}" access="public"
                 description="BoatDetailsController.js invokes refresh whenever boat is updated">
    </aura:method>
     
    <ui:scrollerWrapper class="scrollerSize">
        <!--Scrollable content here -->
        <aura:if isTrue="{!v.boatReviews.length==0}">
            <lightning:layoutItem class="slds-align_absolute-center" flexibility="auto" padding="around-small">   
                <ui:outputText value="No Reviews Available" />
            </lightning:layoutItem>
        </aura:if>
        <div class="slds-feed">
            <ul class="slds-feed__list">
                <aura:iteration items="{!v.boatReviews}" var="boatReview">
                    <li class="slds-feed__item">
                        <div class="slds-media__body">
                       <div class="slds-grid slds-has-flexi-truncate">
                            <a href="javascript:void(0)" onclick="{!c.onUserInfoClick}"
          data-userid="{!boatReview.CreatedBy.Id}">
          {!boatReview.CreatedBy.Name}
      </a>
                        &nbsp; &mdash; &nbsp; {!boatReview.CreatedBy.CompanyName}
   </div>
                         <p><lightning:formattedDateTime value="{!boatReview.CreatedDate}" 
                                   year="numeric" month="short" day="numeric"  
                                   hour="2-digit" minute="2-digit" hour12="true"/></p>
                        </div>
                    </li>
                </aura:iteration>
            </ul>
        </div>
    </ui:scrollerWrapper>
    
    
</aura:component>

6.BoatReviewsController.js
({
    refresh : function(component,event,helper){
        console.log("refresh called")
        this.doInit;
    },
    doInit : function(component,event,helper){
        console.log("BRCjs: doInit");
        helper.onInit(component, event);
    },
    onUserInfoClick : function(component,event,helper){
        var userId = event.currentTarget.getAttribute("data-userid");
        var navEvt = $A.get("e.force:navigateToSObject");
        navEvt.setParams({
            "recordId" : userId,
        });
        navEvt.fire()

    },
})

7. BoatReviewsHelper.js
({
    onInit : function(component, event){
                var boat = component.get("v.boat");
                console.log("BRHjs:onInit started: boatId is " + boat.Id);
                var action = component.get("c.getAll");
                action.setParams({"boatId" : boat.Id});
                console.log("boatId: " + boat.Id);

                //add the callback behavior for when the response is received
                action.setCallback(this,function(response){
                    var state = response.getState();
                    if (state === "SUCCESS"){
                        component.set("v.boatReviews", response.getReturnValue());
                        console.log("APEX success");
                        }
                        else {
                        console.log("Failed with state: " + state);
                        }
                });
                //send action off to be executed in APEX
                $A.enqueueAction(action);
    },
})

8. BoatDetailController.js
({
     onFullDetails: function(component, event, helper) {
        var navEvt = $A.get("e.force:navigateToSObject");
        navEvt.setParams({
            "recordId": component.get("v.boat.Id")
        });
        navEvt.fire();
    }
})

9. BoatSelected.evt
<aura:event type="APPLICATION" description="BoatSelected fired from BoatTileController's onBoatClick handler">
    <aura:attribute name="boat" type="Boat__c"/>
</aura:event>

10. BoatSelect.evt
<aura:event type="COMPONENT" description="Boat Event">
    <aura:attribute name="boatId" type="Id"/>
</aura:event>

11. BoatDetail.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
    <aura:attribute name="boat" type="Boat__c"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <aura:attribute name="showButton" type="Boolean" default="false"/>    
     <lightning:button label="Full Details" onclick="{!c.onFullDetails }" />
    <lightning:card iconName="utility:anchor">        
        <aura:set attribute="title">
            {!v.boat.Contact__r.Name}'s boat
        </aura:set>
        <aura:set attribute="actions">
            <aura:if isTrue='{!v.showButton}'>
            <lightning:button label="Full Details" onclick="{!c.onFullDetails}"/>
            </aura:if>
        </aura:set>
        <p class="slds-p-horizontal_small">
            <lightning:layout >                
                <lightning:layoutItem flexibility="grow" size="6" mediumDeviceSize="6" largeDeviceSize="6">
                    <div class="slds-p-horizontal--small">
                        <div class="boatproperty">
                            <span class="label">Boat Name:</span>
                            <span><ui:outputText value="{!v.boat.Name}"/></span>
                        </div>
                        <div class="boatproperty">
                            <span class="label">Type:</span>
                            <span><ui:outputText value="{!v.boat.BoatType__r.Name}"/></span>
                        </div>
                        <div class="boatproperty">
                            <span class="label">Length:</span>
                            <span><ui:outputText value="{!v.boat.Length__c}"/> ft</span>
                        </div>
                        <div class="boatproperty">
                            <span class="label">Est. Price:</span>
                            <span><lightning:formattedNumber value="{!v.boat.Price__c}" currencyCode="USD" style="currency" currencyDisplayAs="symbol"/></span>
                        </div>
                        <div class="boatproperty">
                            <span class="label">Description:</span>
                            <span><ui:outputRichText class="slds-text-longform" value="{!v.boat.Description__c}"/></span>
                        </div>
                    </div>
                </lightning:layoutItem>
                <lightning:layoutItem flexibility="grow" size="6" mediumDeviceSize="6" largeDeviceSize="6">
                    <div class="imageview" style="{!'background-image:url(\'' + v.boat.Picture__c + '\')'}"/>
                </lightning:layoutItem>
            </lightning:layout>
        </p>
    </lightning:card>
</aura:component>

12. BoatDetailsController.js
({
    init: function(component, event, helper) {
        component.set("v.enableFullDetails", $A.get("e.force:navigateToSObject"));
    },
    onFullDetails: function(component, event, helper) {
        var navEvt = $A.get("e.force:navigateToSObject");
        navEvt.setParams({
            "recordId": component.get("v.boat.Id")
        });
        navEvt.fire();
    },    
    onBoatSelected : function(component, event, helper) {
        var boatSelected = event.getParam("boat");
        component.set("v.id",boatSelected.Id);
        var service = component.find("service");
        service.reloadRecord() ;
    },
    onRecordUpdated : function(component, event, helper){
        var boat = component.get("v.boat");
        console.log("onRecordUpdated called | boat: " + boat.Id);

        //invoke a refresh on the reviews tab, calling public method refresh
        var BoatReviews = component.find("BoatReviews");
        console.log("BoatReviews: " + BoatReviews);
        if(typeof BoatReviews != 'undefined'){
            BoatReviews.refresh();
        }
    },

   /* Earlier dated on 8 Jan2018
    *  onBoatReviewAdded : function(component, event, helper) {
    console.log('Event received');
    component.find("details").set("v.selectedTabId", "boatreviewtab");
}*/
    
    
    onBoatReviewAdded : function(component, event, helper){
        console.log("BDCjs: onBoatReviewAdded")
        component.find("tabs").set("v.selectedTabId", "boatreviewtab");

        //invoke a refresh on the reviews tab, calling public method refresh
        var BoatReviews = component.find("BoatReviews");
        //BRcmp is the aura:id for the component when invoked in BoatDetails.cmp
        BoatReviews.refresh();

    },
    
    
    
    
    
    
})

13. BoatDetails.cmp
 
 <aura:component description="BoatDetails"
                implements="flexipage:availableForAllPageTypes">

<aura:registerEvent name="BoatReviewAdded" type="c:BoatReviewAdded"/>
  <aura:handler name="reviewAdded" event="c:BoatReviewAdded" action="{!c.onBoatReviewAdded}"/>
    <aura:attribute name="boat" type="Boat__c"/>
    <aura:attribute name="recordError" type="String"/>
    <aura:attribute name="id" type="Id" default="" access="public"/>
    <aura:handler event="c:BoatSelected" action="{!c.onBoatSelected}"/>
    <lightning:tab label="Reviews" id="boatreviewtab">
          <c:BoatReviews boat="{!v.boat}" aura:id="BRcmp"/>
 </lightning:tab>
   

    <force:recordData aura:id="service"
                      recordId="{!v.id}"
                      mode="VIEW"
                      fields="Id,
                                Name,
                                Description__c,
                                Price__c, Length__c,
                                Contact__r.Name,
                                Contact__r.Email,
                                Contact__r.HomePhone,
                                BoatType__r.Name,
                                Picture__c"

                      targetFields="{!v.boat}"
                      targetError="{!v.recordError}"
                      recordUpdated="{!c.onRecordUpdated}" />

    <lightning:tabset variant="scoped" selectedTabId="{!v.selTabId}">
            <lightning:tab label="Details" id="details" >
                <c:BoatDetail boat="{!v.boat}"/>
            </lightning:tab>
            <lightning:tab label="Reviews" id="boatreviewtab" >
               
            </lightning:tab>
            <lightning:tab label="Add Review" id="addReview" >
                 <c:AddBoatReview boat="{!v.boat}"/>
            </lightning:tab>
        </lightning:tabset>
       
    <aura:if isTrue="{! !empty(v.boat)}">
        <article class="slds-card">
                <lightning:tabset >
                    <lightning:tab label="Details" id="details">
                        <c:BoatDetail boat="{!v.boat}"/>
                    </lightning:tab>
                    <lightning:tab label="Reviews" id="boatreviewtab">
                        Sample review
                    </lightning:tab>
                    <lightning:tab label="Add Review" id="addReview">
                        Sample add review
                    </lightning:tab>
                </lightning:tabset>
        </article>
    </aura:if>
</aura:component>

14. BoatTileController.js
({
    onBoatClick : function(component, event, helper) {
        var BoatSelectEvent = component.getEvent('BoatSelect');
        var boat = component.get('v.boat');
        BoatSelectEvent.setParams({
            "boatId" : boat.Id
        });
        BoatSelectEvent.fire(); 
        
        //var BoatSelectedEvt = component.getEvent('boatselected');
        var BoatSelectedEvt = $A.get('e.c:BoatSelected');
        BoatSelectedEvt.setParams({
            "boat" : boat
        });        
        BoatSelectedEvt.fire();
    }
})

 
AksiniaAksinia
Thanks, @sfdcFanBoy! Changing 'Close date' to 'Adventure date' was the final step to complete the superbadge
Mike Davis 43Mike Davis 43
I've done everything listed here-but I still get the error "Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type."

I'm beyond frustrated at this point.  I'd be willing to PAY someone to review it for me since there apparently isn't any Trailhead support.  

Here are my screenshots.  

User-added image
User-added image
User-added image
 
AksiniaAksinia

@Mike Davis 43, first check the dates - it's 2026
Mike Davis 43Mike Davis 43
Thank you, @Aksinia!  That solved it!  
Aditya DeshmukhAditya Deshmukh
Can someone please tell me how to do this challenge. I am too frustrated. In report, when I enter the date range then there is no data to display.
I don't know what is wrong here.
User-added image
AksiniaAksinia
@Aditya Deshmukh, are you sure you've made the adventures upload from one the previous steps and it's the same playground
Aditya DeshmukhAditya Deshmukh
@Aksinia, yes its the same playground.
AksiniaAksinia
Make sure you see any adventures if you go to the relative object from the app launcher
AksiniaAksinia
could you send a screenshot of adventures (and make sure all adventures all selected)
moukamouka

Hello all, 

can someone help, i m really getting crazy with the step 9 .
especially  this one :
Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type.

 I will really apreciate your help guys

 

here  my report User-added image

Aditya DeshmukhAditya Deshmukh
@Aksinia, here is the screenshot of all the adventures
User-added image
Aditya DeshmukhAditya Deshmukh
@Aksinia, found the error. I had my closed date set to year 2018, so I could not see any data. Finally, done with this challenge.
Thank you so much Aksinia for you help ! 
moukamouka

hi @Aditya Deshmukh

can you help me, I posted above my problem, I m really getting mad.

 

Aditya DeshmukhAditya Deshmukh
Hi @mouka, have you taken the explorer count ? I don't see it in your screenshot. Take explorer count and I would also suggest you to add explorer in the report.
Hope this helps !
moukamouka

hi @Aditya Deshmukh

What is this explorer count? where it's required to be done?

moukamouka
User-added image

do you mean 'Record Count', is that wrong? where i can find this 'Explorer count'
Aditya DeshmukhAditya Deshmukh
@mouka, i was not able to see the record count in the previous screenshot. If you have not added the formula in report then add it. You will see a formula field, drag it into the report.
1) Name it Explorer Count
2)In the formula section, click summary fields and select Record Count and then 'ok'
Do this and complete the further steps of creating the record page.
Hope this helps !
moukamouka

thank you @Aditya Deshmukh for your help.

The problem was really stupid and it takes me the whole night yesterday, the problem is I didn't have the show as 'Details', so the columns were hidden, now it's okay and complete this step, oufffff 

User-added image

 

Austin Malherbe 4Austin Malherbe 4
@Aditya it seems that you have helped others. I'm just not sure what to do as I have tried many things and have not been successful. Could you please take a look and see if you see something that is out of sorts?

User-added image