+ Start a Discussion
SFDC_DeveloperSFDC_Developer 

lightning component for standard object

Hi All

I am creating a lightning app for standard object Event.

The App Code is:
<aura:application >
    <h1>Event </h1>
    <CallDocument:EventForm />
</aura:application>

here CallDocument is package namespace and EventForm is Event component.

The Component code is:
<aura:component >
    <aura:attribute name="events" type="Event[]"/>
    <aura:attribute name="newEvent" type="Event" />
    <form>
        <fieldset>
            <ui:inputText aura:id="subject" label="Subject"
                          class="EventForm-control"
                          value="{!e.newEvent.Subject}"
                          required="true" />
        </fieldset>
    </form>
</aura:component>

But I am getting error.
My question is how to call standard object component in app.
Do we need to use namespace for standard object also?

thanks in advance.
Best Answer chosen by SFDC_Developer
RishavRishav
Hii Narendra,
For standard object no need to use any namespace.
There is no error in calling the standard object component in app.
Error is in your component code. 
To see how to fetch data from standard object please see this trailhead link:https://developer.salesforce.com/trailhead/lightning_components/lightning_components_apex

Thanks
Rishav