• VinodBatra
  • NEWBIE
  • 40 Points
  • Member since 2017


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 15
    Replies
I am getting the following error when checking this challenge: AddBoatReviews isn't instantiated in BoatDetails.cmp. BoatDetails should instantiate AddBoatReview in the “Add Review” tab, passing boat data to the component.

However, my BoatDetails component does instantiate AddBoatReview and the code is working.  The Add Review tab lets one add a review and then focus is set on the Reviews tab with the added review in it.  Functionally, all is well. But the Challenge Checker does not like it.  There is some case sensitivity, terminology or structure difference the the challenge checker is looking for.  Does anyone know what it is?

BoatDetails.cmp
<aura:component implements="flexipage:availableForAllPageTypes"  access="global">
	<aura:attribute name="boat" type="Boat__c" description="A boat object." />
	<aura:attribute name="Id" type="Id" />
    <aura:attribute name="boatRecordError" type="String"/>
    <aura:attribute name="selectedTabId" type="String" default="boatdetailtab" />
    <aura:handler event="c:BoatSelected" action="{!c.onBoatSelected}" />
    <aura:handler name="boatReviewAdded" event="c:BoatReviewAdded" action="{!c.onBoatReviewAdded}" />

    <force:recordData aura:id="service" 
		recordId="{!v.Id}"
		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.boatRecordError}"
		recordUpdated="{!c.onRecordUpdated}" />
                      
    <lightning:tabset class="{!(v.boat ? 'slds-show' : 'slds-hide')}" selectedTabId="{!v.selectedTabId}">
    
        <lightning:tab id="boatdetailtab" label="Details">
        	
            <c:BoatDetail boat="{!v.boat}"/>
            
		    <aura:if isTrue="{!not(empty(v.boatRecordError))}">
		        <div class="recordError">
		            <ui:message title="Error" severity="error" closable="true">
		                {!v.boatRecordError}
		            </ui:message>
		        </div>
		    </aura:if>            
        </lightning:tab>
        
        <lightning:tab id="boatreviewtab" label="Reviews">
            <c.BoatReviews aura:id="boatReviewList" boatId="{!v.boat.Id}" />
        </lightning:tab>
        
        <lightning:tab id="addboatreviewtab" label="Add Review">
           	<c.AddBoatReview aura:id="AddBoatReview" boat="{!v.boat}"/>
        </lightning:tab>
        
    </lightning:tabset>	
</aura:component>
Hi All,

I am getting the below error while verifying the challenge - 1.

Error:
User-added image


I am using the following code for the Constants Apex Class.

Constants.apxc
public class Constants {
	static final Integer DEFAULT_ROWS = 5;
    static final String SELECT_ONE = Label.Select_One;
    static final String INVENTORY_LEVEL_LOW = Label.Inventory_Level_Low;
   	static final List<Schema.PicklistEntry> PRODUCT_FAMILY;
    
    static {
        Schema.DescribeFieldResult fieldResult = Product2.Family.getDescribe();
    	PRODUCT_FAMILY = fieldResult.getPicklistValues();
    }
    static final String DRAFT_ORDER_STATUS = 'Draft';
    static final String ACTIVATED_ORDER_STATUS = 'Activated';
    static final String INVENTORY_ANNOUNCEMENTS = 'Inventory Announcements';
    static final String ERROR_MESSAGE = 'An error has occurred, please take a screenshot with the URL and send it to IT.';
    static final Id STANDARD_PRICEBOOK_ID = '01s7F000009XMtJQAW';
    
}

Please let me know where I am doing mistake.

Thanks,
Vinod 


 
Hi , I am completing Security specialist Superbadge but I stuck on Challenge 3.
When I mark answers and clik the button, it show me loading and it never ends, please help me out how to end this loading.This never ends
Hi Friends, 
I am getting this error in challenge 6 of Lightning Superbadge.
I am getting this error.
I have configured this,
User-added image
User-added image
User-added image
Hi everyone,

I am completed the Multiple choice questions for Platform Developer 2 as well as the  super badges, can someone help me to understand how do I get the certificate.
Thanks
Hello All ,I am trying to change my technology to salesforce ,from past 3 month I am trying to study for ADM 201 certification but always diverting from track ,not getting complete way .please some one help me and give full path ,guide ,dumps .I am planning to give exam on april 18 .
 
Can we fetch all those users who have access to lightning experience? Or if we can get all those profiles for which Lightning Experience User permission has been enabled.
  • March 19, 2018
  • Like
  • 0
Hi All,

I am getting the below error while verifying the challenge - 1.

Error:
User-added image


I am using the following code for the Constants Apex Class.

Constants.apxc
public class Constants {
	static final Integer DEFAULT_ROWS = 5;
    static final String SELECT_ONE = Label.Select_One;
    static final String INVENTORY_LEVEL_LOW = Label.Inventory_Level_Low;
   	static final List<Schema.PicklistEntry> PRODUCT_FAMILY;
    
