I'm trying to find the last unit cost for a warehouse in Sales Order entry. Sage defaults to the last unit cost for all warehouses. I'm getting a not found from this code. I don't know the GROUPSORT.
If oSession.CompanyCode = "TST" Then retval = oSession…