Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Item Tracking Lines

Posted on by 80

Hello,

I'm currently editing the purchase lines from a purchase order. This already works with the web service, but adding item tracking is proving to be tricky. I want to be able to add a Lot No to one purchase line like in the 'Edit - Item Tracking Lines' page.

I've made a web service of the page and created the ItemTrackingLines object with web services. A new object is created with the following values:

stdClass Object ( [Key] => 300;UAEAAACHAQAAAAAAA.....
[LotSnAvailable_Rec_x002C_0] => 1
[LotSnAvailable_Rec_x002C_1] => 1 
[Expiration_Date] => 0001-01-01 
[New_Expiration_Date] => 0001-01-01 
[Warranty_Date] => 0001-01-01 
[Quantity_Base] => 0 
[Qty_to_Handle_Base] => 0 
[Qty_to_Invoice_Base] => 0 
[Quantity_Handled_Base] => 0 
[Quantity_Invoiced_Base] => 0 
[Appl_from_Item_Entry] => 0 ) ) 

After editing and adding other fields like:

  • Lot_No,
  • Item_No, 
  • Location_Code,
  • Quantity_Base,
  • Qty_to_Handle_Base,
  • Qty_to_Invoice_Base,
  • Quantity_Handled_Base
  • Quantity_Invoiced_Base

I update the object and get the following error:

[SoapFault exception: [a:Microsoft.Dynamics.Nav.Types.Exceptions.NavCSideDataException] Tracking Specification Entry No. '1' does not exist. in ...

This is because the "Appl_from_Item_Entry" field is invalid. Which web service can I use to get the right Item entry number?

The Appl_from_Item_Entry field links to:

  • Item Ledger Entry.Entry No_
  • Item Entry Relation.Item Entry No_

But because that Item isn't received, it doesn't exist in these tables.
I'm looking for a solution to find the correct Appl_from_Item_Entry via web services and not code Units.

Many Thanks

*This post is locked for comments

  • Aleia Stickley Profile Picture
    Aleia Stickley 60 on at
    RE: Item Tracking Lines

    Tracking Specification Entry No. '1' does not exist

  • Joris Jacobs Profile Picture
    Joris Jacobs 80 on at
    RE: Item Tracking Lines

    What if the web service of the Reservation Entry table hasn't got a create function to add my item, only a read and update.

    Joris

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Item Tracking Lines

    The Item Tracking Lines page is based on a temporary table called Tracking Specification. My suggestion is to create a new page based on the Reservation Entry table, then publish this new page as a web service.

  • Joris Jacobs Profile Picture
    Joris Jacobs 80 on at
    RE: Item Tracking Lines

    Thanks for answering Olof,

    You suggest creating a new page based on the reservation entry table and inserting the records. Isn't this what I did in the code above?

    I've created a web service based on the page "Item Tracking Lines (id 6510)" and called the create function and added the Lot_No. When calling the update function I get the following soap error: SoapFault exception: [a:Microsoft.Dynamics.Nav.Types.Exceptions.NavCSideDataException] Tracking Specification Entry No. '1' does not exist

    Any ideas?

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Item Tracking Lines

    The information entered in the item tracking lines page is stored in the reservation entry table when the page is closed.

    To insert this through a web service I would suggest creating a new page based on the reservation entry table and insert the records with the lot numbers that way.

    If you manually enter a lot number against a purchase order line and then run the reservation entry table you will see how the record should be inserted.

  • Suggested answer
    Jens Glathe Profile Picture
    Jens Glathe 6,092 on at
    RE: Item Tracking Lines

    Hi Joris,

    I'm not sure if this can work... the Item Tracking page has a temporary table as sourcetable, which is generated from several sources when the page is opened. Please have a look at the white paper from Microsoft on how it is intended to work. Accessing it with a page webservice could prove pretty tricky, as you're writing all lines in one service call. @Everybody: Any ideas? Except from adding a codeunit for single-line manipulation?

    with best regards

    Jens

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans