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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

how to add dimension column in list page

(0) ShareShare
ReportReport
Posted on by 65

Hello Guys,

I need to add financial dimensions as a separate columns for sales order open lines form in list page.

Can anyone suggest me

Thanks in advance for help

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Chaitanya,

    Have you tried using the "DefaultDimensionView"? You can link by DefaultDimension from SalesLine and filter the records by field "Name"(should have values for financial dimension name).

  • Chaitanya raj Profile Picture
    65 on at

    I don't want to be a display fields.

    How can i use DefaultDimensionView to display columns, Can u brief more please

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Chaitanya,

    Are you looking to update these fields from the list page form?

  • Chaitanya raj Profile Picture
    65 on at

    No Gunjan,

    I won't update any fields in the form.

    Open sales order lines list page will display all the open sales order lines.

    So i need to add dimension columns to grid as well.

    User want to sort the columns , so display method won't work here

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Chaitnaya,

    I don't think you can add the dimensions dynamically. Let's say you have for dimensions - Department, Cost center, Business unit and Worker. If you add another dimension "Customer', it won't appear on the form.

    Will that work for you?

  • Chaitanya raj Profile Picture
    65 on at

    Now i don't have any dimension columns on the listpage

    So any way to add those as columns in the grid of listpage

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Chaitanya,

    You can try doing this -

    1. Create an extension of the form.

    2. Add a new datasource - "DefaultDimensionView". Name is "DefaultDimensionView_Dept" ( I am doing an example for Department dimension).

    pastedimage1599566691509v1.png

    3. Create a new class and copy event handler for "OnQueryExecuting" event. -

    [FormDataSourceEventHandler(formDataSourceStr(SalesLineOpenOrder, DefaultDimensionViewDept), FormDataSourceEventType::QueryExecuting)]
        public static void DefaultDimensionViewDept_OnQueryExecuting(FormDataSource sender, FormDataSourceEventArgs e)
        {
            FormRun salesLineOpenOrder = sender.formRun();
            SalesLine   salesLine      = salesLineOpenOrder.dataSource("SalesLine").cursor();
    
            sender.query().dataSourceName(sender.name()).addRange(fieldnum(DefaultDimensionView,     DefaultDimension)).value(queryValue(salesLine.DefaultDimension));
            sender.query().dataSourceName(sender.name()).addRange(fieldnum(DefaultDimensionView,     Name)).value(queryValue("Department"));
        }

    4. Add the DisplayValue field to the design -

    pastedimage1599567013455v2.png

    5. You have to repeat this for all dimensions.

  • Chaitanya raj Profile Picture
    65 on at

    Thanks a lot for your guidance.

    I have implemented the same way what you have suggested above, but i am seeing the dimension value only for the first line in the form and not showing for other records.

    If i click on any other record then it is displaying dimension value for that record.

    if i select other record, then dimension value is displaying for currently selected record and for previous record again dimension is displaying blank value

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Chaitanya,

    Please change the following -

    1. Join type on DefaultDimensionView. Changes it to "Outer join".

    pastedimage1599574840336v1.png

    2. Instead of "OnQueryExecuted", try "OnIntialized" and set the link type and range -

    [FormDataSourceEventHandler(formDataSourceStr(SalesLineOpenOrder, DefaultDimensionViewDept), FormDataSourceEventType::Initialized)]
    public static void DefaultDimensionViewDept_OnInitialized(FormDataSource sender, FormDataSourceEventArgs e)
    {
        sender.query().dataSourceTable(tableNum(DefaultDimensionView)).addLink(fieldnum(SalesLine,     DefaultDimension), fieldnum(DefaultDimensionView,     DefaultDimension));
    
        sender.query().dataSourceTable(tableNum(DefaultDimensionView)).addRange(fieldnum(DefaultDimensionView,     Name)).value(queryValue("Department"));
    }

  • Suggested answer
    vinitgoyal2005 Profile Picture
    6,332 on at

    Hi,

    Look at d365foe.blogspot.com/.../get-individual-financial-dimension-value.html. I have views created for each financial dimension and join it to any other table where FD exists.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans