Files
espocrm/custom/Espo/Custom/Resources/metadata/formula/CPuls.json
bsiggel e1a963ffab feat(CPuls): Enhance CPuls entity with new fields, tooltips, and options; add localization for German and English
- Added new fields to CPuls entity including status, syncStatus, kiAnalyse, and others.
- Implemented localization for CPuls in German (de_DE) and English (en_US).
- Introduced new API actions for team activation and completion of CPuls.
- Created hooks to update team statistics and manage document counts.
- Added new entity definitions and metadata for CPulsTeamZuordnung and Team.
- Implemented validation logic in formulas to prevent completion of unclean Puls.
- Updated layouts for detail and list views of CPuls.
- Enhanced user entity with absence tracking fields.
- Added scopes for CPuls and CPulsTeamZuordnung.
2026-02-13 10:09:19 +01:00

4 lines
695 B
JSON

{
"beforeSaveApiScript": "// Verhindere Abschluss bei unclean Status\nif (\n (status == 'Abgeschlossen' || entity\\isAttributeChanged('status'))\n && syncStatus == 'unclean'\n) {\n recordService\\throwBadRequest('Puls kann nicht abgeschlossen werden: Neue Dokumente vorhanden (Status: unclean). Bitte warten Sie auf die KI-Analyse.');\n}\n\n// Verhindere Änderungen an finalisiertem Puls\nif (\n finalisiert == true\n && entity\\isAttributeChanged('finalisiert') == false\n && (entity\\isAttributeChanged('status') || entity\\isAttributeChanged('syncStatus'))\n) {\n recordService\\throwBadRequest('Puls ist finalisiert. Neue Dokumente erzeugen automatisch einen neuen Block.');\n}"
}