How to cancel further execution in a hook and return an error / message?
beforeSave:
Is there a flow chart somewhere for the processes in CRM? For newcomers to development with EspoCRM it is not so easy to get an overview of what which file/class is for.
From what I have seen so far, it is absolutely sufficient to limit yourself to the Custom folder. But can I simply change automatically created classes? Can someone tell me what the situation is with the folders?
Controller looks like entry points for API.
After that comes the service, which contains the logic, and then entities, which only refers to one record.
If I want to compare two records then service would be correct, if I want to check the status of a record then entity would be the correct class?
I guess the Classes folder is for entity independent functions then?
Thanks for help & time
beforeSave:
PHP Code:
if($dateStart > $dateEnd){
return ? OR throw ?
}
From what I have seen so far, it is absolutely sufficient to limit yourself to the Custom folder. But can I simply change automatically created classes? Can someone tell me what the situation is with the folders?
Controller looks like entry points for API.
After that comes the service, which contains the logic, and then entities, which only refers to one record.
If I want to compare two records then service would be correct, if I want to check the status of a record then entity would be the correct class?
I guess the Classes folder is for entity independent functions then?
Thanks for help & time
Comment