Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

how to fillter by dimension in Proj Invoices Table

(0) ShareShare
ReportReport
Posted on by 175

how to filter the data by pass dimantion val check the following code :

ProjInvoiceJour  projInvoiceJour;
    Amount invVal;

    select sum(invoiceamount) from projInvoiceJour
    where projInvoiceJour.InvoiceDate  >= _startDate
       && projInvoiceJour.InvoiceDate  <= _endDate;
      // need to filter by dimision

    invVal = projInvoiceJour.InvoiceAmount ;

    
    return invVal;

*This post is locked for comments

  • Wael Shazly Profile Picture
    Wael Shazly 175 on at
    RE: how to fillter by dimension in Proj Invoices Table

    Many thanks

  • Verified answer
    Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: how to fillter by dimension in Proj Invoices Table

    You should use DefaultDimensionView and related table.

    As example how to use it for CustInvoiceJour and Department dimension:



    CustInvoiceJour custInvoiceJour; DefaultDimensionView dimView; OMOperatingUnit operationUnit; while select custInvoiceJour join dimView where dimView.DefaultDimension == custInvoiceJour.DefaultDimension join operationUnit where operationUnit.RecId == dimView.EntityInstance && operationUnit.omOperatingUnitType == OMOperatingUnitType::OMDepartment && operationUnit.Name == departmentName { info(custInvoiceJour.InvoiceId); }



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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans