Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

DimensionAttributeValueSetItem duplicates

Posted on by 31

There are two custom tables. One for employee's work EmpWork, another one for employee's calendar entries EmpWorkDays.

Both tables contain field DefaultDimension. EmpWork table's data were filled some years ago, probably imported.

When EmpWorkDays table is filled by a class method, it creates a new EmpWorkDays record for every day in month and every entry has a copy of DefaultDimension value from EmpWork.

After that EmpWorkDays entries can be deleted / inserted from Excel using a custom class. And then magic happens.

In my example EmpWork entry have dimension values '023' for department and '010' for cost center.

In Excel there are the same values for dimensions. But when import happens, DefaultDimension value is different then the one in EmpWork. Shouldn't they be the same?

When part of month is imported, the result is that part of records are with DefaultDimension value from EmpWork, another part with other DefaultDimension value from Excel, but all of them have dimension values '023' for department and '010' for cost center. Later records are processed grouped by DefaultDimension and undesirable effects occur.

Here is a screenshot from DimensionAttributeValueSetItem table, as you can see DimensionAttributeValue is the same for two records.

8787.pastedimage1649310913934v1.png

Why it happens so? Is it possible to fix it?

  • andri1 Profile Picture
    andri1 31 on at
    RE: DimensionAttributeValueSetItem duplicates

    Great, thank you!

    Wouldn't have guessed it.

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: DimensionAttributeValueSetItem duplicates

    I believe that it's related to the fact that the hashing algorithm has changed. Your old data has hashes (DimensionAttributeValueSet.Hash) calculated with the old algorithm, while new records use another algorithm and therefore different hashes are calculated.

    The linked article explicitly confirms that such duplicates may occur:

    This means that when the Dimension APIs calculate a hash key for an older dimension combination or set, it will create a duplicate new combination or set. This combination will have a different record ID and a new hash value that is different than the original. The two dimensions will look the same according to the display value.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans