When a sales order line is added, the .SupplierInfo is not read in.

Description

When a sales order line is added, the .SupplierInfo is not read in. Only after saving and re-reading the sales order do the lines get their .SupplierInfo details populated.

Environment

None

Activity

Scott Pearce 10 March 2025 at 23:11

Look in SalesOrderLineCollection.AddInventoryItem():

If salesOrderLine.SupplierInfo.RecID IsNot Nothing Then salesOrderLine.SupplierInfo.ReadRecord() End If

I don’t think it should be “IsNot Nothing”, but instead “Is Nothing” - i.e. if there is no supplier details read in yet, then read them in (the default supplier). Also, there is a system setting which should be checked before reading. See other instances of the call to SupplierInfo.ReadRecord().

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created 10 March 2025 at 23:11
Updated 2 days ago