You need to sign in to do that
Don't have an account?
bretondev
Trying to get the id of the records that was clicked in aura:iteration
Hello
I am trying to get the record id of the reocrd that was clicked in an aura:iteration.
But instead of getting the value of the id , I get the EL , I don't undrstand why.
I am trying to get the record id of the reocrd that was clicked in an aura:iteration.
But instead of getting the value of the id , I get the EL , I don't undrstand why.
<aura:iteration items="{!v.doublons}" var="item"> <lightning:card title="{!item.nomCompteRaisonSociale}" class="slds-m-around_x-small"> <aura:set attribute="actions"> <ui:button press="{!c.onClickSeeAccount}" aura:id="{!item.recordId}" label="Voir le compte" class="slds-m-around_x-small" /> </aura:set> <p class="slds-p-horizontal_small"> Siret : {!item.siret} <br/> Rue : {!item.shippingStreet} <br/> Code Postal : {!item.codePostal} <br/> Ville : {!item.ville} <br/> </p> </lightning:card> </aura:iteration>
({ onClickSeeAccount : function(component, event, helper) { var searchResults = event.getSource().getLocalId(); } })
https://developer.salesforce.com/forums/?id=906F0000000kAn0IAE