Add OE Line - View Script

This view script is intended to trigger when a new line is added to an order. When triggered, it tries to write a new line to the order with an item defined in the parameters.

This script will always fail, causing an error to be raised from the view. It demonstrates a case in which the new script approach is not suitable, use a Screen script (poplar_oeaddlne.OE1100_oe_add_line).

Insert O/E Line

Insert a new OE line following the insert of a line with a particular item.

This script does not work (by design) - why not?

Part of an introductory training to Extender. Learn more at https://poplar_addoelne.rtfd.io.

Parameters:
param Parameter1:
 Item number to trigger insert after.
param Parameter2:
 Item number to insert
param Parameter3:
 Item

author: Chris Binckly email: cbinckly@gmail.com copyright 2019 2665093 Ontario Inc.

This file is provided under a Creative Commons 4 Sharealike license. See https://creativecommons.org/licenses/by-sa/4.0/ for details.

poplar_oeaddlne.OE0500_oe_add_line.onAfterInsert(result)[source]

After a line with item Parameter1 is entered, insert line with item Parameter2.

Triggered after an insert of an OE Detail line. If the insert was successful and the item in the line is the same as that provided in Parameter1, a new line is added with:

  • LINETYPE: 1 - standard item line
  • ITEM: Parameter2
  • QTYORDERED: Parameter3
poplar_oeaddlne.OE0500_oe_add_line.onOpen()[source]

onOpen of the script, take no action.