Options

Newbie: Shipment-Report

KromozoneKromozone Member Posts: 47
Hi Navision-Specialists,

I've written a Interface to a Parcel-System. I want to run it when the System created a Shipment-Report to transfer the data to the Shipping-System.

I've searched a good place at Codeunit 80, but for me (one month in navision) it's a bit confusing :wink: :roll:

How must I write down my code to run it every time the System creates an Shipment-Report?

Thank you!

Regards
Andy

Comments

  • Options
    PatPat Member Posts: 7
    Search in Codeunit 80 for // Insert shipment header

    Another possibility is the OnInsert-Trigger of the table Sales Shipment Header.
  • Options
    KromozoneKromozone Member Posts: 47
    Thank you, I will try it!

    Andy
  • Options
    KromozoneKromozone Member Posts: 47
    At this Position (// Insert shipment header), the Header is available, but the Lines have not been written into the database. I need the Information from "Sales Shipment Line" :cry:
  • Options
    PatPat Member Posts: 7
    Search for // Insert shipment line in C80.

    If you want to put your code in the OnInsert-Trigger of the table Sales Shipment Line, you have also to change in C80 in the trigger OnRun the part SalesShptLine.INSERT into SalesShptLine.INSERT(TRUE).
  • Options
    KromozoneKromozone Member Posts: 47
    :oops: Arrgh... ich tried some Positions in C80 "// Insert shipment line in C80", but i could not find one that runs only one time for each Shipment-Report. I only want to run my Functions one time after the Report is finished :(

    Thank you in advance
    Andy
  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Here is another approach: keep track of the Shipment No's that are created in CU80 by storing them in a table. After the posting routine has finished, you can loop through that table to find the created shipment info, and update your Parcel System. This way, the only modification needed in CU80 is the code to store the Shipment No's.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
Sign In or Register to comment.