function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rituraj AzadRituraj Azad 

Failed to save SpeakerForm.cmp: Invalid <aura:attribute> type: Speaker_c: Source

User-added image

This error i am getting while saving the code...please help me how to remove this error
Best Answer chosen by Rituraj Azad
Khan AnasKhan Anas (Salesforce Developers) 
Make sure you are using the correct API name. Go to Setup -> Object Manager -> Check API name of your custom object.

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Rituraj,

Greetings to you!

You need to use the correct API name of the object in attribute type. There is a typo in your attribute value, you are using Speaker_c (single underscore) instead of Speaker__c (double underscore).

Use this:
<aura:attribute name="speaker" type="Speaker__c" />

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Rituraj AzadRituraj Azad
After changing the from single underscore to double , still it is showing error
Thank you anas for replying , as i have changed the underscore from single to double still it is showing error.
Khan AnasKhan Anas (Salesforce Developers) 
Make sure you are using the correct API name. Go to Setup -> Object Manager -> Check API name of your custom object.
This was selected as the best answer
Rituraj AzadRituraj Azad

User-added image

 Sir, I am trying to create the lightning component;
https://trailhead.salesforce.com/en/content/learn/projects/salesforce_developer_workshop/creating_lightning_component
you can check out this link , after creating the component it won't get saved.

Steve ConnellySteve Connelly
I am getting the same error in the same place in the same step in to Trailhead. Any answers on why this is happening?

Steve
LAVINIA CIUCIUILAVINIA CIUCIUI
I did not have the Speaker custom object in my org, so i had to create that and once i did, the component saved ok without throwing an error.