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 :
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
    237,920 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 464 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans