• shashi kumar 58
  • SMARTIE
  • 856 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 23
    Replies
For life of me I can't figure out what this exercise is asking to do.  I was able to modify other reports but this particualr R&D report, Temperature to kWh Research, I'm not able to do.  Error is keep saying, "We can’t find the additional analysis by model being performed on the 'Temperature to kWh Research' report. Remember that you can organize data horizontally and vertically at the same time."

User-added image


 
Hi, 

I am facing this error while I have only displayed shift hours and grouped it with Volunteer Organization but still getting this error. 

Could anyone help me here.

Thanks in Advance.
Vinay Kumar Jain
Hi, 
I have created the following components for this step:

BoatSearchForm.cmp
<aura:component controller="BoatSearchForm" implements="force:appHostable,flexipage:availableForAllPageTypes"  access="global" >
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <aura:attribute name="searchOptions" type='String[]' default='All'/>
    <aura:attribute name='searchOptionToIdMap' type='Map' default="{All:''}" />
    <aura:attribute name='showNewButton' type='Boolean' default='false'/>

    <lightning:layout horizontalAlign="center"   >

       <lightning:layoutItem class="slds-grid_vertical-align-center" > 

           <lightning:select aura:id='typeSelect' name='selectItem' onchange=''>
             <aura:iteration items='{!v.searchOptions}' var='option'>
                 <option value='{!option}' text='{!option}'></option>
             </aura:iteration>
         </lightning:select>
       </lightning:layoutItem>

       <lightning:layoutItem class="slds-grid_vertical-align-center" > 
         <lightning:button label="Search" variant="brand"  />
         <aura:if isTrue='{!v.showNewButton}'>
            <lightning:button variant='neutral' label='New' onclick='{!c.createBoat}'/>
        </aura:if>
       </lightning:layoutItem>

    </lightning:layout>

</aura:component>

BoatSearchController.js
({
     doInit: function(component) 
    {
       console.log('inside do init '); 
        debugger;
       var action=component.get('c.getSearchOptions');
        action.setcallback(this,function(response)
         {
             debugger;
             var state = response.getState();
             if (state === "SUCCESS")
             {
                 debugger;
                 console.log('inside success state');
                 component.set('v.searchOptionToIdMap',response.getReturnValue());
                 var custs = [];
                 var conts = response.getReturnValue();
                 for(var key in conts)
                 {
                    console.log('populated list');
                     custs.push({value:conts[key], key:key});
                 }
                 component.set("v.searchOptions", custs);
             }
             
         }); 
    }, 
     createBoat: function (component) 
     {
            console.log('inside controller');
            var createRecordEvent = $A.get('e.force:createRecord');
            if (createRecordEvent) 
            {
                    var typeName = component.find('typeSelect').get('v.value');
                    var typeMap = component.get('v.searchOptionToIdMap');
                    var typeId = null;
                    if (typeName && typeMap && typeMap[typeName]) 
                    {
                            typeId = typeMap[typeName];
                    }
                    createRecordEvent.setParams({
                        'entityApiName': 'Boat__c',
                        'defaultFieldValues': {
                            'BoatType__c': typeId
                        }
                    });
                    createRecordEvent.fire();
            }
       }
})
BoatSearchHelper.js
({
    renderNewButton: function (component) {
    var createRecordEvent = $A.get('e.force:createRecord');
    if (createRecordEvent) {
        component.set('v.showNewButton', true);
    }
}})

Apex Controller:
public with sharing class BoatSearchForm
{
        @AuraEnabled
        public static Map<String, String> getSearchOptions() 
        {
                List<BoatType__c> boatTypes = [SELECT Id, Name FROM BoatType__c LIMIT 400];
                Map<String, String> returnMap = new Map<String, String>();
                if(!boatTypes.isEmpty())
                {
                        for(BoatType__c bt: boatTypes)
                        {
                            returnMap.put(bt.Name, bt.Id);
                        }
                }
                return returnMap;
        }
}
FriendswithBoat.app
<aura:application extends="force:slds">
    <lightning:layout >
                 
                 <lightning:card title="Find a Boat" class="slds-m-top_10px" >
                          <c:BoatSearchForm />
                 </lightning:card>

    </lightning:layout>
