즐겨찾기Pooja Nekkalapudi (William Blair and Company) 님이 #Lightning Experience에 질문했습니다2022년 12월 19일 오후 8:34create a new task buttom using row actions in LWC , how to attach the row ID to the WhatIDimport { LightningElement, track,api, wire } from 'lwc';import { ShowToastEvent } from 'lightning/platformShowToastEvent';import { CurrentPageReference, NavigationMixin } from 'lightning/navigation';import { handleMonitoringLog } from 'c/ent_MonitoringLogFacade';import getColumnNames from '@salesforce/apex/PA_My_Prospects_Datatable_Cont.getColumnNames';import updateProspects from '@salesforce/apex/PA_My_Prospects_Datatable_Cont.updateProspects';import getDualListBoxVals from '@salesforce/apex/PA_My_Prospects_Datatable_Cont.getDualListBoxVals';import removeMeFromTeam from '@salesforce/apex/PA_My_Prospects_Datatable_Cont.removeMeFromTeam';import { loadScript } from 'lightning/platformResourceLoader';import jQuery from '@salesforce/resourceUrl/ent_JQuery';export default class slDatatableWrapper extends NavigationMixin(LightningElement) { @track data = []; @track relatedData = []; @track draftValues = []; lastSavedData = []; @track queryColumnsString=''; @track columns; @track columnsActions=[ { label: 'Edit Company', name: 'edit' }, { label: 'Edit Industry, Sector, Sub-Sector', name: 'edit_industry'}, { label: 'Manage Board Members', name: 'manage_board_members'}, { label: 'Manage Sponsors', name: 'manage_sponsors'}, { label: 'Remove Me from Coverage Team', name: 'remove_me'}, { label: 'New Last Activity', name: 'logcall'}];---- handleRowActions(event) { var eventName=event.target.dataset.id; const actionName = event.detail.action.name; const row = event.detail.row; this.prospectId = row.Id; this.prospectName=row.Name; switch (actionName) { case 'edit': this.isModalOpen=true; this.showChildTable=false; this.showEditForm=true; this.childListHeader='Edit'; this.showDataSpinnerChild=false; handleMonitoringLog({Action_Taken__c:'Click',Component__c:eventName+'.'+actionName,Status__c:'Success',URL__c:window.location.href,Record_Interacted_With__c:this.prospectId}); break; case 'manage_board_members': this.isModalOpen=true; this.showChildTable=true; this.childListHeader='Board Member'; this.showDataSpinnerChild=true; handleMonitoringLog({Action_Taken__c:'Click',Component__c:eventName+'.'+actionName,Status__c:'Success',URL__c:window.location.href,Record_Interacted_With__c:this.prospectId}); break;----case 'logcall': this[NavigationMixin.Navigate]({ type: 'standard__objectPage', attributes: { objectApiName: 'task', actionName: 'new' } }); break; } }How to get this row action logcall to pass in the rowID as whatID for new task 더 보기답변 1개정렬날짜별 정렬가장 유용한 항목별 정렬날짜별 정렬Toby Kutler (Paychex)2022년 12월 19일 오후 11:33Try Row.TaskId You have the Row which is an SObject record. Take the field on that Sobject that is equal to the task id. You might need to change your Apex method to include the TaskId in your query. 댓글 추가답변을 작성하세요...굵은 글꼴기울인 글꼴밑줄취소선불릿 기호 목록번호가 지정된 목록링크 추가코드 블록이미지 삽입파일 첨부링크 URL취소저장0/9000답글 쓰기
Toby Kutler (Paychex)2022년 12월 19일 오후 11:33Try Row.TaskId You have the Row which is an SObject record. Take the field on that Sobject that is equal to the task id. You might need to change your Apex method to include the TaskId in your query.