This commit is contained in:
@@ -11,8 +11,8 @@ namespace AyaNova.Biz
|
|||||||
public static class ObjectFields
|
public static class ObjectFields
|
||||||
{
|
{
|
||||||
|
|
||||||
public const string WIDGET_FORM_KEY = "widget";
|
public const string WIDGET_KEY = "widget";
|
||||||
public const string USER_FORM_KEY = "user";
|
public const string USER_KEY = "user";
|
||||||
|
|
||||||
|
|
||||||
public static List<string> AvailableObjectKeys
|
public static List<string> AvailableObjectKeys
|
||||||
@@ -20,7 +20,7 @@ namespace AyaNova.Biz
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
List<string> l = new List<string>{
|
List<string> l = new List<string>{
|
||||||
WIDGET_FORM_KEY, USER_FORM_KEY
|
WIDGET_KEY, USER_KEY
|
||||||
};
|
};
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,7 @@ namespace AyaNova.Biz
|
|||||||
List<ObjectField> l = new List<ObjectField>();
|
List<ObjectField> l = new List<ObjectField>();
|
||||||
switch (key)
|
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("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("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"));
|
l.Add(new ObjectField("WidgetDollarAmount", "DollarAmount"));
|
||||||
@@ -69,7 +69,7 @@ namespace AyaNova.Biz
|
|||||||
l.Add(new ObjectField("WidgetCustom16", false, true, true));
|
l.Add(new ObjectField("WidgetCustom16", false, true, true));
|
||||||
break;
|
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("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("EmployeeNumber"));
|
||||||
l.Add(new ObjectField("Roles", false, false));
|
l.Add(new ObjectField("Roles", false, false));
|
||||||
|
|||||||
@@ -531,7 +531,7 @@ namespace AyaNova.Biz
|
|||||||
AddError(ApiErrorCode.VALIDATION_LENGTH_EXCEEDED, "EmployeeNumber", "255 max");
|
AddError(ApiErrorCode.VALIDATION_LENGTH_EXCEEDED, "EmployeeNumber", "255 max");
|
||||||
|
|
||||||
//Any form customizations to validate?
|
//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)
|
if (FormCustomization != null)
|
||||||
{
|
{
|
||||||
//Yeppers, do the validation, there are two, the custom fields and the regular fields that might be set to required
|
//Yeppers, do the validation, there are two, the custom fields and the regular fields that might be set to required
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Any form customizations to validate?
|
//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)
|
if (FormCustomization != null)
|
||||||
{
|
{
|
||||||
//Yeppers, do the validation, there are two, the custom fields and the regular fields that might be set to required
|
//Yeppers, do the validation, there are two, the custom fields and the regular fields that might be set to required
|
||||||
|
|||||||
Reference in New Issue
Block a user