+ Start a Discussion
Keith WooKeith Woo 

"Edit" button missing on Mobile view for Napili Customer Community

We created a Customer Community using the Napili template, but it seems like we've lost functionality of all standard Salesforce buttons usually visible on the record detail when we access the community via a mobile browser (they just don't appear). Does anyone know of a workaround? We're looking to have the community functional in both desktop and mobile browsers. 
Best Answer chosen by Keith Woo
Tommy Vogt 18Tommy Vogt 18
You can do it with a custom lightning component.  You would need a developer to build a component with a button group and then have them add a click handler that calls the edit event. 
First, open developer console up, Click : File > New > Lightning Component Replace all of the code in the component window with the following:
<aura:component implements="forceCommunity:availableForAllPageTypes" access="global" >
    <aura:attribute name="recordId" type="String" default="{!recordId}" />
    <aura:attribute name="objType" type="String" default="{!objType}" />
    <section class="slds-clearfix">
        <div class="slds-float--right">
            <lightning:buttonGroup >
                <lightning:button label="Refresh" onclick="{!c.refreshRecord}" />
                <lightning:button label="Edit" onclick="{!c.editRecord}" />
            </lightning:buttonGroup>
        </div>
    </section>
</aura:component>
Hit Ctrl(command) + S to save
Next, click the Controller Label in the component package to the right of the developer console, replace all the code in it with the following :
({
    refreshRecord : function(component, event, helper) {       
        $A.get('e.force:refreshView').fire();
    },
    editRecord : function(component, event, helper) {
        var editRecordEvent = $A.get("e.force:editRecord");
        editRecordEvent.setParams({
             "recordId": component.get("v.recordId")
       });
       editRecordEvent.fire();    
    }
})
Hit Ctrl(command) + S to save
Next, click on the Design Label in the component package to the right of the developer console, replace all the code in it with the following :
<design:component>
	<design:attribute name="recordId" label="recordId" description="Record Id" />	
</design:component>

Hit Ctrl(command) + S to save

Go into your Community Builder and go to Page Editor mode where you can drag and drop component onto the layout.  Look for your new componet.
Drag it ont the layout where you want it.
**IT MAY DISPLAY AN ERROR ON THE PAGE**
Click on the component, you'll see the options menu open in the upper right hand corner of the screen.  place {!recordId} in the text box for recordId text field, click off and publish your community.
You should now be able edit any records that have this component on it!
 

All Answers

suneel kumar 32suneel kumar 32
Have u found any solution  for this?I have same issue.
Sanghyeon HongSanghyeon Hong
The full site view is not supported in mobile browser, and this is the reason for the behavior you are getting. Here are links of articles that you could use as a reference. 

https://help.salesforce.com/apex/HTViewSolution?urlname=Support-for-Mobile-Browsers&language=en_US 

https://help.salesforce.com/apex/HTViewHelpDoc?id=limits_mobile_sf1_data.htm&language=en_US 
 
Jeff WechslerJeff Wechsler
I too have the same issue, and the documentation states that, for example, you should be able to edit an opportunity in a community in salesforce 1. But you can't. I checked those links you provide and it basically says it should work - but in fact it doesn't. Anyone have advice here? Thanks.
Tommy Vogt 18Tommy Vogt 18
You can do it with a custom lightning component.  You would need a developer to build a component with a button group and then have them add a click handler that calls the edit event. 
First, open developer console up, Click : File > New > Lightning Component Replace all of the code in the component window with the following:
<aura:component implements="forceCommunity:availableForAllPageTypes" access="global" >
    <aura:attribute name="recordId" type="String" default="{!recordId}" />
    <aura:attribute name="objType" type="String" default="{!objType}" />
    <section class="slds-clearfix">
        <div class="slds-float--right">
            <lightning:buttonGroup >
                <lightning:button label="Refresh" onclick="{!c.refreshRecord}" />
                <lightning:button label="Edit" onclick="{!c.editRecord}" />
            </lightning:buttonGroup>
        </div>
    </section>
</aura:component>
Hit Ctrl(command) + S to save
Next, click the Controller Label in the component package to the right of the developer console, replace all the code in it with the following :
({
    refreshRecord : function(component, event, helper) {       
        $A.get('e.force:refreshView').fire();
    },
    editRecord : function(component, event, helper) {
        var editRecordEvent = $A.get("e.force:editRecord");
        editRecordEvent.setParams({
             "recordId": component.get("v.recordId")
       });
       editRecordEvent.fire();    
    }
})
Hit Ctrl(command) + S to save
Next, click on the Design Label in the component package to the right of the developer console, replace all the code in it with the following :
<design:component>
	<design:attribute name="recordId" label="recordId" description="Record Id" />	
</design:component>

Hit Ctrl(command) + S to save

Go into your Community Builder and go to Page Editor mode where you can drag and drop component onto the layout.  Look for your new componet.
Drag it ont the layout where you want it.
**IT MAY DISPLAY AN ERROR ON THE PAGE**
Click on the component, you'll see the options menu open in the upper right hand corner of the screen.  place {!recordId} in the text box for recordId text field, click off and publish your community.
You should now be able edit any records that have this component on it!
 

This was selected as the best answer
m_torcm_torc
@Tommy Vogt, that solution worked perfectly. Thanks!