Skip to content
Snippets Groups Projects
Commit efa76c35 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Merge branch '1059218_FixDeleteVisitplanRecommendations' into '2020.1'

[Projekt: Entwicklung - Neon][TicketNr.: 1059218][Besuchsvorschlag kann in QS...

See merge request xrm/basic!274
parents ff017916 41dd9779
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/documentation.adoc</documentation>
<title>Visitplan Weekly Overview</title>
<grantDeleteProcess>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/grantDeleteProcess.js</grantDeleteProcess>
<iconId>VAADIN:CAR</iconId>
<image>VAADIN:CAR</image>
<recordContainer>db</recordContainer>
......
import("system.vars");
import("system.result");
import("Entity_lib");
var id = vars.get("$field.VISITPLANEMPLOYEEWEEKID")
var canDelete = new HasLinkedObjectTester()
.andNoEntityRows("VisitPlanEntry_entity", "Entries", {Entries_param : id})
.validate();
result.string(canDelete)
\ No newline at end of file
import("system.vars");
import("Calendar_lib");
import("system.neon");
import("Sql_lib");
import("system.db");
var id = vars.get("$field.APPOINTMENT_ID") //deletes appointmententries (+ the linked Objects) if an appointment has been made
new SqlBuilder(SqlUtils.getSystemAlias()).whereIfSet("ASYS_CALENDARBACKEND.ELEMENTUID", id)
.deleteData();
newWhereIfSet("AB_APPOINTMENTLINK.APPOINTMENT_ID", id)
.deleteData();
newWhereIfSet("VISITPLANENTRY.VISITPLANENTRYID", "$field.UID")
.deleteData();
\ No newline at end of file
......@@ -4,7 +4,6 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<size>SMALL</size>
<isOverlay v="false" />
<overlayOrientation>PORTRAIT</overlayOrientation>
<layout>
<headerFooterLayout>
<name>layout</name>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment