You need to sign in to do that
Don't have an account?
Mani Gunasekaran 8
How to Access the record Id in custom lightning component on Napili
I was trying to access the record Id in custom lightning component in Salesforce Community (Napili Template) Case Record Detail page
We have done some research and found some solutions:
http://salesforce.stackexchange.com/questions/100211/how-to-access-record-id-in-custom-lightning-component-in-a-salesforce-community
https://developer.salesforce.com/blogs/developer-relations/2015/11/building-context-aware-lightning-components.html
http://salesforce.stackexchange.com/questions/93060/lightning-component-record-id-when-component-in-lightning-page?lq=1
I tried every single one, none of them works.
Code I tried:
<aura:component implements="forceCommunity:availableForAllPageTypes,force:hasRecordId" access="global" >
<ltng:require styles="/resource/SLDS102/assets/styles/salesforce-lightning-design-system-ltng.css"/>
<aura:attribute name="recordId" type="Id"/>
recordId: {!v.recordId}
<div class="slds-button-group" role="group">
<button class="slds-button slds-button--neutral">Close Case</button>
<button class="slds-button slds-button--neutral">Reopen Case</button>
</div>
</aura:component>
We have done some research and found some solutions:
http://salesforce.stackexchange.com/questions/100211/how-to-access-record-id-in-custom-lightning-component-in-a-salesforce-community
https://developer.salesforce.com/blogs/developer-relations/2015/11/building-context-aware-lightning-components.html
http://salesforce.stackexchange.com/questions/93060/lightning-component-record-id-when-component-in-lightning-page?lq=1
I tried every single one, none of them works.
Code I tried:
<aura:component implements="forceCommunity:availableForAllPageTypes,force:hasRecordId" access="global" >
<ltng:require styles="/resource/SLDS102/assets/styles/salesforce-lightning-design-system-ltng.css"/>
<aura:attribute name="recordId" type="Id"/>
recordId: {!v.recordId}
<div class="slds-button-group" role="group">
<button class="slds-button slds-button--neutral">Close Case</button>
<button class="slds-button slds-button--neutral">Reopen Case</button>
</div>
</aura:component>
I have a same problem. Please tell me how you solved this problem if you has overcomed.