Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ private TableModel BuildTableModelFromMetadata(Dictionary<string, EntityMetadata
DecimalAttributeMetadata decAttr => BuildDecimalColumn(decAttr),
DoubleAttributeMetadata dblAttr => BuildDoubleColumn(dblAttr),
MoneyAttributeMetadata moneyAttr => BuildMoneyColumn(moneyAttr),
EnumAttributeMetadata enumAttribute when enumAttribute.AttributeType == AttributeTypeCode.EntityName => BuildStringColumn(enumAttribute),
EnumAttributeMetadata enumAttr => BuildEnumColumn(enumAttr),
LookupAttributeMetadata lookupAttr when lookupAttr.AttributeType == AttributeTypeCode.PartyList => BuildPartyListColumn(lookupAttr),
LookupAttributeMetadata lookupAttr => BuildLookupColumn(lookupAttr),
Expand Down Expand Up @@ -284,6 +285,14 @@ private void AddPrimaryIdColumn(TableModel table, EntityMetadata entityMetadata)
MaxLength = attr.MaxLength,
};

private StringColumnModel BuildStringColumn(EnumAttributeMetadata attr) => new StringColumnModel
{
LogicalName = attr.LogicalName,
SchemaName = attr.SchemaName,
DisplayName = ApplyLabelMapping(attr.DisplayName?.UserLocalizedLabel?.Label ?? attr.LogicalName),
Description = ApplyLabelMapping(attr.Description?.UserLocalizedLabel?.Label ?? string.Empty),
};

private MemoColumnModel BuildMemoColumn(MemoAttributeMetadata attr) => new MemoColumnModel
{
LogicalName = attr.LogicalName,
Expand Down