web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Unable to Populate Business Unit Financial Dimension Using Custom Field

(1) ShareShare
ReportReport
Posted on by 72

Hi Team,

I am trying to update the Business Unit financial dimension on a journal line based on the InvoiceId.

I retrieve the invoice record from CustInvoiceJour and use its DefaultDimension:

ledgerJournalTrans.DefaultDimension = custInvoiceJour.DefaultDimension;
I have a custom field called CatalogId and I want its value to replace the existing Business Unit dimension value.

To find the dimension value, I am using:

DimensionAttributeValue dimAttrValue;
DimensionAttribute      dimAttribute;

select firstOnly dimAttrValue
    where dimAttrValue.DisplayValue == paymentTable.CatalogId;

if (dimAttrValue.RecId)
{
    dimAttribute = DimensionAttribute::find(dimAttrValue.DimensionAttribute);

    info(strFmt("CatalogId=%1, Dimension=%2",
        paymentTable.CatalogId,
        dimAttribute.Name));
}

I checked in SSMS using the following query:

SELECT DAV.DISPLAYVALUE,
       DA.NAME
FROM DIMENSIONATTRIBUTEVALUE DAV
JOIN DIMENSIONATTRIBUTE DA
    ON DAV.DIMENSIONATTRIBUTE = DA.RECID
WHERE DAV.DISPLAYVALUE = 'PVC'

Result:

PVC  BusinessUnit
PVC  Brand

The same value exists in multiple dimensions. Because of this, the lookup is not consistently identifying the Business Unit dimension, and the Business Unit value is not getting updated.

What is the recommended approach to update only the Business Unit dimension in the invoice's DefaultDimension based on CatalogId without hardcoding the dimension name?

Thanks.

Categories:
I have the same question (0)
  • Suggested answer
    Subra Profile Picture
    1,131 on at
    Hi 

    Please check the below forum to update the financial dimension.

    https://community.dynamics.com/forums/thread/details/?threadid=8220e109-f14f-f011-877a-000d3a4e8211

    Kindly let me know if you need any additionl information.
     
    Thanks,
    Subra

    If this helped, please mark it as "Verified" for others facing the same issue

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Subra Profile Picture

Subra 118

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 85 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans