Activity Forums Salesforce® Discussions how to get index number of a row in table in aura iteration in Salesforce?

  • Piyush

    Member
    November 25, 2019 at 6:18 am

    Hi,

    I am sharing an example you can take help from this for your senerio:-

    <a href="javascript:void(0);" id="{!idx}" onclick="{!c.editAffiliation}">Edit</a>
    
    editAffiliation : function(component, event, helper) {
        helper.editRecord(component, event);
    }
    
    editRecord : function(cmp, ev) {
        var afList = cmp.get('v.afList');
        var affiliation = afList[ev.srcElement.id];
        this.openModal(affiliation);
    }

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos