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

Unable to return DimensionAttributeValue record as no record exists in DimensionFinancialTag

(0) ShareShare
ReportReport
Posted on by 5

Hello All - I'm creating a sales order for a specific retail store using X and getting below mentioned error, please help me to fix this.

Unable to return DimensionAttributeValue record for Dimension CC with value <blank> as no record exists in table DimensionFinancialTag through view DimensionFinancialTag
Note: I got this error only on UAT environment, On Development environment its working perfectly. All the configurations of financial dimensions are same on both environments. 
The code i used to get the financial dimensions is below

 

retailChannelTbl.clear();
select DefaultDimension from retailChannelTbl
    where retailChannelTbl.INVENTLOCATION == inventLocation.InventLocationId;

dimAttrCCValue = CfzSalesOrderDataProvider::getDimensionDisplayValue(retailChannelTbl.DefaultDimension, 'CC');
dimAttr = DimensionAttribute::findByName('CC');
dimAttrValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttr, dimAttrCCValue, false, true);
if (dimAttrValue)
{
    dimavss.addItem(dimAttrValue);
}
/***********************************************************************/
dimAttrCCValue = CfzSalesOrderDataProvider::getDimensionDisplayValue(retailChannelTbl.DefaultDimension, 'BC');
dimAttr = DimensionAttribute::findByName('BC');
dimAttrValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttr, dimAttrCCValue, false, true);
if (dimAttrValue)
{
    dimavss.addItem(dimAttrValue);
}
/***********************************************************************/
dimAttrCCValue = CfzSalesOrderDataProvider::getDimensionDisplayValue(inventTable.DefaultDimension, 'CAT');
dimAttr = DimensionAttribute::findByName('CAT');
dimAttrValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttr, dimAttrCCValue, false, true);
if (dimAttrValue)
{
    dimavss.addItem(dimAttrValue);
}
/***********************************************************************/
dimAttrCCValue = CfzSalesOrderDataProvider::getDimensionDisplayValue(retailChannelTbl.DefaultDimension, 'RC');
dimAttr = DimensionAttribute::findByName('RC');
dimAttrValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttr, dimAttrCCValue, false, true);
if (dimAttrValue)
{
    dimavss.addItem(dimAttrValue);
}
salesLine.DefaultDimension = dimavss.save();

and the body of the function getDimensionDisplayValue is below 

public static str getDimensionDisplayValue(RecId defaultDimension, Name dimName)
{
    DimensionAttributeValueSetStorage dimStorage;
    dimStorage = DimensionAttributeValueSetStorage::find(defaultDimension);
    return dimStorage.getDisplayValueByDimensionAttribute(DimensionAttribute::findByName(dimName).RecId);
}

I have the same question (0)
  • Martin Dráb Profile Picture
    238,782 Most Valuable Professional on at

    Which version is it about? It seems to be either AX 2012 or F&O.

    Which line of code does throw the error? What value are you looking for? Isn't the message right when saying that no such a record exists in DimensionFinancialTag table?

    By the way, is it really needed to indent code in your first snippet by 36 spaces?

  • Ch Abdul Ahad Profile Picture
    5 on at

    Hello Martin, Thanks for reply. The F&O version for UAT(Sandbox) environment is 10.0.30  and for DEV environment 10.0.27

    The line number 5 in first code snippet throw the error. which is below:

    dimAttrCCValue = CfzSalesOrderDataProvider::getDimensionDisplayValue(retailChannelTbl.DefaultDimension, 'CC');

    and yes that is the message I got in UAT(Sandbox) environment. But the thing if something is wrong than why this message didn't occurs on DEV environment.

    Code indent is mistakenly done, apologize.

  • Martin Dráb Profile Picture
    238,782 Most Valuable Professional on at

    The problem is related to data in database, therefore the answer to "why this message didn't occurs on DEV environment" looks simple: because you have different data there.

    You didn't answer my question about the value. What value do you you pass to getDimensionDisplayValue() (= which value do you have retailChannelTbl.DefaultDimension)? Do you have such a value in DimensionFinancialTag table?

    I moved the thread from Dynamics AX Forum to Dynamics 365 Finance Forum. I also fixed the indentation for you - please pay more attention to it next time.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 514 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 390

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans