This commit is contained in:
@@ -36,8 +36,21 @@ namespace AyaNova.PickList
|
||||
|
||||
//Add rowid column as it's always required
|
||||
AyaPickListFieldDefinition rowIdColumn = pickList.ColumnDefinitions.FirstOrDefault(x => x.IsRowId == true);
|
||||
//this should only happen with a development error
|
||||
if (rowIdColumn == null)
|
||||
throw new System.ArgumentNullException($"DEV ERROR in PickListSqlBuilder.cs: picklist for {pickList.DefaultListObjectType.ToString()} has no rowId column specified in columnDefinitions list");
|
||||
lSelect.Add(rowIdColumn.SqlIdColumnName + " AS rowid");
|
||||
|
||||
//add active only as default for all lists unless inactive is specified
|
||||
if (!IncludeInactive)
|
||||
{
|
||||
AyaPickListFieldDefinition activeColumn = pickList.ColumnDefinitions.FirstOrDefault(x => x.IsActiveColumn == true);
|
||||
//it's ok if there is no active column, it could happen so just roll with it
|
||||
if(activeColumn!=null){
|
||||
lWhere.Add(activeColumn.SqlValueColumnName + " = true");
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string ColumnName in templateColumnNames)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user