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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

DimensionStorage Cross Company Segment name

(0) ShareShare
ReportReport
Posted on by 5

I'm developing an srss report on a GeneralJournalAccountEntry (Cross comapny) table and when I use DimensionStorage to get names of ledger dimensions segments
Using this code (using Job here for simplification only) it works correctly at the same company, but the rest of the company returns with an empty string.

How can I retrive all names of ledger dimensions segments for all companies?


static void TestJob(Args _args)
{
    
    //LedgerDimension ==>  5637150044  ==> from GeneralJournalAccountEntry table
    DimensionStorage dimensionStorage;
    Name                  Segmentname;
    DimensionStorageSegment  seg;

    dimensionStorage=  DimensionStorage::findById(5637150044);

    seg = dimensionStorage.getSegment(2);
    Segmentname = seg.getName();


}

static void Job1(Args _args)
{
    //LedgerDimension ==>  5637150044  ==> from GeneralJournalAccountEntry table
    DimensionStorage dimensionStorage;
    Name                  Segmentname;
    RecId                   id;


    dimensionStorage=  DimensionStorage::findById(5637150044);
    id = dimensionStorage.getSegment(2).parmDimensionAttributeValueId();
    Segmentname = DimensionAttributeValue::find(id).getName();


}

I have the same question (0)
  • Martin Dráb Profile Picture
    239,364 Most Valuable Professional on at

    Where does your code fails? Does dimensionStorage.getSegment(2) returns anything? Segments are populated inside findById(), therefore you can debug this method to see what's going on.

    Do the companies use the same account structure? If not, what result do you expect to get? There may be so such a segment at all or a segment with a completely different meaning.

  • Abanob Adel Profile Picture
    5 on at

    ethis is screenshot from debug TestJob()  from two different companies 

    the first one return the name because the LedgerDimension ==>  5637150044 exist in this company.

    the second return empty name.

    This scenario happens even if they have the same account  structure.

    I expect that I want to get the correct name even if from another company is there a possibility to change the company in the runtime during report processing or even point to  the company through any accepted variable by DimensionStorage

    3223.Untitled2.png7026.Untitled.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 632 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 624

#3
CP04-islander Profile Picture

CP04-islander 301

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans