+ Start a Discussion
Aditya Saini 1Aditya Saini 1 

Lightning custom component not visible on salesforce1 mobile app

I have created a lightning component and I wanted to display it in account tab in detail record page, so for that i created a tab just beside the account detail tab and drag an dropped the component there.
It workers fine in salesforce lighting but when i tried to login through salesforce 1 mobile app that tab itself is not visible and also the component is not visible.can anyone tell me why this is happenening ?
 
Best Answer chosen by Aditya Saini 1
sfdcMonkey.comsfdcMonkey.com
HI Aditya, 
Salesforce1 app uses the standard compact page layout as defined in the Page Layout Editor, not a Lightning Page that can be edited in Lightning App Builder. The Page Layout Editor doesn't support adding Lightning components.
You can create custom Lightning pages and add them to the Salesforce1 navigation, but they aren't the same as the Lightning Experience pages that you see in the desktop version.
Hopes it helps you, 
let me inform and mark it as a solved if it helps you.
thanks [sfdcmonkey.com
 
 

All Answers

Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Aditya,

Add Lightning Components as Custom Tabs in Salesforce1 mobile app I hope it will be helpful.

Best Regards
Rahul Kumar
Aditya Saini 1Aditya Saini 1
Hi Rahul,
Thanks for posting the answer but this explains how to add lightning component as a tab where as the issue is I wanted the component to be visible on record page in a seperate tab just beside the related tab in lightning view.
User-added image
sfdcMonkey.comsfdcMonkey.com
HI Aditya, 
Salesforce1 app uses the standard compact page layout as defined in the Page Layout Editor, not a Lightning Page that can be edited in Lightning App Builder. The Page Layout Editor doesn't support adding Lightning components.
You can create custom Lightning pages and add them to the Salesforce1 navigation, but they aren't the same as the Lightning Experience pages that you see in the desktop version.
Hopes it helps you, 
let me inform and mark it as a solved if it helps you.
thanks [sfdcmonkey.com
 
 
This was selected as the best answer
Aditya Saini 1Aditya Saini 1
Hi Pyush,
Thanks for the information but I have tried this, so you are saying that we cannot add lightning component to related tab in salesforce 1?
sfdcMonkey.comsfdcMonkey.com
yes as per my knowlage salesforce1 uses the standard compact page layout so it's not support adding Lightning components or custom tabs yet.
Hops it helps 
Aditya Saini 1Aditya Saini 1
Ok thanks
Ken Koellner 1Ken Koellner 1

Also checking on this thread.  Sometimes you can scan all the documentation and it tells you what you can do but doesn't tell you what you can't do so you want to double-check that you didn't miss something.

I built a Lightning Record Page with Lightning App Builder for Account.  I activitated it and made it the default page for all users.  I get that page in Lighning Experience when I view Accounts.  But it appears I cannot get the page in the SF1 Mobile app.  I take it is because of the reason pointed out in the prior post, yes?

Anyone know if showing Lightning Record Pages is on the roadmap?

I know one thing people have been asking for for years is the ability to customize and display a different layout based on device.  That could be accomplished with Lightning Record Pages but putting a bit of conditional code in the page.  But, if you can't use the Lightning Record pages in SF1 Mobile, that soluiton will not fly (yet).

David Roberts 4David Roberts 4
I managed to do this by using a Lightning Quick Action on the record page.
The action calls your Lightning component.

See: https://developer.salesforce.com/docs/atlas.en-us.212.0.lightning.meta/lightning/lightning_component_actions.htm

Make sure your component has these implementations:-
force:LightningQuickAction
force:appHostable
force:hasRecordId

It works great on the mobile - I just need to learn how to format for a mobile page!
VenkatBalakrishnanVenkatBalakrishnan
We have a lightning component and it is tied to an account record page.  It displays fine in desktop but for Salesforce Mobile, we have to create the lightning component as Custom Tab in Salesforce1 as mentioned in this post but my requirement is to tie this to an account record so that I can display on the account detail record page.  The custom tab solution only helps only to view the lightning component but I need to tie this to an account record.  How to accomplish this?  Any help is greatly appreciated.
JayHoltJayHolt
Hey David - Your advice helped me solve an issue with a client. Thanks so much!
Jonathan Russell 14Jonathan Russell 14
Hi David - I used your tip to call the component from the quick action but I'm getting an error - "Latitude and Longitude API Field Names are already set. 

Any idea what might be causing that?
David Roberts 4David Roberts 4
Sounds like an error in your component rather than being caused by the calling method. You'll need to add some debug diagnostics to track down where the message originates. A misture of console.log in the javascript and system.debug in the apex will do the trick.
Jonathan Russell 14Jonathan Russell 14
You're right David - after looking into it some more, the component I'm using needs the field housing the GPS coordinates specified on the lighting page builder. Works fine when you use it that way. But when you call it with the button it doesn't know where to grab the lat/lon from. Thanks,
Navita_007Navita_007
@Aditya Saini - did you find any other solution? Other than a quick action?
Sowmya KandulaSowmya Kandula
This worked for me. In ipad settings ->  selected Salesforce App and “Allow Cross-Website Tracking”
And update apps and pages for mobile and update pagelayout for downloadable app (Lightning on tablet: full-width. Pilot feature. See below
) in Setup - > New Salesforce Mobile App QuickStart.