Hello,
How could I make an override for entity controller? I made an override for "Account" entity and I want to make a custom AJAX call from that view.
I have this request:
this.ajaxPostRequest(this.scope + '/action/myFunction', {
UserCode: this.model.attributes.sicCode }).then(function (attributes)
{
console.log(attributes);
}.bind(this));
Now how could I override the "Account" controller? I created the override file here: custom/Espo/Custom/Controllers/Account.php
Function "myFunction" is of course inside it, but it still doesn't see it and says that there is no myFunction in "Account" controller.
The controller file is here:
What am I doing wrong?
How could I make an override for entity controller? I made an override for "Account" entity and I want to make a custom AJAX call from that view.
I have this request:
this.ajaxPostRequest(this.scope + '/action/myFunction', {
UserCode: this.model.attributes.sicCode }).then(function (attributes)
{
console.log(attributes);
}.bind(this));
Now how could I override the "Account" controller? I created the override file here: custom/Espo/Custom/Controllers/Account.php
Function "myFunction" is of course inside it, but it still doesn't see it and says that there is no myFunction in "Account" controller.
The controller file is here:
PHP Code:
<?php
namespace Espo\Core\Controllers;
class Account extends Base
{
public function myFunction()
{
die(true);
}
}
Comment