+ Start a Discussion

Trying to get the id of the records that was clicked in aura:iteration


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" />
                    <p class="slds-p-horizontal_small">
                        Siret : {!item.siret} <br/>
                        Rue : {!item.shippingStreet} <br/>
						Code Postal : {!item.codePostal} <br/>
                        Ville : {!item.ville} <br/>
	onClickSeeAccount : function(component, event, helper) {
		var searchResults = event.getSource().getLocalId();


User-added image
Best Answer chosen by bretondev
I have found a way to do this with solution provided by Chuck in this post :