</aura:application>

Whenever I try to load my app I get this error:
User-added image

Something is wrong with my component. I am not able to identify it. Can anyone help me with this?
Hi,

I'm currently working on the Lightning Component Framework Specialist Superbadge.

When I click "New", at least as I've interpretted the requirements, the "Friends with Boats" pages is behaving as expected, but Trailhead complains:
Challenge Not yet complete... here's what's wrong: 
The BoatSearchForm component's "New" button should launch the default boat record create page using logic in its controller.

Have I misunderstood a requirement?

Here is my markup:
 
<aura:component controller="BoatSearchFormAuraCtrl" >
	<aura:attribute access="private" name="boatList" type="BoatType__c[]" default="[]" />
	<aura:attribute access="private" name="showNewButton" type="Boolean" default="false" />
	<aura:attribute access="private" name="selectedBoat" type="BoatType__c" />
	
	<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
	
	<h2 class="slds-page-header__title">Find a Boat</h2>
	<form>
		<lightning:layout horizontalAlign="center">
		    <lightning:select name="select" value="{!v.selectedBoat}">
		        <option value="">All Types</option>
		        <aura:iteration items="{!v.boatList}" var="boat">
		            <option value="{!boat.Name}" text="{!boat.Name}"></option>
		        </aura:iteration> 
		    </lightning:select>
		    <lightning:button name="Search" label="Search" variant="brand" />
		    <aura:if isTrue="{!v.showNewButton}">
		    	<lightning:button name="New" label="New" variant="neutral" onclick="{!c.createBoat}"/>
		    </aura:if>
		</lightning:layout>
	</form>	
</aura:component>
And here is my controller:
({
	doInit : function(component, event, helper) {
		component.set('v.showNewButton', $A.get('e.force:createRecord'));
		helper.setBoatTypeList(component);
	},
	
	createBoat : function(component) {
		var createRecordEvent = $A.get('e.force:createRecord');
		createRecordEvent.setParams({
			'entityApiName' : 'BoatType__c',
			'defaultFieldValues': {
				'Name': component.get('v.selectedBoat')
			},
		});
		createRecordEvent.fire();
	}
})





 
Hi,
I am trying to complete the challenge Lightning Data Service Basics - Manipulate Records with force:recordData and I am getting the followling error:
Challenge Not yet complete... here's what's wrong:
Could not find either the 'accEdit' component, 'accDisplay' component or both components in the Account Record Page.
This is strange because the 2 components are indeed on the page:
User-added image
Could please assist ?
Thanks for your help.
 
I'm trying to complete the Handle Record Changes and Errors module but can't seem to get past the following challenge error:
Challenge Not yet complete... here's what's wrong: 
The 'accEdit' Lightning Component JS Controller does not appear to be setting 'v.recordSaveError' with an error message.

.I've tried many different combinations of sets and am not having much luck.

I've tried several different component.set methods such as this one:
component.set('v.recordSaveError','Error: ' + saveResult.state + ', message: ' + JSON.stringify(saveResult.error));

Any ideas what this module is looking for as a valid solution?

I do see recordSaveError display after being set due to an error.

Thanks.
 
Hi All,

I'm having an issue with challenge #4 in the lightning experience superbage. The task is to : 

Automate the creation of fulfillments
Following the requirements described above, create the Fulfillment Creation process flow. Please ensure that your process works as expected without errors before submitting this challenge.


It seems like I've done everything this challenge but I'm getting this error message : 

Challenge Not yet complete... here's what's wrong: 
The Fulfillment Creation process does not appear to be working properly. Please check that your task was created with all of the field values set appropriately.


I've looked over everything I've done and I can't seem to find the answer maybe one of you can help me . 

My Process Structure:

Object - Adventure Package
Start Process- Only when a record is created 

FIRST NODE 

Define Criteria for this Action Group 

Criteria for Executing Actions - Conditions are met 

