web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / FT Dynamics AX blog / Get indiviual segment from ...

Get indiviual segment from a DimensionAttributeValueCombination recID

dolee Profile Picture dolee 11,279
Wrote a simple job today to collect individual segment from a DimensionAttributeValueCombination record. In case you have any use of it:

static void GetFinDimsFromLedgerAccountDimension(Args _args)
{
LedgerDimensionAccount ledgerDimension = 5637147578;
DimensionDefaultingEngine engine = DimensionDefaultingEngine::construct(ledgerDimension);
DimensionStorage storage = engine.getStorage();
DimensionStorageSegment segment;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
int i;

for (i=1; i<=storage.segmentCount(); i++)
{
segment = storage.getSegment(i);

dimAttrValue = DimensionAttributeValue::find(Segment.parmDimensionAttributeValueId());

dimAttr = DimensionAttribute::find(dimAttrValue.DimensionAttribute);

info (strFmt("%3 >> %2 (%1) ",segment.getName(), segment.parmDisplayValue(), DimAttr.Name));
}
}
This posting is provided "AS IS" with no warranties, and confers no rights.

This was originally posted here.

Comments

*This post is locked for comments