You need to sign in to do that
Don't have an account?

Using Aura how can we fetch record ids
Hello,
I have a component which has a list of Account records. I just want to collect all selected records ids and pass those to Apex class.
Thank you in advance!

I have a component which has a list of Account records. I just want to collect all selected records ids and pass those to Apex class.
Thank you in advance!
Hi ,
if its lightning Datattable then you can use like below
<lightning:datatable onrowselection="{! c.handleRowAction }">
handleRowAction : function(cmp, event, helper){
var selRows = event.getParam('selectedRows');
in selrows variable you will get all the rows
You can do it like this:
Component: Controller:
you can take reference from this:
https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example#lightningcomponentdemo:exampleDatatableBase
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi