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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to Create Product and Product Category in 1 Lines???

(0) ShareShare
ReportReport
Posted on by 25

Hallo my name is Razqa,

I am newbie in Microsoft Dynamic AX R3 2012.

I have a problem, i want watching product and product categories in 1 lines. In setting AX i have 2 category hierachy and 1 category hieracrhy have 1 categories.

This is my coding...

static void rlpTest(Args _args)
{
InventTable inventTable;
EcoResProduct product;
EcoResProductCategory productCategory;
EcoResCategory category, categoryPenjualan, categoryPembelian;
EcoResCategoryHierarchy hierarchy, hierarchyPembelian, hierarchyPenjualan;

while select inventTable where inventTable.ItemId =="910130001426"
join product where inventTable.Product == product.RecId
join productCategory where productCategory.Product == product.RecId
join category where productCategory.Category == category.RecId
join hierarchy where productCategory.CategoryHierarchy == hierarchy.RecId

{

info (strFmt("%1 %2 %3", inventTable.ItemId, hierarchypembelian.Name, category.Name));
}

}

And this my report still in 2 line. I want to create in 1 line.

Anyway do you have solution..

8322.1.png




























*This post is locked for comments

I have the same question (0)
  • Rustem Galiamov Profile Picture
    8,072 on at

    Hi!

    This is because of join's (join = inner join). You should use variable to collect information you need inside "while select InventTable" scope.

    Like this:

    InventTable inventTable;

    EcoResProduct product;

    EcoResProductCategory productCategory;

    EcoResCategory category, categoryPenjualan, categoryPembelian;

    EcoResCategoryHierarchy hierarchy, hierarchyPembelian, hierarchyPenjualan;

    str infoStr;

    while select inventTable where inventTable.ItemId =="910130001426"

    {

       while select product where inventTable.Product == product.RecId

       join productCategory where productCategory.Product == product.RecId

       join category where productCategory.Category == category.RecId

       join hierarchy where productCategory.CategoryHierarchy == hierarchy.RecId

       {

          infoStr += strFmt("%1 %2", hierarchypembelian.Name, category.Name);

       }

       info (strFmt("%1 %2", inventTable.ItemId, infoStr));

       infoStr = "";

    }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans