• anthony thomas 9
  • NEWBIE
  • 25 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 7
    Replies
Not sure why i keep getting this error on this challenge.
component:
<aura:component controller="DisplayCaseController">
    <aura:attribute name="record" type="Case"/>
    <ui:button label="Get Case" press="{!c.getcase}"/>
        <p>{!v.record.Status}</p>
        <p>{!v.record.Subject}</p>
        <p>{!v.record.Description}</p>
</aura:component>

controller:
({
    getcase : function(component, record, callback) {
         var action = component.get("c.getCaseFromId");
          action.setParams({
          "caseID": record.id
      })
          action.setCallback(this,function(action){
             if (action.getState() === "SUCCESS") {
                component.set("v.record", action.getReturnValue());
            }
      });
      $A.enqueueAction(action);
    }
 
})
Apex:
public class DisplayCaseControler {

    @AuraEnabled
    public static Case getCaseFromId(Id caseID) { 
        if(caseID == null) { 
            return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1]; 
        }
       
        List<Case> cases = [ SELECT Id, Subject, Description, Status from CASE where ID = :caseID ];
       
        if(cases.size() == 0) { 
            return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1]; 
        } else { 
            return cases[0]; 
        } 
    }  

}
This is what I have based on the directions for this challenge:
The conference application your company is creating must display a phone number in one component for display that's based on the input of another component. Create an application that contains an inputPhone component and an outputText component. The components themselves can be found here and here. You must add the application event and client-side controllers to make it work.
The PhoneNumberInput and PhoneNumberOutput components can be found here and here. Copy and paste those two components into your Developer Edition using the Developer Console.
The application event must be named 'PhoneNumberEvent' and must have an attribute named 'phone' (of type String).
The components must have the correct registerEvent and handler components.
The client side controllers must get and set the 'phone' attribute correctly.
Input is this:
<aura:application >   
    <aura:event type="APPLICATION" /> 
    <aura:attribute name="phone" type="String" />
</aura:event>   
</aura:application>
And I keep getting an error of this:
The 'PhoneNumberEvent' event does not have an attribute component
My problem is that I am trying to complete the Trailhead module and when I go to complete the problem I cannot advance beyond this module because the required field has not page selections in it.

Module: Developer Trail - Lightning Experience  Lightning Components >Creating Components > Add Lightning Components to Salesforce1:

Create a custom tab for this component.

From Setup, enter Tabs in the Quick Find box, then select Tabs.

Click New in the Lightning Component Tabs related list.

Select the Lightning component to display in the custom tab.

Enter a label to display on the tab.

Select the tab style and click Next.

When prompted to add the tab to profiles, accept the default and click Save.

The three underlined steps cannot be completed because when I try and select a page it has no pages in the picklist and it displays "none"…………………Anyone else having this problem.

In a Develop org, Microsoft Windows 7
Not sure why i keep getting this error on this challenge.
component:
<aura:component controller="DisplayCaseController">
    <aura:attribute name="record" type="Case"/>
    <ui:button label="Get Case" press="{!c.getcase}"/>
        <p>{!v.record.Status}</p>
        <p>{!v.record.Subject}</p>
        <p>{!v.record.Description}</p>
</aura:component>

controller:
({
    getcase : function(component, record, callback) {
         var action = component.get("c.getCaseFromId");
          action.setParams({
          "caseID": record.id
      })
          action.setCallback(this,function(action){
             if (action.getState() === "SUCCESS") {
                component.set("v.record", action.getReturnValue());
            }
      });
      $A.enqueueAction(action);
    }
 
})
Apex:
public class DisplayCaseControler {

    @AuraEnabled
    public static Case getCaseFromId(Id caseID) { 
        if(caseID == null) { 
            return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1]; 
        }
       
        List<Case> cases = [ SELECT Id, Subject, Description, Status from CASE where ID = :caseID ];
       
        if(cases.size() == 0) { 
            return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1]; 
        } else { 
            return cases[0]; 
        } 
    }  

}
This is what I have based on the directions for this challenge:
The conference application your company is creating must display a phone number in one component for display that's based on the input of another component. Create an application that contains an inputPhone component and an outputText component. The components themselves can be found here and here. You must add the application event and client-side controllers to make it work.
The PhoneNumberInput and PhoneNumberOutput components can be found here and here. Copy and paste those two components into your Developer Edition using the Developer Console.
The application event must be named 'PhoneNumberEvent' and must have an attribute named 'phone' (of type String).
The components must have the correct registerEvent and handler components.
The client side controllers must get and set the 'phone' attribute correctly.
Input is this:
<aura:application >   
    <aura:event type="APPLICATION" /> 
    <aura:attribute name="phone" type="String" />
</aura:event>   
</aura:application>
And I keep getting an error of this:
The 'PhoneNumberEvent' event does not have an attribute component
I had completed the Challenges and earned 4 badges on September 01st, 2015. But I didn't got email. 
May be I was wrong in filling the form somewhere. My friends who has completed after me got the email regarding the T-Shirt shipping.

How should I got the T-Shirt? :'(

Kindly help me !!

Thanks in Advance
My problem is that I am trying to complete the Trailhead module and when I go to complete the problem I cannot advance beyond this module because the required field has not page selections in it.

Module: Developer Trail - Lightning Experience  Lightning Components >Creating Components > Add Lightning Components to Salesforce1:

Create a custom tab for this component.

From Setup, enter Tabs in the Quick Find box, then select Tabs.

Click New in the Lightning Component Tabs related list.

Select the Lightning component to display in the custom tab.

Enter a label to display on the tab.

Select the tab style and click Next.

When prompted to add the tab to profiles, accept the default and click Save.

The three underlined steps cannot be completed because when I try and select a page it has no pages in the picklist and it displays "none"…………………Anyone else having this problem.

In a Develop org, Microsoft Windows 7
Hello all,

I'm stuck with the Lightning challenge "Using Apex in Components" :

here is the component :
<aura:component controller="DisplayCaseController">
	<aura:attribute name="record" type="Case[]"/>

    <aura:iteration items="{!v.record}" var="c">
	    {!c.Subject}, {!c.Description}, {!c.Subject}, {!c.Status }
	</aura:iteration>
</aura:component>
the component controller :
({
    getRecord: function(cmp){
        var action = cmp.get("c.getCaseFromId");
        action.setCallback(this, function(response){
            var state = response.getState();
            console.log(state);
            if (state === "SUCCESS") {
                cmp.set("v.record", response.getReturnValue());
            }
        });
	 $A.enqueueAction(action);
    }
})
and the apex controller (provided for the challenge)
public class DisplayCaseController {
 
    @AuraEnabled
    public static Case getCaseFromId(Id caseID) {
        if(caseID == null) {
            return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1];
        }
            List<Case> cases = [ SELECT Id, Subject, Description, Status from CASE where ID = :caseID ];
            if(cases.size() == 0) {
                return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1];
            } else {
                return cases[0];
        }
    }
}
and still when hitting the Check challenge button, the following error is displayed :
"Challenge not yet complete... here's what's wrong:
The component is not binding to the Case Subject value "

Could you please advise ?
Thanks a lot!