Axapta 获取尺寸标注段和值的列表
对于一段集成,已决定提供一个视图,该视图可以检索特定维度段的值列表 验证在这一点上并不重要,已经有了一些相当健壮的验证,但我正在努力解决如何在SQL中获取这些信息的问题 理想情况下,我最终会得到一个表结构,该表结构只有值(对于BusinessUnit为Ie 1010)和相应的名称(Ie BU1) 我可以从DefaultDimensionView中提取显示值和段名称,但不能提取与特定段值关联的名称Axapta 获取尺寸标注段和值的列表,axapta,dynamics-ax-2012-r3,Axapta,Dynamics Ax 2012 R3,对于一段集成,已决定提供一个视图,该视图可以检索特定维度段的值列表 验证在这一点上并不重要,已经有了一些相当健壮的验证,但我正在努力解决如何在SQL中获取这些信息的问题 理想情况下,我最终会得到一个表结构,该表结构只有值(对于BusinessUnit为Ie 1010)和相应的名称(Ie BU1) 我可以从DefaultDimensionView中提取显示值和段名称,但不能提取与特定段值关联的名称 我是否忽略了一种公开这些信息的简单方法?(给定财务维度,可能不会,但希望如此)在SQL中获取维度的描
我是否忽略了一种公开这些信息的简单方法?(给定财务维度,可能不会,但希望如此)在SQL中获取维度的描述并不容易,因为它需要存储描述的支持实体表的知识 在AX中,只需使用
DefaultDimensionView.DimensionDescription
显示方法即可:
display String50 dimensionDiscription()
{
Common common;
DictTable d;
if (this.BackingEntityType)
{
d = new DictTable(this.BackingEntityType);
common = d.makeRecord();
select common where common.(this.KeyAttribute) == this.EntityInstance;
return DimensionAttribute::getLocalizedNameByEntityAndInstance(this.DimensionAttributeId, this.EntityInstance, common.(this.NameAttribute));
}
return '';
}
它只需在备份表和字段(存储在
DimensionAttriube
表中)上进行查找。在SQL中获取维度的描述并不容易,因为它需要了解存储描述的备份实体表
在AX中,只需使用DefaultDimensionView.DimensionDescription
显示方法即可:
display String50 dimensionDiscription()
{
Common common;
DictTable d;
if (this.BackingEntityType)
{
d = new DictTable(this.BackingEntityType);
common = d.makeRecord();
select common where common.(this.KeyAttribute) == this.EntityInstance;
return DimensionAttribute::getLocalizedNameByEntityAndInstance(this.DimensionAttributeId, this.EntityInstance, common.(this.NameAttribute));
}
return '';
}
它只需查找支持表和字段(存储在DimensionAttriube
表中)