Thanks
DeleteRelation : function(component, event, helper){
//Calling the Salesforce defined Standard Event for deleting Record.
var ACRId = event.currentTarget.dataset.value;
console.log("deleterecord"+ACRId);
//Calling the EditRecord Event.
var deleteEvent = $A.get("e.force:deleteRecord");
//Setting the Params for the deleteEvent Action.
deleteEvent.setParams({
entityApiName : "AccountContactRelation",
recordId : ACRId
});
//Firing the Event.
deleteEvent.fire();
},
5 respuestas
Hi,
The reason you getting this error is because there is no standard event to delete the records.
force:deleteRecord doesn't exist. That's why you are getting NULL in deleteEvent.
To delete the record, you will need to pass the recordId in a apex class method.