Skip to main content
Answer

Mass enable subitems?

  • October 1, 2021
  • 1 reply
  • 178 views

Forum|alt.badge.img+5

Subitems appear to be inactive by default. Is there a way to mass enable inventory subitems all at once?

 

I get this error when trying to use the inactive subitems in a Sales Order:

“the default value of the subitem segment is inactive”

Best answer by rosenjon

I’ll answer my own question. I did an insert from InventoryItem into INSubItemSegmentValue, where I hardcoded the CompanyID, SegmentID and Value fields to be the same as an already active Subitem (I only wanted subitem value 0 to be active for all items). I also excluded any subitems that were already active.

 

This is the Sql query I used...

  Insert INTO INSubItemSegmentValue(CompanyID, InventoryId, SegmentId, Value)
  select 2,InventoryId,1,0 from InventoryItem where InventoryID NOT IN (select InventoryId from INSubItemSegmentValue)

1 reply

Forum|alt.badge.img+5
  • Author
  • Semi-Pro III
  • Answer
  • October 1, 2021

I’ll answer my own question. I did an insert from InventoryItem into INSubItemSegmentValue, where I hardcoded the CompanyID, SegmentID and Value fields to be the same as an already active Subitem (I only wanted subitem value 0 to be active for all items). I also excluded any subitems that were already active.

 

This is the Sql query I used...

  Insert INTO INSubItemSegmentValue(CompanyID, InventoryId, SegmentId, Value)
  select 2,InventoryId,1,0 from InventoryItem where InventoryID NOT IN (select InventoryId from INSubItemSegmentValue)