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.
Why it happens so? Is it possible to fix it?
Great, thank you!
Wouldn't have guessed it.
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156