From 80d73fc71137f63578e66883725d6927fb500653 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sun, 23 Jan 2022 16:26:06 +0000 Subject: [PATCH] --- server/AyaNova/biz/UserBiz.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/AyaNova/biz/UserBiz.cs b/server/AyaNova/biz/UserBiz.cs index 56319302..3485adb5 100644 --- a/server/AyaNova/biz/UserBiz.cs +++ b/server/AyaNova/biz/UserBiz.cs @@ -892,7 +892,11 @@ namespace AyaNova.Biz //Any form customizations to validate? - var FormCustomization = await ct.FormCustom.SingleOrDefaultAsync(z => z.FormKey == AyaType.User.ToString()); + //contact is type if customer user + var formKey = AyaType.User.ToString(); + if (proposedObj.UserType == UserType.Customer || proposedObj.UserType == UserType.HeadOffice) + formKey = "Contact"; + var FormCustomization = await ct.FormCustom.SingleOrDefaultAsync(z => z.FormKey == formKey); if (FormCustomization != null) { //Yeppers, do the validation, there are two, the custom fields and the regular fields that might be set to required