Set Conditions:

1. [OpportunityLineItem].Oppotunity.StageName Does not equal Cancelled 
2. [OpportunityLineitem].Fulfillment_Created_c Equals False

Conditions - All of the conditions are met (AND) 

IMMEDIATE ACTIONS 

1. Create a Record 

Record Type - Fulfillment 

Set Field Values 

AdventurePackageId -  Reference -[OpportunityLineItem].Id
Adventure Package cost - Reference - [OpportunityLineItem].TotalPrice 
Adventure - Reference -  [OpportunityLineItem].Product2Id
Expedition Leader - Reference -[OpportunityLineItem].Product2.Expedition_Leader_c
Explorer - Reference - [OpportunityLineItem].Explorer_C
Fulfillment Name - Formula -[OpportunityLineItem].Product2.Name + [OpportunityLineItem].Id
Schedule Date -Reference - [OpportunityLineItem].ServiceDate
Status- Picklist - New 
Package -  [OpportunityLineItem].OpportunityId

2. Update Records

Record - [OpportunityLineItem].Opportunity ID 

No criteria just update records 

Set new fields for the records you update 

Needs Insurance - Reference- [OpportunityLineItem].Product2.Needs_Insurance_c
Needs waiver - Reference -  [OpportunityLineItem].Product2.Needs_Waiver_c

3. Update Records 

Record - [OpportunityLineItem]

Criteria for Updating Records - No criteria-just update records 

Set new field values for the records you update 

Fulfilment Created = True 
Fulfillment State = Created


Evaluate the Next Criteria 

SECOND NODE 

EVALUATE THE NEXT CRITERIA 

Define Criteria for this Action Group 

Criteria for Executing Actions - Conditions are met 

Set Conditions:

1. [OpportunityLineItem].Explorer_c   Is Null  = True 

Conditions - All of the conditions are met (AND)

IMMEDIATE ACTIONS 

Create a Record - Task 

Set Field Values

Assigned to ID - reference- [OpportunityLineItem].Opportunity.OwnerId
Related to ID - reference -[OpportunityLineItem].Opportunity.Id
Priority - Normal 
Status - Not started 
Subject- String - Update explorer 

SCHEDULED ACTIONS 

14 days from now 

Post to Chatter 

User - Select a user from a record - [OpportunityLineItem].Opportunity.Owner.Id

Message:

{![OpportunityLineItem].Opportunity.Name}

{![OpportunityLineItem].Product2.Name}

{![OpportunityLineItem].Id}

Once done with these changes, execute blow lines of code in dev console.

