function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arvind_SinghArvind_Singh 

Lightning Data Table checkbox

Hello - I am facing issue when trying to get value from wrapper class when checkbox is selected from List. I am saving user Id in wrapper class. I need to post to chatter based on for Selected and unSelected user. 

Wrapper Class :
public class UserdetailsWrapper{
    @AuraEnabled public string userName  {get;set;}
    @AuraEnabled public Id userId        {get;set;}
    @AuraEnabled public string userrole  {get;set;}
    @AuraEnabled public Boolean userchk  {get;set;}
    
    public UserdetailsWrapper(string userName,Id userId,string userrole){
        this.userName = userName;
        this.userId   = userId;
        this.userrole = userrole;
        this.userchk   = false;
    }
    
}

On Button Press I need to post to used for sleetced and unselected user from chatter post 
I am not getting user ID in log here is my JS Helper 
I googled and changed multiple times but nothing worked Any help or sample code ?
for (var m = 0; m < rowsSelected.length; m++){
                                AskedTo.push(rowsSelected[m].get("v.userId"));
                                alert("Loop-Selected Row");
                                console.log(rowsSelected[m].get("v.userId"));
                            }
 for (var n = 0; n < rowsUnSelected.length; n++) {
                                FyiTo.push(rowsUnSelected[n].get("v.userId"));
                                console.log(rowsUnSelected[n].get("v.userId"));
                                alert("Loop-UnSelected Row");
                            }