Skip to Content
Former Member
Aug 08, 2006 at 09:02 AM

Copying an Item Master Record


Hello !

I'm trying to write a routine that will duplicate a record in the item master (OITM) table. The new item will have a different ItemCode, and some other different details, but needs to have the rest of it's information copied from the original (ie. price etc.) - is there a standard method I can use to copy it ? I've thought about using a SQL statement, but I know that manipulating the tables in this way isn't recommended (and i'm not convinced It'll let me). The only other way I can think of doing it is by setting an DI Item object, creating a record using the standard method, and setting each field individually from an array I've populated by querying the original record... something like this :

oitem.ItemCode = "CT-G400-005"
oitem.ItemName = arrayWithOriginalDetails(1)
oitem.ItemType = arrayWithOriginalDetails(2)
oitem.BarCode = arrayWithOriginalDetails(3)



- but there're a lot of fields to individually specify- I'm hoping there might be an easier way...

(does this make sense?)