From 7de2a003e33f40989651ad812e7421923a0466e3 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 28 Apr 2020 19:48:43 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 36ce132..62dcce7 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -349,8 +349,24 @@ namespace AyaNova.PlugIn.V8 d.name = c.FirstName + " " + c.LastName; d.userType = (int)c.UserType; + + //if special 3rd party user type then set their parent object id to -1 to signify will fill in later and satisfy biz rules at server + switch (c.UserType) + { + case UserTypes.Client: + d.customerId = -1; + break; + case UserTypes.HeadOffice: + d.headOfficeId = -1; + break; + } if (c.VendorID != Guid.Empty) + { d.userType = 7;//7 is the RAVEN user type for subcontractor + d.subVendorId = -1; + } + + d.active = false;//all imported users are inactive to start d.roles = 0;//todo: try to determine role from v7 member of group? or is that even possible?