Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Base Enum in AX 2009 Query

Posted on by 513

Hi All,

I've trail balance report, I want to get report based on ledger account & Posting layers like Current, Operations, Tax, Only Operations, Only tax, Total

Technically, how to pass more than two Enum parameter value to retrieve the trail balance report.

Thanks

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Base Enum in AX 2009 Query

    You can input multiple values in the query dialog. Most likely your issue is somewhere else.

    I just tested this with AX2009 with Customers report and it works.

    I have two customers, A and B. I set the "Stopped" value (on General tab page") to "Invoice" for the other customer. For the other one I left the default value "No".

    Then I printed Customers report, and selected these two customer accounts in the account number criteria.

    Then I added filter for "Stopped" field, adding two values: "No" and "Invoice". Both customers were printed.

    I changed the filter for "No" and "All". Only one of the customers was printed on the report.

    So it definetely works, and your problem is explained by something else than not being able to pass multiple enum values in the query dialog.

  • Vignesh R Profile Picture
    Vignesh R 513 on at
    RE: Base Enum in AX 2009 Query

    we can pass the values in Dialog box query.

    I've doubt here, Is it possible to pass multiple enum values in report dialog box to retrieve record?

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Base Enum in AX 2009 Query

    Could you please share your code? How do you pass multiple enum values?

  • Vignesh R Profile Picture
    Vignesh R 513 on at
    RE: Base Enum in AX 2009 Query

    Hi,

    I've added new data source(Ledger trans) into report and but ledger trans table was already used in X++ query.

    In few conditions, enum is assigned as static value. so , I've changed it. Now, it is working if we pass different enum values.

    But, if we pass multiple enum value, it is considering only first value of base enum and retrieving records.

    Kindly suggest if you have any idea.

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Base Enum in AX 2009 Query

    You can do it with the standard query dialog (the one that you can open with Select button if your batch / report has a query), no need for x++ development

    In normal dialog field it's possible to select only one enum value.

  • Vignesh R Profile Picture
    Vignesh R 513 on at
    RE: Base Enum in AX 2009 Query

    Hi Nikolaos,

    From Dialog box, I need to pass multiple base enum values to retrieve the ledger records using Trail balance.

    Kindly share if you have any example x++ code.

    Thanks

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Base Enum in AX 2009 Query

    Pass from where? From query dialog? Or x++ code?

    You can pass many enum value ranges in a query dialog by providing many values separated by comma.

    And in x++ you can add many ranges for the same field (also for enum field) and the ranges will be considered as OR.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans