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();
}