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