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

Notifications

Announcements

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 353

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

I have the same question (0)

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

Season of Giving Solutions is Here!

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
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Nakul Profile Picture

Nakul 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans