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

AX 2012 R3 financial dimension merge

(1) ShareShare
ReportReport
Posted on by
Hi Experts,
 
In 2012, How this method DimensionCache::getValue() works?

I want to to debug it but found no way, it only returns the RecId for combination in DIMENSIONATTRIBUTEVALUECOMBINATION table. Issue is when Purchase order product receipt is posted, item physical cost is zero on inventory transactions due to the wrong dimension returning from this method which has no value in LedgerDimension on AccountingDistribution Table. _value1 and _value2 are passing.  _value1 is default dimension of purchase order line and its always like 5637147577. _value2 is default dimension value of item from InventTable.
 
client server public static DimensionDefault serviceMergeDefaultDimensions(
    DimensionDefault _value1,
    DimensionDefault _value2,
    DimensionDefault _value3 = 0,
    DimensionDefault _value4 = 0)
{
    container cachedResult;
    DimensionDefault mergedDimDefault;

    // Short circuit if all values other than the first one are zero
    if (_value2 == 0 && _value3 == 0 && _value4 == 0)
    {
        mergedDimDefault = _value1;
    }
    else
    {
        cachedResult = DimensionCache::getValue(
            DimensionCacheScope::DefaultingMergeDefaultDimensions,
            [_value1, _value2, _value3, _value4]);

        if (cachedResult == connull())
        {
            cachedResult = [DimensionDefaultingService::serverMergeDefaultDimensions(_value1, _value2, _value3, _value4)];

            DimensionCache::insertValue(
                DimensionCacheScope::DefaultingMergeDefaultDimensions,
                [_value1, _value2, _value3, _value4],
                cachedResult);
        }

        mergedDimDefault = conpeek(cachedResult, 1);
    }

    return mergedDimDefault;
}

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 528 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 424 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 374

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans