diff --git a/entity/Appointment_entity/Appointment_entity.aod b/entity/Appointment_entity/Appointment_entity.aod index d91f52f018b02ef0a9c86c163927ee0cc6dbd5b7..6f51538041ffc0b890e44450ea85fd73235b5185 100644 --- a/entity/Appointment_entity/Appointment_entity.aod +++ b/entity/Appointment_entity/Appointment_entity.aod @@ -24,6 +24,7 @@ </entityField> <entityField> <name>DESCRIPTION</name> + <valueProcess>%aditoprj%/entity/Appointment_entity/entityfields/description/valueProcess.js</valueProcess> </entityField> <entityField> <name>CLASSIFICATION</name> diff --git a/entity/Appointment_entity/entityfields/description/valueProcess.js b/entity/Appointment_entity/entityfields/description/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..4dca60cdc128e47437941dace41524b7f651fdd2 --- /dev/null +++ b/entity/Appointment_entity/entityfields/description/valueProcess.js @@ -0,0 +1,17 @@ +import("system.neon"); +import("system.vars"); +import("system.calendars"); +import("system.result"); + +/** + * Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate + */ +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param") && vars.get("$this.value") == null) +{ + var event = JSON.parse(vars.getString("$param.Entry_param")); + + if(event[calendars.DESCRIPTION]) + result.string(event[calendars.DESCRIPTION]); +} +else + result.string(vars.get("$this.value")); \ No newline at end of file