Product2 product = new Product2(name='Half Dome Hike', isActive=true); 
insert product; 
//insert the pricebookentry 
Pricebook2 stdPrice = [Select id from Pricebook2 where isStandard=true limit 1]; 
PricebookEntry pbe = new PricebookEntry( IsActive = true, Product2Id = product.id, UnitPrice = 2.00, Pricebook2Id = stdPrice.Id); 
insert pbe;
 
  Hi, Iam stuck in trailhead challenge in "Connect components with Events". I am getting above error(The campingList component isn't handing the added item correctly.), though my functionality is perfecly working fine. Please help me in this...I have tried solutions for the same error in this forum before, but they are not working as well.

CampingList.cmp:
 
<aura:component controller="CampingListController">
    
    <aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
    
    <aura:handler name="addItem" action="{!c.handleAddItem}" event="c:addItemEvent"/>
    
    <aura:attribute name="items" type="Camping_Item__c[]" />
    
    <c:campingHeader />
    
    <c:campingListForm />
    
    <aura:iteration items="{!v.items}" var="item">
        <c:campingListItem item="{!item}" />
    </aura:iteration>
    
</aura:component>

CampingListController.js:
 
({

    doInit: function(component, event, helper){
        
        var action=component.get("c.getItems");
        action.setCallback(this, function(response)
                           {
                               var state = response.getState();
                               if(component.isValid() && state=='SUCCESS')
                               {
                                   component.set("v.items", response.getReturnValue());
                               }
                               else
                               {
                                   console.log("Error in state: "+ state);
                               }
                           });

        $A.enqueueAction(action);
        
    },
    
    handleAddItem : function(component, event, helper)
    {
        var item=event.getParam("item");
        var action=component.get("c.saveItem");
        
        action.setParams
        ({
                "item" : item
        });
        
        action.setCallback(this, function(response)
                           {
                               var state=response.getState();
                               if(component.isValid() && state == 'SUCCESS')
                               {
                                   var itemArray=component.get("v.items");
                                   itemArray.push(response.getReturnValue());
                                   component.set("v.items", itemArray);
                               }
                               else
                               {
                                   console.log('Error in state: '+ state);
                               }
                           });
        
        $A.enqueueAction(action);
    },
})

 
My issue seems to be very strange. I have created this process and when I test it, it is updating the sales price to deposit amount as said in the requirement. But when the chellenge is checked it gives me error message:
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.


Chose the fullfillment object
have proper conditions:
User-added image

and update the adventure package
User-added image

I tested it and it seems to be updating the sales price to the diposit amount correctly:
User-added image

but still on checking Chellenge I get the error:
User-added image

completedly stumped!!! please let me know if anybody faced the same issue. any help.
 
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. 
Hi everyone!
I have a problem with the challenge, my App work fine but I don´t pass the challenge. This is my code:

campingList.cmp:
 
<aura:component controller="CampingListController">
    
    <ltng:require styles="/resource/SLDS105/assets/styles/salesforce-lightning-design-system-ltng.css"/>

	<aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
    
     <aura:attribute name="newItem" type="Camping_Item__c"
     default="{ 'sobjectType': 'Camping_Item__c',
                    'Price__c': 0,
                    'Quantity__c': 0}"/>
    
    <div class="slds-card slds-p-top--medium">
    <ui:inputText aura:id="campname" label="Camping Name"
        value="{!v.newItem.Name}" required="true"/>
    <ui:inputCheckbox aura:id="packed" label="Packed?"
        value="{!v.newItem.Packed__c}"/>
     <ui:inputCurrency aura:id="price" label="Price"
        value="{!v.newItem.Price__c}" required="true"/>
     <ui:inputNumber aura:id="quantity" label="Quantity"
        value="{!v.newItem.Quantity__c}" required="true"/>
    
    <ui:button label="Create Camping" press="{!c.clickCreateCamping}"/>
    </div>
    
    <aura:attribute name="items" type="Camping_Item__c[]"/>	 
    <div class="slds-card slds-p-top--medium">
        <header class="slds-card__header">
            <h3 class="slds-text-heading--small">Campings</h3>
        </header>
        <section class="slds-card__body">
            <div id="list" class="row">
                <aura:iteration items="{!v.items}" var="item">
                    <c:campingListItem item="{!item}"/>
                </aura:iteration>
            </div>
        </section>
    </div>
</aura:component>

campingListController.js:
 
({
    
    // Load expenses from Salesforce
	doInit: function(component, event, helper) {

    // Create the action
    var action = component.get("c.getItems");

    // Add callback behavior for when response is received
    action.setCallback(this, function(response) {
        var state = response.getState();
        if (component.isValid() && state === "SUCCESS") {
            component.set("v.items", response.getReturnValue());
        }
        else {
            console.log("Failed with state: " + state);
        }
    });

    // Send action off to be executed
    $A.enqueueAction(action);
	},
    
    clickCreateCamping: function(component, event, helper) {
        
        if(helper.validateCampingForm(component)){
	        // Create the new expense
	        var newCamping = component.get("v.newItem");
	        helper.createItem(component, newCamping);
	    }
    }
})
campingListHelper.js
 
