Dear support,
There is a need to call custom function before saving a "Note" on "Case" and bypass it's plain text body to that function as a parameter.
As per documentation:
we created an extension:
.../EspoCRM-5.1.2/custom/Espo/Custom/Hooks/Note/TelMsg.php
With this body:
namespace Espo\Custom\Hooks\Note;
use Espo\ORM\Entity;
class TelMsg extends \Espo\Core\Hooks\Base
{
public function beforeSave(Entity $entity, array $options = array())
{
file_put_contents("test.dump", "");
}
}
however test.dump file has not been created.
Can you kindly clarify:
1) what are we doing wrong?
2) what is execution folder in this case?
3) how to get data from $entity?:
a) new note body
b) parent case object (to be able to operate it's fields as well)
There is a need to call custom function before saving a "Note" on "Case" and bypass it's plain text body to that function as a parameter.
As per documentation:
we created an extension:
.../EspoCRM-5.1.2/custom/Espo/Custom/Hooks/Note/TelMsg.php
With this body:
namespace Espo\Custom\Hooks\Note;
use Espo\ORM\Entity;
class TelMsg extends \Espo\Core\Hooks\Base
{
public function beforeSave(Entity $entity, array $options = array())
{
file_put_contents("test.dump", "");
}
}
however test.dump file has not been created.
Can you kindly clarify:
1) what are we doing wrong?
2) what is execution folder in this case?
3) how to get data from $entity?:
a) new note body
b) parent case object (to be able to operate it's fields as well)
Comment