Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / creating query in AOT
Finance forum

creating query in AOT

(0) ShareShare
ReportReport
Posted on by 768

Hello,

I'm trying to create my own AOT query in AX7.

 I follow thus article:

https://docs.microsoft.com/en-us/dynamicsax-2012/developer/walkthrough-creating-an-aot-query-that-has-group-by-and-having-nodes

I'd like to add count(RecId) field to field node as they write here:

Fields

Add a field under the new CustTable data source node.

  1. Expand the new data source node.

  2. Right-click the Fields node, and then click New > COUNT.

  3. In the Properties window for the new field node, set the Fieldproperty to RecId.

ANSI SQL typically uses an asterisk for the count aggregate function. But in Microsoft Dynamics AX a field must be used, and by convention the RecIdfield is usually used.

I use standard table "CustTable" as a datasource and can't add a field:

pastedimage1565884113264v1.png

I also can't add CustTable extension to my datasources node of the query. So the question is how to add count field?

Thanks.

  • Suggested answer
    Satish Panwar Profile Picture
    Satish Panwar 14,645 on at
    RE: creating query in AOT

    Hi Azat,

    By default the setting is unselected and that should allow the field addition. Did you change the setting to "Yes" when you added the data source.

    pastedimage1565886169112v1.png

    Thanks,
    Satish Panwar
    Please take time to click 'Yes' against the answers that help you guide in right direction to help other community members

  • Verified answer
    Andrew Xu Profile Picture
    Andrew Xu 3,877 on at
    RE: creating query in AOT

    Hi Azat,

    To add field in your datasource, you need to set the property 'Dynamic Fields' of your datasource to 'No'.

    pastedimage1565885552772v1.png

    pastedimage1565885583307v2.png

  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: creating query in AOT

    Try changing the Dynamic Fields property of CustTable datasource to No.

    You can't add table extensions. Add the extended table instead; it'll include fields from your extension.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans