Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

Product Search Report

(2) ShareShare
ReportReport
Posted on by 161

I am building a product search report in the X++ environment, pulling data from several tables including EcoResProductTranslation, TaxRateType, EcoResProduct, InventModelGroupItem, InventTableModule, and InventTable (with the possibility of additional tables). The report requires filters based also.

i want to get the joining so that i can fetch report including these fields Posting GL field i have to retireve it from inventitemgroup when the itemgroup is xyz or abc i want to fetch the details from purchase order grid where account type will be "    Purchase expenditure " when  itemgroup is xyz if it is abc then accounttye will be  "Cost of purchase" i want to fetch their associated mainaccount.and for tax rate i want to fetch it from taxsolutionscope form through a hsncode i want igst-> rate value for my tax rate percentage. 
Fields that i want to retireive
  • Product Code
  • Product Name
  • Item Group
  • Posting GL inventitemgroup
  • Posting GL Name    
  • HSN/SAC Code    
  • Tax Rate
Apologies for not being very brief. If you have any question feel free to ask .

Environment : D365 F&O
  • Ayushaman Profile Picture
    Ayushaman 161 on at
    Product Search Report
    Perfect !
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,370 Most Valuable Professional on at
    Product Search Report
    An important thing to learn is that there are relations defined on tables. If you want to know, for example, how InventTable is related to EcoResProduct, open InventTable in the designer, expand Relations and find the right one:
     
     
    You'll find the relation to TaxRateType at the same place.
     
    Then you can use this information when writing select statements in X++. But often, you don't even need the details, you just need to know that the relation exists and then tell the system to use it. You can do in X++ when defining a query with Query* classes (QueryBuildDataSource has relations() method for this purpose), when defining a query in AOT etc.
     
    Similarly, you'll find a relation to EcoResProduct on EcoResProductTranslation table. You may want to apply filter to LanguageId field (depending on your actual requirements).
  • Ayushaman Profile Picture
    Ayushaman 161 on at
    Product Search Report
    Hi Martin !
    Yes ! the thing i want to know is joining of these table to retrieve all the fields that i mentioned on the description for my product search report of released product.their might be some table i am missing as i find it out from front end.
    the only joining i know is 
    FROM 
        InventTable WITH (UPDLOCK)
    JOIN 
        InventTableModule AS InventTableModule_Purch  
        ON InventTable.ItemId = InventTableModule_Purch.ItemId 
    JOIN 
        InventItemLocation    ON InventTable.ItemId = InventItemLocation.ItemId 
    LEFT JOIN 
        InventItemGroupItem   ON InventTable.ItemId = InventItemGroupItem.ItemId
    i want to know the joining so i can retrieve the data for my report. 
  • Martin Dráb Profile Picture
    Martin Dráb 230,370 Most Valuable Professional on at
    Product Search Report
    Do you have a question to ask? It's not clear what you want from us.
     
    (Moved from Dynamics AX forum.)

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

News and Announcements

Announcing Category Subscriptions!

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans