• Kenneth Devorak
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I'm getting the following error when I save the quickcontact.cmp file:
Failed to save undefined: Invalid definition for null:QuickContactController: null: Source

Below is the code in the file:
<aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId" controller="QuickContactController">
    <aura:attribute name="account" type="Account" />
    <aura:attribute name="newContact" type="Contact"
        default="{ 'sobjectType': 'Contact' }" /> <!-- default to empty record -->
    <aura:attribute name="hasErrors" type="Boolean"
        description="Indicate if there were failures when validating the contact." />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <!-- Display a header with details about the account -->
    <div class="slds-page-header" role="banner">
        <p class="slds-text-heading--label">{!v.account.Name}</p>
        <h1 class="slds-page-header__title slds-m-right--small
            slds-truncate slds-align-left">Create New Contact</h1>
    </div>
    <!-- Display form validation errors, if any -->
    <aura:if isTrue="{!v.hasErrors}">
        <div class="recordSaveError">
            <ui:message title="Error" severity="error" closable="true">
                The new contact can't be saved because it's not valid.
                Please review and correct the errors in the form.
            </ui:message>
        </div>
    </aura:if>
    <!-- Display the new contact form -->
    <div class="slds-form--stacked">
        <div class="slds-form-element">
            <label class="slds-form-element__label"
                for="contactFirstName">First Name: </label>
            <div class="slds-form-element__control">
              <ui:inputText class="slds-input" aura:id="contactFirstName"
                value="{!v.newContact.FirstName}" required="true"/>
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label"
                for="contactLastName">Last Name: </label>
            <div class="slds-form-element__control">
              <ui:inputText class="slds-input" aura:id="contactLastName"
                value="{!v.newContact.LastName}" required="true"/>
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label" for="contactTitle">Title: </label>
            <div class="slds-form-element__control">
              <ui:inputText class="slds-input" aura:id="contactTitle"
                value="{!v.newContact.Title}" />
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label"
                for="contactPhone">Phone Number: </label>
            <div class="slds-form-element__control">
              <ui:inputPhone class="slds-input" aura:id="contactPhone"
                value="{!v.newContact.Phone}" required="true"/>
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label" for="contactEmail">Email: </label>
            <div class="slds-form-element__control">
              <ui:inputEmail class="slds-input" aura:id="contactEmail"
                value="{!v.newContact.Email}" />
            </div>
        </div>
        <div class="slds-form-element">
            <ui:button label="Cancel" press="{!c.handleCancel}"
                class="slds-button slds-button--neutral" />
            <ui:button label="Save Contact" press="{!c.handleSaveContact}"
                class="slds-button slds-button--brand" />
        </div>
    </div>
</aura:component>

Anyhelp would be great. I'm really new to this and a little lost on debugging with salesforce.
 
I having issues when I try to update the contacts with hobbies. Anyone have a solution on the proper way to do this. It fails everytime for me.
I'm getting the following error when I save the quickcontact.cmp file:
Failed to save undefined: Invalid definition for null:QuickContactController: null: Source

Below is the code in the file:
<aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId" controller="QuickContactController">
    <aura:attribute name="account" type="Account" />
    <aura:attribute name="newContact" type="Contact"
        default="{ 'sobjectType': 'Contact' }" /> <!-- default to empty record -->
    <aura:attribute name="hasErrors" type="Boolean"
        description="Indicate if there were failures when validating the contact." />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <!-- Display a header with details about the account -->
    <div class="slds-page-header" role="banner">
        <p class="slds-text-heading--label">{!v.account.Name}</p>
        <h1 class="slds-page-header__title slds-m-right--small
            slds-truncate slds-align-left">Create New Contact</h1>
    </div>
    <!-- Display form validation errors, if any -->
    <aura:if isTrue="{!v.hasErrors}">
        <div class="recordSaveError">
            <ui:message title="Error" severity="error" closable="true">
                The new contact can't be saved because it's not valid.
                Please review and correct the errors in the form.
            </ui:message>
        </div>
    </aura:if>
    <!-- Display the new contact form -->
    <div class="slds-form--stacked">
        <div class="slds-form-element">
            <label class="slds-form-element__label"
                for="contactFirstName">First Name: </label>
            <div class="slds-form-element__control">
              <ui:inputText class="slds-input" aura:id="contactFirstName"
                value="{!v.newContact.FirstName}" required="true"/>
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label"
                for="contactLastName">Last Name: </label>
            <div class="slds-form-element__control">
              <ui:inputText class="slds-input" aura:id="contactLastName"
                value="{!v.newContact.LastName}" required="true"/>
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label" for="contactTitle">Title: </label>
            <div class="slds-form-element__control">
              <ui:inputText class="slds-input" aura:id="contactTitle"
                value="{!v.newContact.Title}" />
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label"
                for="contactPhone">Phone Number: </label>
            <div class="slds-form-element__control">
              <ui:inputPhone class="slds-input" aura:id="contactPhone"
                value="{!v.newContact.Phone}" required="true"/>
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label" for="contactEmail">Email: </label>
            <div class="slds-form-element__control">
              <ui:inputEmail class="slds-input" aura:id="contactEmail"
                value="{!v.newContact.Email}" />
            </div>
        </div>
        <div class="slds-form-element">
            <ui:button label="Cancel" press="{!c.handleCancel}"
                class="slds-button slds-button--neutral" />
            <ui:button label="Save Contact" press="{!c.handleSaveContact}"
                class="slds-button slds-button--brand" />
        </div>
    </div>
