//Getting configured Account Structure Data from dynamics AX
static void DimensionHierarchy(Args _args)
{
DimensionHierarchyLevel dimHierarchyLevel;
DimensionAttribute dimAttribute;
DimensionConstraintNode dimConstraintNode;
DimensionConstraintNodeCriteria dimConstraintNodeCriteria;
DimensionHierarchy dimHierarchy;
str 60 _dimHierarchy = "<Account structure name>";
;
setPrefix("");
while select RecId from dimHierarchy
where dimHierarchy.Name == _dimHierarchy
join RecId from dimHierarchyLevel
where dimHierarchyLevel.DimensionHierarchy == dimHierarchy.RecId
join Name from dimAttribute
where dimAttribute.RecId == dimHierarchyLevel.DimensionAttribute
join RecId from dimConstraintNode
order by dimConstraintNode.Ordinal
where dimConstraintNode.DimensionHierarchyLevel == dimHierarchyLevel.RecId
join dimConstraintNodeCriteria
where dimConstraintNodeCriteria.DimensionConstraintNode == dimConstraintNode.RecId
{
info(strFmt("%1 | From- %2 | To- %3",
dimAttribute.Name,
dimConstraintNodeCriteria.RangeFrom,
dimConstraintNodeCriteria.RangeTo
));
}
}
Reference: https://sangeethwiki.blogspot.com/2017/10/ledger-and-default-dimension.html
static void DimensionHierarchy(Args _args)
{
DimensionHierarchyLevel dimHierarchyLevel;
DimensionAttribute dimAttribute;
DimensionConstraintNode dimConstraintNode;
DimensionConstraintNodeCriteria dimConstraintNodeCriteria;
DimensionHierarchy dimHierarchy;
str 60 _dimHierarchy = "<Account structure name>";
;
setPrefix("");
while select RecId from dimHierarchy
where dimHierarchy.Name == _dimHierarchy
join RecId from dimHierarchyLevel
where dimHierarchyLevel.DimensionHierarchy == dimHierarchy.RecId
join Name from dimAttribute
where dimAttribute.RecId == dimHierarchyLevel.DimensionAttribute
join RecId from dimConstraintNode
order by dimConstraintNode.Ordinal
where dimConstraintNode.DimensionHierarchyLevel == dimHierarchyLevel.RecId
join dimConstraintNodeCriteria
where dimConstraintNodeCriteria.DimensionConstraintNode == dimConstraintNode.RecId
{
info(strFmt("%1 | From- %2 | To- %3",
dimAttribute.Name,
dimConstraintNodeCriteria.RangeFrom,
dimConstraintNodeCriteria.RangeTo
));
}
}
Reference: https://sangeethwiki.blogspot.com/2017/10/ledger-and-default-dimension.html
No comments:
Post a Comment