Editor Delete Cannot read property 'replace' of undefined
Editor Delete Cannot read property 'replace' of undefined

When I select a row to delete it, no requests are made and I get this error:
let credentialsFunc = (method, url, data, success, error) => {
d = JSON.parse(JSON.stringify(data));``
let { cust_account_id, username, password, account_type_id} = d.data[Object.keys(d.data)[0]];
data = JSON.stringify({
username,
password,
account_type_id: parseInt(account_type_id)
});
actions = {
"create": "POST",
"edit": "PUT",
"remove": "DELETE"
}
method = actions[d.action]
if(method === "POST"){
url = `${_config.apis.dti1ticketapps.credentials1ticket}/9147`
} else {
url = `${_config.apis.dti1ticketapps.credentials1ticket}/9147/${cust_account_id}`
}
$.ajax( {
type: method,
url: url,
...(method !== 'DELETE' && {data}),
headers: {
'x-api-key': _config.apis.dti1ticketapps.token,
},
dataType: "json",
contentType:"application/json; charset=utf-8",
success: function (json) {
success( json );
},
error: function (xhr, err, thrown) {
error( xhr, err, thrown );
}
} );
};
Window.systemsManager.editor = editor = new $.fn.dataTable.Editor({
dom: "Bfrtip",
idSrc: 'cust_account_id',
ajax: {
create: credentialsFunc,
edit: credentialsFunc,
delete: credentialsFunc,
},
This discussion has been closed.
Answers
sorry nevermind. figured it out
What was the issue in the end? Was the id source a number?
Allan