I discovered that if a date field (e.g. PromiseDate or ExpirationDate) is changed on a new SO or PO line with a Pre-Write event that also sets any other value in that line, the screen format of the changed date for that line also automatically changes from m/d/yyyy to YYYYMMDD after the line is finished and until the order is saved and reopened.
The underlying data is unaffected.
Sample Pre-Write script:
retVal = oBusObj.SetValue("COMMENTTEXT$", "This is a test")
Demonstration:
Steps to recreated:
- Open a new or existing sales order
- Drag a date field onto the main grid (e.g.PromiseDate or ExpirationDate)
- start a new line
- before leaving the line change a date field
- move off the line with a tab key, enter key or mouse click
Environments affected:
Sage 100 2016 - 2020
Standard,Advanced and Premium