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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Adding The Item Name to the order lines Report

(0) ShareShare
ReportReport
Posted on by 120

Dear Sir 

I Would Like to add Item Name to the order lines  Report ( report name  is SalesLinesExtended)   that is present in AX 2012 in the model  Sales and marketing   under Reports  - > Transactions -> Sales orders -> order Lines

I have add  ItemName to the table SalesLinesExtendedTmp I Move ItemName from Extended Data Type to the SalesLinesExtendedTmp .

I have added the following statement  in the Class

salesLinesExtededDP -> ClassDeclaration

 

EcoResProduct   _ecoResProduct;

EcoResProductTranslation _ecoResProductTranslation;

InventSum                       _inventSum;

 

And I have insert those lines in  to the Class InserIntoTmpTable

 

select * from inventTable

         where inventTable.ItemId == _inventSum.ItemId;

 

    select * from _ecoResProduct

     where _ecoResProduct.RecId == inventTable.product;

 

       select * from _ecoResProductTranslation

      where _ecoResProductTranslation.Product == _ecoResProduct.RecId;

 

 

    salesLinesExtendedTmp.ItemName        = _ecoResProductTranslation.Name;

 

but when I run the report I am not getting the Name of the Item I am getting blank

any help will be appreciated 

Waiting for your valuable replay 

Best Regards

Jamil 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Ajit Profile Picture
    8,755 on at

    Issue here is, _inventSum.ItemId must be blank as you are not selecting that table.

    You should use just below line of code -

    salesLinesExtendedTmp.ItemName        =  inventTable::find(salesLine.ItemId).itemName();

  • On-Hand Inventory I want to Add to the Report ItemName  Profile Picture
    120 on at

    Hi Ajit

    Thank you very much  for your help  but  I can not Understand this inventTable::find(salesLine.ItemId).itemName(); can you please explain   this line because  I am new to AX 2012 and is the itemName() is Function , and where can I fined the content  of this function  itemName()

    Thank you very much for your help

    waiting for your valuable answer

    Best regards

    Jamiil

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Jamil Alshaibani, Directly you can pass item name value to your temporary field.

    like: salesLinesExtendedTmp.ItemName = salesline.name;

    this will get item id from sales line and this field you can use on report.

    Hope it will work for you because in many cases it is working.

  • Community Member Profile Picture
    on at

    Hi Jamil,

    According to the line of code it is explaining that you are retrieving item name from inventtable where it will take the reference from salesline.itemid. If it will find salesline.itemid then it will pass the reference to itemname method of inventtable.

  • Suggested answer
    Ajit Profile Picture
    8,755 on at

    Hi Jamil,

    ItemName() is a method and you can find in table 'InventTable' (AOT -> Data Dictionary -> Tables -> InventTable).

    Let me know if you don't find that.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans