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 NAV (Archived)

How to get Item Availability by Location (492) page record through code?

(0) ShareShare
ReportReport
Posted on by 200

I have designed a sales order report in NAV. In that report I need items by location records for the particular item. I can create record for the tables. But here it comes the page. so how to retrieve records from the page through code? The table is Item(27).

Thanks in Advance!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    Your question is not so clear.

    You can retrieve Item by Location by searching the Item Ledger Entry table (32) and filtering for the Item No. Then, you can retrieve all the location where an item is present by looping through these record and perform a "distinct" of the Location Code.

  • Suggested answer
    npanchal Profile Picture
    on at

    You can filter the data in Location Filter (Flow Filter) of Item

  • anandb313@gmail.com Profile Picture
    200 on at

    Hi Stefano,

                      Thanks for the idea

    I tried the method you said

    ToQuantityOrg := 0;

    ItemLedEnt.RESET;

    ItemLedEnt.SETRANGE("Item No.","Sales Line"."No.");

    ItemLedEnt.SETRANGE("Location Code","Location Code");

    IF ItemLedEnt.FINDSET THEN REPEAT

    ToQuantityOrg += ItemLedEnt.Quantity;

    UNTIL ItemLedEnt.NEXT = 0;

    ToQuantity := ToQuantityOrg;    

    It picks the total of Gross Requirement, scheduled receipt, Planned receipt and Projected available balance.

    But I need only 'Projected available balance' in the Item Availability by location of the Item.

  • anandb313@gmail.com Profile Picture
    200 on at

    Nileshkumar can you please convey me in detail?

  • Suggested answer
    npanchal Profile Picture
    on at

    Item.Reset;

    Item.setfilter("Location Filter", "LocationCode");

    Item.setrange("No.",Sales Line."No.");

    if Item.FINDFIRST then

     Quantity := Item.Inventory;

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    The code suggested by Nileshkumar is what I have suggested. Only a note:

    Item.Reset;

    Item.setfilter("Location Filter", "LocationCode");

    Item.setrange("No.",Sales Line."No.");

    if Item.FINDFIRST then

    begin

     Itam.CALCFIELDS(Inventory);

     Quantity := Item.Inventory;

    end;

    If Inventory is not ok for you, you need to filter accrodingly to your needs but the source table is table 32.

  • anandb313@gmail.com Profile Picture
    200 on at

    hi

    Your code produces the same result what i got. To clearly say in 'Item Availability by Location' (Page:492) there is a column 'Project available balance'. I need this exact column record for the corresponding Item.

    Navigation:: sales order --->Lines Tab(after selecting a Item)-->lines--Item Availabilty-->Location

    Thanks

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 NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans