• Mani Gunasekaran 8
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
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>
 
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>