    static {
        Schema.DescribeFieldResult fieldResult = Product2.Family.getDescribe();
    	PRODUCT_FAMILY = fieldResult.getPicklistValues();
    }
    static final String DRAFT_ORDER_STATUS = 'Draft';
    static final String ACTIVATED_ORDER_STATUS = 'Activated';
    static final String INVENTORY_ANNOUNCEMENTS = 'Inventory Announcements';
    static final String ERROR_MESSAGE = 'An error has occurred, please take a screenshot with the URL and send it to IT.';
    static final Id STANDARD_PRICEBOOK_ID = '01s7F000009XMtJQAW';
    
}

Please let me know where I am doing mistake.

Thanks,
Vinod 


 
I have an elegant working save() method for step 3:
 
public PageReference save(){
    	SavePoint savePoint = this.databaseHelper.setSavePoint();
    	Map<PriceBookEntry, Product2> productByPriceBookEntryMap = this.buildProductByPriceBookEntryMap();
    	
    	String errorMessage = this.saveProductList(productByPriceBookEntryMap.values());
    	if (String.isBlank(errorMessage)) {
    		errorMessage = this.savePriceBookEntryList(productByPriceBookEntryMap);
    	}

    	if (!String.isBlank(errorMessage)) {
    		this.databaseHelper.rollback(savePoint);
    		visualForceHelper.addErrorMessage(Constants.ERROR_MESSAGE + errorMessage);
    	} else {
    		resetForm();
    	}
    	
        return null;
    }

But, of course this won't work because Trailhead tests implementation details rather than results.

(For the love for all that is holy or unholy or completely irrelevant to holiness, can somebody please teach the trailhead challenge developers  how to write good tests and stop checking my implementation details?)

So, now I am trying to turn this into something Trailhead will recognize instead of telling me:
 
Challenge Not yet complete... here's what's wrong: 
Ensure that the save method inserts only Products and Pricebooks for rows that have all fields populated.

Now, my save() method is looking like this:
 
public PageReference save(){
    	SavePoint savePoint = Database.setSavePoint();
    	Map<PriceBookEntry, Product2> productByPriceBookEntryMap = new Map<PriceBookEntry, Product2>();
    	for (ProductWrapper productWrapper : this.productsToInsert) {
    		if (
    			productWrapper.productRecord.Name != null && productWrapper.productRecord.Name != ''
				&& productWrapper.productRecord.Family != null && productWrapper.productRecord.Family != ''
				&& (productWrapper.productRecord.Family != Constants.SELECT_ONE)
				&& productWrapper.productRecord.Initial_Inventory__c != null && productWrapper.productRecord.Initial_Inventory__c > 0
				&& productWrapper.productRecord.IsActive
	
				&& productWrapper.priceBookEntryRecord.UnitPrice != null && productWrapper.priceBookEntryRecord.UnitPrice > 0
			) {
    			productByPriceBookEntryMap.put(productWrapper.pricebookEntryRecord, productWrapper.productRecord);
    		}
    	}
    	
    	String errorMessage;
    	try {
	    	errorMessage = this.saveProductList(productByPriceBookEntryMap.values());
	    	if (String.isBlank(errorMessage)) {
	    		errorMessage = this.savePriceBookEntryList(productByPriceBookEntryMap);
	    	}
	    	if (!String.isBlank(errorMessage)) {
	    		throw new Product2ExtensionException(errorMessage);
    		}
    		resetForm();
    	}
    	catch (Exception ex) {
    		Database.rollback(savePoint);
    		visualForceHelper.addErrorMessage(Constants.ERROR_MESSAGE + errorMessage);
    	}
        return null;
    }

This is advanced in all the ways of a five year old who doesn't know when to start new paragraphs or even divide sentences.
If I had a senior developer give me this code, I'd move to have him fired immediately.
But yet, I'm sure it will need to become much worse before I can pass this step.

It works, but doesn't pass.

Please tell me what cockimanie details are probably being badly described by this error.

 
I am getting the following error when checking this challenge: AddBoatReviews isn't instantiated in BoatDetails.cmp. BoatDetails should instantiate AddBoatReview in the “Add Review” tab, passing boat data to the component.

However, my BoatDetails component does instantiate AddBoatReview and the code is working.  The Add Review tab lets one add a review and then focus is set on the Reviews tab with the added review in it.  Functionally, all is well. But the Challenge Checker does not like it.  There is some case sensitivity, terminology or structure difference the the challenge checker is looking for.  Does anyone know what it is?