({
    
    createItem: function(component, camping) {
        
        var action = component.get("c.saveItem");
        action.setParams({
            "item": camping
        });
    	action.setCallback(this, function(response){
        var state = response.getState();
        if (component.isValid() && state === "SUCCESS") {
            var campings = component.get("v.items");
            campings.push(response.getReturnValue());
            component.set("v.items", campings);
        }
    	});
    	$A.enqueueAction(action);
    },
    
    validateCampingForm: function(component) {
      
     	var validQuantity = true;
        var validPrice = true;

        var nameField = component.find("campname");
        var campname = nameField.get("v.value");
        
        var quantityField = component.find("quantity");
        var quantity = quantityField.get("v.value");
        
        var priceField = component.find("price");
        var price = priceField.get("v.value");
        
        if ($A.util.isEmpty(campname) || $A.util.isEmpty(quantity) || $A.util.isEmpty(price)){
            validQuantity = false;
            validPrice = false;
            nameField.set("v.errors", [{message:"Camping name, quantity or price can't be blank."}]);
        }
        else {
            nameField.set("v.errors", null);
        }
		
		return(validQuantity && validPrice);        
	}
})
CampingListController.apxc:
 
public with sharing class CampingListController {

    @AuraEnabled
    public static List<Camping_Item__c> getItems() {
    
        // Check to make sure all fields are accessible to this user
        String[] fieldsToCheck = new String[] {
            'Id', 'Name', 'Packed__c', 'Price__c', 'Quantity__c'
        };
        
        Map<String,Schema.SObjectField> fieldDescribeTokens = 
            Schema.SObjectType.Camping_Item__c.fields.getMap();
        
        for(String field : fieldsToCheck) {
            if( ! fieldDescribeTokens.get(field).getDescribe().isAccessible()) {
                throw new System.NoAccessException();
                return null;
            }
        }        
        
        // Perform isAccessible() checking first, then
        return [SELECT Id, Name, Packed__c, Price__c, Quantity__c 
                FROM Camping_Item__c];
    }
    
    @AuraEnabled
    public static Camping_Item__c saveItem(Camping_Item__c item) {
        // Perform isUpdatable() checking first, then
        upsert item;
        return item;
    }
}
I am still getting this error:

Challenge Not yet complete... here's what's wrong:
The campingList JavaScript helper isn't saving the new record to the database or adding it to the 'items' value provider.


My App save the new record into the database and add it to the "items" list.
Thanks for your answers!




 
Challenge - Create a form to enter new items and display the list of items entered. To make our camping list look more appealing, change the campingHeader component to use the SLDS. Similar to the unit, style the Camping List H1 inside the slds-page-header. Modify the campingList component to contain an input form and an iteration of campingListItem components for displaying the items entered.
The component requires an attribute named items with the type of an array of camping item custom objects.
The component requires an attribute named newItem of type Camping_Item__c with default quantity and price values of 0.
The component displays the Name, Quantity, Price, and Packed form fields with the appropriate input component types and values from the newItem attribute.
The JavaScript controller checks to ensure that the Name, Quantity and Price values submitted are not null.
If the form is valid, the JavaScript controller pushes the newItem onto the array of existing items, triggers the notification that the items value provider has changed, and resets the newItem value provider with a blank sObjectType of Camping_Item__c.


My answer - 
<aura:component >
<aura:attribute name="items" type="Camping_Item__c[]"/>
<aura:attribute name="newitem" type="Camping_Item__c[]"  default="{ 'sobjectType': 'Camping_Item__c',
                   'Quantity__c'=0, 'Price__c'=0}"/>
 <p>Name:
        <ui:inputText value="{!v.newitem.name}"/>
    </p>    
  <p>Packed:
        <ui:inputCheckbox value="{!v.newitem.Packed__c}"/>
     
    </p>    
  <p>Price:
        <ui:inputCurrency value="{!v.newitem.Price__c}"/>
    </p>
    <p>Quantity:
        <ui:inputNumber value="{!v.newitem.Quantity__c}"/>
    </p>
</aura:component>


Error -

Challenge Not yet complete... here's what's wrong: 
The campingList component isn't iterating the array of 'items' and creating 'campingListItem' components.

Please share the correct solution.
The process works fine, I have tested it. When I click on "Check Challenge", this is what I get:

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: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. 
A flow trigger failed to execute the flow with version ID 3012800000001r1. 
Contact your administrator for help.: []