From 463fc06a1e7a3bd8f43f69da25293b883fd2ada9 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 4 Dec 2020 00:31:42 +0000 Subject: [PATCH] --- server/AyaNova/biz/CustomerBiz.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/AyaNova/biz/CustomerBiz.cs b/server/AyaNova/biz/CustomerBiz.cs index 7bcad4b4..a0af9ea4 100644 --- a/server/AyaNova/biz/CustomerBiz.cs +++ b/server/AyaNova/biz/CustomerBiz.cs @@ -250,7 +250,18 @@ namespace AyaNova.Biz { //## NOTE: contact isn't so important, this could be changed to check only more important things like workorders etc //and just attempt to delete all the contacts if possible, but for now.... + + //The plan is anything that is "in" the same form is automatically deleted (unless really critical) + //However, anything that you select on "another" form is not automatically deleted and is allowed to trigger a ref integrity check + + //So, for a customer, the Customer Notes collection is accessed from within the Customer form, even though it's actually external but user doesn't see it that way + //so they would be deleted automatically, same goes for Contacts (if they can be deleted and don't have connections elsewhere) + //Workorders and things that you select a Customer for would trigger an error and NOT be deleted automatically + //The Mass delete Extension will be used in those cases to clear out all the workorders etc + + + //Referential integrity error if (await ct.User.AnyAsync(z => z.CustomerId == inObj.Id) == true) {