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

Community site session details

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

How to add Product Category to Sales Line AX 2012?

(0) ShareShare
ReportReport
Posted on by 1,813

Hii,

Version: AX 2012 R2.

I have a custom form with grid control.

Data sources are SalesTable, SalesLine, InventTable with InnerJoins.

The purpose is to show open sales lines and product related information for analysis.

On this form I want to show sales line Product Category that is in table EcoResCategory.Name .

What tables I need to add in this form data source and relations or is there better way to achieve it?

Thanks

Here is my Custom Form

6014.form.png

I have the same question (0)
  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: How to add Product Category to Sales Line AX 2012?

    Hi Rana,

    Since you are joining the data sources directly under the form. You can add EcoResProduct and set the join source to InventTable. EcoResProductCategory will be joined to EcoResProduct. EcoResCategory will be joined to EcoResProductCategory. These tables have relationships defined, so you will be able to get the Category name.

  • Rana Anees Profile Picture
    1,813 on at
    RE: How to add Product Category to Sales Line AX 2012?

    Hii Gunjan,

    "So, you want to find the Product category for the item selected in the sales order line. Correct?" Yes

    One question, on my form datasource I am directly adding tables without designing queries... tables and relations you said are possible without query...

    Thanks

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: How to add Product Category to Sales Line AX 2012?

    Hi Rana,

    So, you want to find the Product category for the item selected in the sales order line. Correct?

    In that case, you can join EcoResProductCategory to InventTable based on

    EcoResProductCategory.Product = InventTable.Product

    Then you can join EcoResCategory to EcoResProductCategory based on  EcoResCategory.RecId = EcoResProductCategory.Category

  • Rana Anees Profile Picture
    1,813 on at
    RE: How to add Product Category to Sales Line AX 2012?

    Hii Gunjan,

    In our database SalesCategory field in SalesLine table is all set to 0. Maybe not using this option.

    Can you please guide how to get it from Product.

    Thanks

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: How to add Product Category to Sales Line AX 2012?

    Hi Rana Anees,

    If you want to display the category name only, you can use the field "SalesCategory" as a reference group as in SalesTable form. 

    pastedimage1603894130824v1.png

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 895

#2
Sohaib Cheema Profile Picture

Sohaib Cheema 811 User Group Leader

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans