How to disable back end field validation to avoid the "Field Validation" error
Collapse
X
-
The field is a currency field (built in into sales extension) and is not in use from my client. But it seems, this code does not work for that field. I do not see any jsn error, though it is thrown.
This is the error in the log file:
[2023-03-10 07:03:01] ERROR: Uncaught Exception JsonException: "JSON syntax error in 'custom/Espo/Custom/Resources/metadata/entityDefs/Quote.json'." at /var/www/espocrm/application/Espo/Core/Utils/File/Unifier.php line 250 {"exception":"[object] (JsonException(code: 0): JSON syntax error in 'custom/Espo/Custom/Resources/metadata/entityDefs/Quote.json'. at /var/www/espocrm/application/Espo/Core/Utils/File/Unifier.php:250)"} [] -
How to disable back end field validation to avoid the "Field Validation" error
Sometimes, for whatever reason, it is preferred to bypass Espo's built in field validation rules to avoid triggering the "Field Validation Error" message and interrupting the back end program flow.
Fortunately, this is now possible using metadata settings, so it is not necessary to do any coding to accomplish this.
Simply add these two parameters in your custom entity entityDefs json file under the field for which you want to bypass all validations:
Code:"validationList": [], "mandatoryValidationList": []
For participants that do not mind writing code, the documentation https://docs.espocrm.com/development...validationlist has information on how to define and invoke custom back end validations in case this is the preferred solution.Tags: None
Leave a comment: