This commit is contained in:
2020-01-13 23:59:38 +00:00
parent ba44f4407b
commit a4e68c9d60
3 changed files with 7 additions and 7 deletions

View File

@@ -11,8 +11,8 @@ namespace AyaNova.Biz
public static class ObjectFields
{
public const string WIDGET_FORM_KEY = "widget";
public const string USER_FORM_KEY = "user";
public const string WIDGET_KEY = "widget";
public const string USER_KEY = "user";
public static List<string> AvailableObjectKeys
@@ -20,7 +20,7 @@ namespace AyaNova.Biz
get
{
List<string> l = new List<string>{
WIDGET_FORM_KEY, USER_FORM_KEY
WIDGET_KEY, USER_KEY
};
return l;
}
@@ -40,7 +40,7 @@ namespace AyaNova.Biz
List<ObjectField> l = new List<ObjectField>();
switch (key)
{
case WIDGET_FORM_KEY:
case WIDGET_KEY:
l.Add(new ObjectField("WidgetName", "Name", false, false));//is not shared localized text key and not hideable as it is in the validation rules for widget
l.Add(new ObjectField("WidgetSerial", "Serial"));//not in validation rules BUT, is HIDEABLE and is set to NOT NULLABLE in the schema so this field MUST MUST have a default value in client
l.Add(new ObjectField("WidgetDollarAmount", "DollarAmount"));
@@ -69,7 +69,7 @@ namespace AyaNova.Biz
l.Add(new ObjectField("WidgetCustom16", false, true, true));
break;
case USER_FORM_KEY:
case USER_KEY:
l.Add(new ObjectField("Name", true, false));//is not shared localized text key and not hideable as it is in the validation rules for widget
l.Add(new ObjectField("EmployeeNumber"));
l.Add(new ObjectField("Roles", false, false));

View File

@@ -531,7 +531,7 @@ namespace AyaNova.Biz
AddError(ApiErrorCode.VALIDATION_LENGTH_EXCEEDED, "EmployeeNumber", "255 max");
//Any form customizations to validate?
var FormCustomization = ct.FormCustom.SingleOrDefault(x => x.FormKey == ObjectFields.USER_FORM_KEY);
var FormCustomization = ct.FormCustom.SingleOrDefault(x => x.FormKey == ObjectFields.USER_KEY);
if (FormCustomization != null)
{
//Yeppers, do the validation, there are two, the custom fields and the regular fields that might be set to required

View File

@@ -495,7 +495,7 @@ namespace AyaNova.Biz
}
//Any form customizations to validate?
var FormCustomization = ct.FormCustom.SingleOrDefault(x => x.FormKey == ObjectFields.WIDGET_FORM_KEY);
var FormCustomization = ct.FormCustom.SingleOrDefault(x => x.FormKey == ObjectFields.WIDGET_KEY);
if (FormCustomization != null)
{
//Yeppers, do the validation, there are two, the custom fields and the regular fields that might be set to required