How to Insert a New LotSerial Row in On Save Sales Order Extension
Hello,
I’m working on a Sales Order On Save OM extension where I need to manage LotSerial information for order lines. My current goals are:
- Update existing LotSerial rows (e.g., set LotNumber, Locator, etc.).
- Insert a
new LotSerial rowif none exists.
Here’s a simplified version of my code for updating:
def lines = header.getAttribute("Lines")
while (lines.hasNext()) {
def line = lines.next()
def lotSerials = line.getAttribute("LotSerial")
while (lotSerials.hasNext()) {
def lot = lotSerials.next()
lot.setAttribute("LotNumber", "L1")
lot.setAttribute("LocatorIdentifier", new BigDecimal("300000310791418"))
}
}
This works fine for updating existing LotSerial rows.
However, when I try to
Tagged:
0