There is a mail compose function inside the espo crm , and i'm trying to update email_status of the related entity once after sending the mail.
\client\src\views\email\record\compose.js
Inside this file
send: function () {
ajax call to custom controller
}
I need to make a custom controller call , how to do ?
I tried to use Entity name
$.ajax({
url: "MyEntityName",
type: "post",
data:,
success: function (response) {
},
error: function(jqXHR, textStatus, errorThrown) {
console.log(textStatus, errorThrown);
}
});
This ajax calls the actionCreate function , But actually i need to call actionUpdate function with the Entity id , so i tried this way
$.ajax({
url: "MyEntityName/myentityid",
type: "post",
data:,
success: function (response) {
},
error: function(jqXHR, textStatus, errorThrown) {
console.log(textStatus, errorThrown);
}
});
The above ajax call shows 404 not found , error , how to solve this issue , any help is appreciated , Thanks in advance
is it good to use custom controller function ? if so please let me know how to call custom controller function.
\client\src\views\email\record\compose.js
Inside this file
send: function () {
ajax call to custom controller
}
I need to make a custom controller call , how to do ?
I tried to use Entity name
$.ajax({
url: "MyEntityName",
type: "post",
data:,
success: function (response) {
},
error: function(jqXHR, textStatus, errorThrown) {
console.log(textStatus, errorThrown);
}
});
This ajax calls the actionCreate function , But actually i need to call actionUpdate function with the Entity id , so i tried this way
$.ajax({
url: "MyEntityName/myentityid",
type: "post",
data:,
success: function (response) {
},
error: function(jqXHR, textStatus, errorThrown) {
console.log(textStatus, errorThrown);
}
});
The above ajax call shows 404 not found , error , how to solve this issue , any help is appreciated , Thanks in advance
is it good to use custom controller function ? if so please let me know how to call custom controller function.
Comment