Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Add a new field on Open Sales Order Lines Form > Add a new column (PO Ordered) from On hand Inventory Inquiry onto Open Sales Order Lines.

(0) ShareShare
ReportReport
Posted on by 347

Hi -

   I'm trying to modify the Open Sales Order Lines Inquiry. I have to add a new field which is PO Ordered on Open Sales Order Lines.

I have to make a link between On Hand Inventory Inquiry and Open Sales Order Lines in order to get this new field (PO Ordered) populated on Open Sales Order Lines.

I need to display all the PO ordered for a particular item with respect to the Warehouse. Take a look at the screen shot below.

8228.ON-HAND.JPG

I need to pick the PO ordered value from this On hand Inquiry and display it on my Open Sales Order Lines.

OPen-SALES.JPG

As you can see I have the Ordered PO field populated in Open sales Lines but my data is not matching with the On Hand Inquiry.

I'm using Item 48010151 for example. If you look in the first screen shot item 48010151 has the following results

Ware House               PO Quantity

whse 01                     20

whse 04                     12

whse 05                     36

And now in my Open Sales Order Form the results are as follows

Warehouse           Po Quantity

whse 01                20

whse 04                20 

whse 05                20 

The problem is that my query is only getting the first PO quantity for an item per warehouse. and it uses the same value for every other warehouse. I need to write the query which will get the exact value of PO ordered from On hand inquiry over to my Open sales Lines Inquiry. Please take a look at my code below

display InventQtyOrdered MTR_DisplayOrderedPoQty()
{
   InventSum inventSum;
   SalesLine salesline;
   InventDim inventDim;
   SalesTable salesTable;
   InventLocationId id ;

    select * from inventSum
        where inventSum.Ordered != 0
           && inventSum.ItemId == this.ItemId
    join * from inventDim
        where inventDim.inventDimId == inventSum.InventDimId;

     return inventSum.Ordered;
}


Can anyone please suggest me how I can fix my code to get the values of PO ordered according to the warehouse in Open sales Lines Inquiry?

 

Thank You

*This post is locked for comments

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans