• sfdc developer 1056
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
Hi Team,
I'm building the lightning data table where I'm using "id" as a key-field
<lightning-datatable 
                key-field="id" 
                data={accountList} 
                columns={columns}  
                onrowselection={handleRowSelected}
                selected-rows={selection}
                oncellchange={handleCellChange}>
            </lightning-datatable>
I want to retrive the row id in my javascript. How to fetch that ? I have tried many solution like:
let selectedRecords = this.template.querySelector("lightningdatatable").getSelectedRows();
        if (selectedRecords) {
            for (const key in selectedRecords) {
                console.log('checking',selectedRecords[key].event.currentTarget.dataset.id);
               console.log('checking',selectedRecords[key]['id']);
               console.log('checking',selectedRecords[key].event.target.dataset.rowId);
               console.log('checking',selectedRecords[key].dataset.id);
               console.log('checking',selectedRecords[key]['id']);
}
Please let me know if anybody knows the solutions.
Thank you in advance
Hi Team,
I have an requirement to display the records of Account based on the search criteria in data Table in LWC.
What I want is if I select any row and again search for other accounts then in the UI intially my first selected account record should come and then records based on the search criteria should come.

Can anyone help me on this?
 
I want to create the custom clone button on case layout through apex. Can anyone help me on this
I am trying to use the Out Of Box Clone button in lightning and looks like it auto populates all the fields from the Parent Case to the newly created case but not the parent Case field. The Parent Case field is not auto populated in the Create New Cloned Record page.

can anyone please help on this. I want to populate the parent case id in the cloned case. I have tried the follwing solution but it is not working:

Can this be fixed by URl button. I tried couple of different like below
/{!Case.Id}/e?clone=1&00N80000002voCf={!Case.CaseNumber}

also
/{!Case.Id}/e?clone=1?defaultFieldValues=Parent={!Case.Id}

also
/{!Case.Id}/e?clone=1?defaultFieldValues=Parent={!Case.CaseNumber}
Hi Team,
I'm building the lightning data table where I'm using "id" as a key-field
<lightning-datatable 
                key-field="id" 
                data={accountList} 
                columns={columns}  
                onrowselection={handleRowSelected}
                selected-rows={selection}
                oncellchange={handleCellChange}>
            </lightning-datatable>
I want to retrive the row id in my javascript. How to fetch that ? I have tried many solution like:
let selectedRecords = this.template.querySelector("lightningdatatable").getSelectedRows();
        if (selectedRecords) {
            for (const key in selectedRecords) {
                console.log('checking',selectedRecords[key].event.currentTarget.dataset.id);
               console.log('checking',selectedRecords[key]['id']);
               console.log('checking',selectedRecords[key].event.target.dataset.rowId);
               console.log('checking',selectedRecords[key].dataset.id);
               console.log('checking',selectedRecords[key]['id']);
}
Please let me know if anybody knows the solutions.
Thank you in advance
Hi Team,
I'm building the lightning data table where I'm using "id" as a key-field
<lightning-datatable 
                key-field="id" 
                data={accountList} 
                columns={columns}  
                onrowselection={handleRowSelected}
                selected-rows={selection}
                oncellchange={handleCellChange}>
            </lightning-datatable>
I want to retrive the row id in my javascript. How to fetch that ? I have tried many solution like:
let selectedRecords = this.template.querySelector("lightningdatatable").getSelectedRows();
        if (selectedRecords) {
            for (const key in selectedRecords) {
                console.log('checking',selectedRecords[key].event.currentTarget.dataset.id);
               console.log('checking',selectedRecords[key]['id']);
               console.log('checking',selectedRecords[key].event.target.dataset.rowId);
               console.log('checking',selectedRecords[key].dataset.id);
               console.log('checking',selectedRecords[key]['id']);
}
Please let me know if anybody knows the solutions.
Thank you in advance
I want to create the custom clone button on case layout through apex. Can anyone help me on this
I am trying to use the Out Of Box Clone button in lightning and looks like it auto populates all the fields from the Parent Case to the newly created case but not the parent Case field. The Parent Case field is not auto populated in the Create New Cloned Record page.

can anyone please help on this. I want to populate the parent case id in the cloned case. I have tried the follwing solution but it is not working:

Can this be fixed by URl button. I tried couple of different like below
/{!Case.Id}/e?clone=1&00N80000002voCf={!Case.CaseNumber}

also
/{!Case.Id}/e?clone=1?defaultFieldValues=Parent={!Case.Id}

also
/{!Case.Id}/e?clone=1?defaultFieldValues=Parent={!Case.CaseNumber}