</aura:component>

Anyhelp would be great. I'm really new to this and a little lost on debugging with salesforce.
 
I'm getting the following error when I save the quickcontact.cmp file:
Failed to save undefined: Invalid definition for null:QuickContactController: null: Source

Below is the code in the file:
<aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId" controller="QuickContactController">
    <aura:attribute name="account" type="Account" />
    <aura:attribute name="newContact" type="Contact"
        default="{ 'sobjectType': 'Contact' }" /> <!-- default to empty record -->
    <aura:attribute name="hasErrors" type="Boolean"
        description="Indicate if there were failures when validating the contact." />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <!-- Display a header with details about the account -->
    <div class="slds-page-header" role="banner">
        <p class="slds-text-heading--label">{!v.account.Name}</p>
        <h1 class="slds-page-header__title slds-m-right--small
            slds-truncate slds-align-left">Create New Contact</h1>
    </div>
    <!-- Display form validation errors, if any -->
    <aura:if isTrue="{!v.hasErrors}">
        <div class="recordSaveError">
            <ui:message title="Error" severity="error" closable="true">
                The new contact can't be saved because it's not valid.
                Please review and correct the errors in the form.
            </ui:message>
        </div>
    </aura:if>
    <!-- Display the new contact form -->
    <div class="slds-form--stacked">
        <div class="slds-form-element">
            <label class="slds-form-element__label"
                for="contactFirstName">First Name: </label>
            <div class="slds-form-element__control">
              <ui:inputText class="slds-input" aura:id="contactFirstName"
                value="{!v.newContact.FirstName}" required="true"/>
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label"
                for="contactLastName">Last Name: </label>
            <div class="slds-form-element__control">
              <ui:inputText class="slds-input" aura:id="contactLastName"
                value="{!v.newContact.LastName}" required="true"/>
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label" for="contactTitle">Title: </label>
            <div class="slds-form-element__control">
              <ui:inputText class="slds-input" aura:id="contactTitle"
                value="{!v.newContact.Title}" />
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label"
                for="contactPhone">Phone Number: </label>
            <div class="slds-form-element__control">
              <ui:inputPhone class="slds-input" aura:id="contactPhone"
                value="{!v.newContact.Phone}" required="true"/>
            </div>
        </div>
        <div class="slds-form-element">
            <label class="slds-form-element__label" for="contactEmail">Email: </label>
            <div class="slds-form-element__control">
              <ui:inputEmail class="slds-input" aura:id="contactEmail"
                value="{!v.newContact.Email}" />
            </div>
        </div>
        <div class="slds-form-element">
            <ui:button label="Cancel" press="{!c.handleCancel}"
                class="slds-button slds-button--neutral" />
            <ui:button label="Save Contact" press="{!c.handleSaveContact}"
                class="slds-button slds-button--brand" />
        </div>
    </div>
</aura:component>

Anyhelp would be great. I'm really new to this and a little lost on debugging with salesforce.
 
I am having trouble with what I am to do with this trailhead module.  I am at this stage and have installed lightning component quickcontact.
I am not a dev so this is hard for me.

Create a Lightning Action
To complete this challenge, you need to add a Lightning component to your org. Then use that component to create a Lightning action on the Account object. When the action’s button is clicked, it creates a new contact based on form input. To get started, install this package that contains the component bundle that you'll need to modify.
The Lightning component must be named quickContact. (Does this name need to include the capital C in contact? It is loaded as all lowercase) 
Add the appropriate interfaces to the quickContact component. (Hint: there are two.) What does this mean?  Is this referring to editing the code?
Create a new action with Label Quick Contact and Name Quick_Contact on the Account object that invokes the quickContact component.
Add the action to the Account Layout page layout.
Having trouble installing your app? Read this article for help.
Any tips would be greatly appreciated.
  • April 12, 2017
  • Like
  • 1