Thursday, February 22, 2018

Dynamics GP - Remove Lot Tracking or Serial Tracking from a number

Adjust all stock out of the number
Manually change the Tracking option
Or run this script

--Get stock
select itemnmbr,qtyonhnd*-1,locncode,atyalloc from iv00102 where locncode = 'myloc' and QTYONHND <> 0
--Get serial numbers
select itemnmbr, SERLNMBR, locncode from iv00200 where locncode = 'F-S' and itemnmbr in (select itemnmbr from iv00102 where locncode = 'F-S' and QTYONHND <> 0)
--Change tracking option
update iv00101 set itmtrkop = 1 where Itemnmbr = 'myitem'

No comments:

Post a Comment