• Oiswarja Pyne
  • NEWBIE
  • 20 Points
  • Member since 2015
  • Accenture Services Pvt. Limited

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

Create a simple Lightning component with a styled headline. The headline must use an H1 tag with a CSS class that enforces a 24px font-size. Make the component available in the Navigation Menu of Salesforce1.The component must be named 'MyLightningComponent'.
The component must include an H1 tag with a CSS class named 'headline'. The 'headline' CSS class must set a font-size of 24px.
The Lightning Component tab that is added to Salesforce1 must be called 'MyLightning'

 

 

 

 

<aura:component implements="force:appHostable"> 
    <h1 class="headline">My Lightning Component</h1> 
</aura:component>

<aura:application >
    <h1>Hello Lightning App!</h1>
    <c:MyLightningComponent />
</aura:application>

 

.THIS .headline {
    font-size:24px;
}

 

Challenge not yet complete... here's what's wrong: 
The component is not using the correct CSS for the 'headline' class

 

Thankx 
Prashant

Hello,

Getting this:
Challenge not yet complete... here's what's wrong: 
The component does not implement the 'appHostable' interface. That interface is required to add the component to Salesforce1.


My component looks like this
 
<aura:component implements="force:appHostable">
	<h1 class="headline">Hello Trailhead</h1>
</aura:component>

 

I have a two custom objectsin my org... Project and Events.I have written a trigger to update Project status field based on Event Status values.Project__c is a lookup field in Events__c object.

However I am getting the below error when i am saving it.
[Error] Error: Compile Error: Didn't understand relationship 'Events__r' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 17 column 54

//TriggerCode

trigger Cancel_Event on Events__c (after update) {
    // Get a list of Projects
    Set<Id> ProjectIDs = new Set<Id>();
    for (Events__c event : Trigger.New) {
        ProjectIDs.add(event.Project__c);
    }

    // Get the projects, and all related events that have been Cancelled
    List<Project__c> Projects = new List<Project__c>([ SELECT Id, Project_Status__c, (SELECT Project__c , Event_Status__c FROM Project__r.Events__c)
                                                       FROM Project__c
                                                       WHERE (Id in :ProjectIDs)
                                                       AND (Event_Status__c ='Cancelled')
                                                       FOR UPDATE]);

I know the query can be simplified using two select queries but I want to use nested queries.Kindly advise.

-M@X