お気に入りPooja Nekkalapudi (William Blair and Company) が「#Lightning Experience」で質問2022年12月19日 20: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日 23: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日 23: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.