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
Vishwas B NVishwas B N 

component is not available for the tab

I have Created a Lighytning Component to display all Products.
I want to make this component available in the custom application with tab.

But the component is not available for the Lightning Component Tabs.

Lightning ComponentLightning Tab window
RituSharmaRituSharma
Have you used the appropriate implements in your component?

Sharing the details below about implements:

flexipage:availableForAllPageTypes: https://developer.salesforce.com/docs/component-library/bundle/flexipage:availableForAllPageTypes/documentation
To make your component available for record pages and any other type of page, you need to implement the flexipage:availableForAllPageTypes interface.

flexipage:availableForRecordHome: https://developer.salesforce.com/docs/component-library/bundle/flexipage:availableForRecordHome/documentation
To make your component available for record pages only, you need to implement the flexipage:availableForRecordHome interface.

Note: If your component is designed for record pages and any other type of page, use the flexipage:availableForAllPageTypes interface instead.

force:appHostable: https://developer.salesforce.com/docs/component-library/bundle/force:appHostable/documentation
Add the force:appHostable interface to a Lightning component to allow it to be used as a custom tab in Lightning Experience or the Salesforce mobile app. Components that implement this interface can be used to create tabs in both Lightning Experience and the Salesforce mobile app.

force:hasRecordId: https://developer.salesforce.com/docs/component-library/bundle/force:hasRecordId/documentation
By using force:hasRecordId interface in lightning component we can assigned the id of the current record to lightning component. This interface adds an attribute named "recordId" to the component. The type of attribute is string and has 18-character Salesforce record ID.

Add the force:hasRecordId interface to a Lightning component to enable the component to be assigned the ID of the current record. The current record ID is useful if the component is used on a Lightning record page, as an object-specific custom action or action override in Lightning Experience or the Salesforce app, and so on. This interface has no effect except when used within Lightning Experience, the Salesforce mobile app, and template-based communities.

https://www.sfdc-lightning.com/2019/05/forcehasrecordid-and.html

force:hasSObjectName: https://developer.salesforce.com/docs/component-library/bundle/force:hasSObjectName/documentation
This interface is used to indicate that a component has SObject name attribute. Add the force:hasSObjectName interface to a Lightning component to enable the component to be assigned the API name of current record’s sObject type. The sObject name is useful if the component can be used with records of different sObject types, and needs to adapt to the specific type of the current record. This interface has no effect except when used within Lightning Experience, the Salesforce mobile app, and template-based communities.
ShirishaShirisha (Salesforce Developers) 
Hi Vishwas,

Greetings!

Please make sure you use implements="force:appHostable" in your lightning component which will allow us to use it as Custom tab.

Please refer the below document and an example code:
 
<!--simpleTab.cmp-->
<aura:component implements="force:appHostable">
 
    <!-- Simple tab content -->
 
    <h1>Lightning Component Tab</h1>
 
</aura:component>

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_using_lex_s1_config_tab.htm

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
RituSharmaRituSharma
If my answer was helpful, please mark that as the best answer. This would help others in future.