A while back I posted some code showing how to create Items from Files. This time I’ll post code code showing how to update those Items when you want to consume File changes.
The code is almost identical. The creating Items from Files and updating Items from Files are actually the same operation under the hood. The only difference is how the process gets kicked off. When creating Items, you start with a set of Files. When updating Items, you start with a set of Items.
Here is the code for the update operation. This time around UpdatePromoteComponents kicks off the process. Again, this is a very simplified example. More complex BOMs may involve more code.
ItemService itemSvc = m_conn.WebServiceManager.ItemService;
GetPromoteOrderResults promoteOrder =
ItemsAndFiles itemsAndFiles =
// edit the items as needed
Dim itemSvc AsItemService = m_conn.WebServiceManager.ItemService
Dim timestamp AsDateTime
Dim promoteOrder As GetPromoteOrderResults = _
Dim itemsAndFiles AsItemsAndFiles = _
' edit the items as needed