We have an issue reported where a user had accidentally changed the name of a dimension by:
- Clicking: General Ledger > Setup > Financial Dimensions > Financial Dimensions > (selected their legal entity's project dimension) > Financial dimension values
- Then amending the Dimension value of the first entry from 000000 to 000000X.
This issue was corrected by simply following the above steps and reverting back to the original value; but this did not undo all of the changes. We now have issues where
- After entering a journal line with dimension 000000, on saving the line the dimension is displayed as 000000X.
- Data arriving from other systems via the AIF web services fails validation when the 000000 dimension is specified.
Looking at the database I could see that the DimensionFinancialTag's Value had been reverted to the original value, but the related DimensionAttributeValueSetItem's DisplayValue had not. I tried amending the values again; first making the value incorrect, then again correcting it. This seemed to resolve the issue in those tables; though did not resolve the above problems.
I also spotted that the code in the GeneralJournalAccountEntry's LedgerAccount was still incorrect (and in fact had become further corrupted; seemingly padding characters from my invalid values onto the end of this dimension's value so that it contained a dimension value which had never been used; made up of characters from this value's previous incarnations).
The below SQL has been used to help investigate the issues in our database.
set transaction isolation level read uncommitted
go
select dft.Value, davsi.DISPLAYVALUE
from DIMENSIONFINANCIALTAG dft
inner join DIMENSIONATTRIBUTEDIRCATEGORY dadc
on dadc.PARTITION = dft.PARTITION
and dadc.RECID = dft.FINANCIALTAGCATEGORY
inner join DimensionAttributeValue dav
on dav.PARTITION = dadc.PARTITION
and dav.DIMENSIONATTRIBUTE = dadc.DIMENSIONATTRIBUTE
and dav.ENTITYINSTANCE = dft.RECID
inner join DimensionAttributeValueSetItem davsi
on dav.PARTITION = dadc.PARTITION
and davsi.DIMENSIONATTRIBUTEVALUE = dav.RECID
where dft.Value != davsi.DISPLAYVALUE
order by dft.Value, davsi.DISPLAYVALUE
select top 100 LedgerAccount
from GeneralJournalAccountEntry
where LedgerAccount like '%-%-%-%-%000000%-%-%-%' --hyphens are used to ensure we target the correct dimension
We've also tried flushing the caches and also restarting the AOS servers; but with no luck.
So far we haven't performed an SQL update to correct this data through the back end; though if we can't find a solution soon we'll likely opt for that workaround.
NB: this may be the same as the bug registered in LCS's Issue Search; sadly there's not enough information there yet to tell, and that issue relates to R3 whilst we're on R2: https://fix.lcs.dynamics.com/Issue/NotFixed/?bugId=3725505
Has anyone seen this before / have any advice on how best to resolve?
Thank-you in advance,
JB
NB: The issue occurred in production which is running AX2012 R2 CU7.
However I was able to reproduce in our test environment which is on CU9 Kernel + CU7 application.