BoatDetails.cmp
<aura:component implements="flexipage:availableForAllPageTypes"  access="global">
	<aura:attribute name="boat" type="Boat__c" description="A boat object." />
	<aura:attribute name="Id" type="Id" />
    <aura:attribute name="boatRecordError" type="String"/>
    <aura:attribute name="selectedTabId" type="String" default="boatdetailtab" />
    <aura:handler event="c:BoatSelected" action="{!c.onBoatSelected}" />
    <aura:handler name="boatReviewAdded" event="c:BoatReviewAdded" action="{!c.onBoatReviewAdded}" />

    <force:recordData aura:id="service" 
		recordId="{!v.Id}"
		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.boatRecordError}"
		recordUpdated="{!c.onRecordUpdated}" />
                      
    <lightning:tabset class="{!(v.boat ? 'slds-show' : 'slds-hide')}" selectedTabId="{!v.selectedTabId}">
    
        <lightning:tab id="boatdetailtab" label="Details">
        	
            <c:BoatDetail boat="{!v.boat}"/>
            
		    <aura:if isTrue="{!not(empty(v.boatRecordError))}">
		        <div class="recordError">
		            <ui:message title="Error" severity="error" closable="true">
		                {!v.boatRecordError}
		            </ui:message>
		        </div>
		    </aura:if>            
        </lightning:tab>
        
        <lightning:tab id="boatreviewtab" label="Reviews">
            <c.BoatReviews aura:id="boatReviewList" boatId="{!v.boat.Id}" />
        </lightning:tab>
        
        <lightning:tab id="addboatreviewtab" label="Add Review">
           	<c.AddBoatReview aura:id="AddBoatReview" boat="{!v.boat}"/>
        </lightning:tab>
        
    </lightning:tabset>	
</aura:component>
Hi,

I'm currently struggling with Lightning Component Framework Specialist Challenge 10.

The map is behaving as expected, but when I submit, I get the error:
Challenge Not yet complete... here's what's wrong: 
MapController.js must have an event handler named onPlotMapMarker that uses the latitude and longitude that were passed through the event to update the boat’s location.

This is my onPlotMarker() method:
onPlotMapMarker: function(component, event, helper) {
    	var id = event.getParam('sObjectId');
    	var latitude = event.getParam('lat');
    	var longitude = event.getParam('long');
    	var label = event.getParam('label');

		var leafletMap = helper.getLeafletMap(component, latitude, longitude);
		L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', {
		    attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
		}).addTo(leafletMap);
		
		L.marker([latitude, longitude]).addTo(leafletMap)
		    .bindPopup(label)
		    .openPopup();
    }
This is the helper:
({
	getLeafletMap : function(component, latitude, longitude) {
		var leafletMap = component.get('v.leafletMap');
		
		if (!leafletMap) {
	    	var mapContainer = component.find('map').getElement(); 
		    leafletMap = L.map(mapContainer, {zoomControl: false, tap: false})
		    	.setView([latitude, longitude], 13);
		    component.set('v.leafletMap', leafletMap);
		}

		return leafletMap;
	}
})
This is the aura:attribute for leafletMap:
<aura:attribute access="private" name="leafletMap" type="Object" />

Any help will be appreciated!






 
HI All,

I am facing an issue with step 3 of the superbatch and getting the below error
Error

I tried multiple options in the component code.but none of them worked here
Option1 
<aura:attribute name="boat" type="Boat__c" />
<ul class="slds-has-dividers--bottom-space">
        <li class="slds-item  slds-float_left">
     <lightning:tile class="tile ">
        
             <lightning:button aura:id="{!v.boat.Id}" name="{!v.boat.Name}" class="tile">
                 <div style="{!'background-image:URL(\'https://resourceful-badger-249681-dev-ed.my.salesforce.com'+v.boat.Picture__c+'\')'}" class="innertile">
                 	
                      <div class="lower-third">
                			<h1 class="slds-truncate">{!v.boat.Contact__r.Name}</h1>
              			</div>
                 </div>
            </lightning:button>
         
            
    </lightning:tile>
         </li>
    </ul>
Option 2
<aura:attribute name="boat" type="Boat__c" />
<ul class="slds-has-dividers--bottom-space">
        <li class="slds-item  slds-float_left">
     
        
             <lightning:button aura:id="{!v.boat.Id}" name="{!v.boat.Name}" class="tile">
                 <div style="{!'background-image:URL(\'https://resourceful-badger-249681-dev-ed.my.salesforce.com'+v.boat.Picture__c+'\')'}" class="innertile">
                 	
                      <div class="lower-third">
                			<h1 class="slds-truncate">{!v.boat.Contact__r.Name}</h1>
              			</div>
                 </div>
            </lightning:button>
         
            

         </li>
    </ul>
Option 3
<aura:attribute name="boat" type="Boat__c" />
   <lightning:tile class="slds-tile--board">
     <lightning:button class="tile">
        <div style="{!'background-image:URL(\'https://resourceful-badger-249681-dev-ed.my.salesforce.com'+v.boat.Picture__c+'\')'}" class="innertile">
          <div class="lower-third">
           <h1 class="slds-truncate">{!v.boat.Contact__r.Name}</h1>
          </div>
        </div>
    </lightning:button>
    </lightning:tile>


 
I have built the reports and dashboards as outlined in the requirements, but I'm getting the following error "Challenge Not yet complete... here's what's wrong: Couldn't find a component with the title 'My Top Accounts'."  
User-added image

However, I have the component on the dashboard as you can see below.
User-added image
What am I missing?
Hi , I am completing Security specialist Superbadge but I stuck on Challenge 3.
When I mark answers and clik the button, it show me loading and it never ends, please help me out how to end this loading.This never ends