Onchange ""Quantity Shipped" or "Quantity Invoiced"

tompynationtompynation Member Posts: 398
I need to insert a record in a table every time the "Quantity Shipped" or "Quantity Invoiced" field of a sales lines changes...

How can this be done?

Comments

  • SavatageSavatage Member Posts: 7,142
    How about OnModify for those fields on the sales line table.

    OnModify()
    if Mytable.Get(keys) -> probably could use findlast and add to the end too.
    THEN BEGIN
    write your code for what you want to transfer or send......
    (ex) Mytable."Date Changed" := WORKDATE;
          Mytable."Document No" := "Document No.";
          MyTable."ShipQty Change" := "Quantity Shipped"; 
          Mytable.insert;
    END;
    
  • tompynationtompynation Member Posts: 398
    The OnModify does not get executed when a Sales Line get posted through the sales order
  • SavatageSavatage Member Posts: 7,142
    I need to insert a record in a table every time the "Quantity Shipped" or "Quantity Invoiced" field of a sales lines changes...
    How can this be done?

    Have you tried using "Quantity Shipped" - OnValidate() &
    "Quantity Invoiced" - OnValidate() on sales line table

    or are you looking to transfer something while posting?
  • tompynationtompynation Member Posts: 398
    The Onvalidate doesnt get executed in CodeUnit 80... But forget this

    I made a small code unit which continiously checks of there are new Sales Shipment Lines created
Sign In or Register to comment.