title: Convert Standard Item to Matrix Child Item
body: <p>I have a scenario I'm a little stumped with, and hoping the Stack gurus can assist.</p>
  
  <p>I have product ABC123.WHT (example) as a standard inventory item, with over 12 months of history/transactions etc... ABC123.WHT is a white product, and ABC123.BLK is of course black. </p>
  
  <p>They were originally created as standard (non-matrix) items during implementation, but for various reasons I now want to have them as matrix items, ABC123 naturally as the parent, and ABC123.BLK &amp; ABC123.WHT as the child items.</p>
  
  <p>Now when looking at the item record information in the F12-Console, there are a number of fields my script has changed:</p>
  
  <pre><code>hasparent = 'T'                                // changed from 'F' to 'T'
  parent = '1234'                                // internal id of the parent code
  itemoptions = ['CUSTCOL_COLOUR']               // set the option array with the colour list id
  matrixoptioncustitem_colour = '100'            // colour list id for WHITE
  matrixoptioncustitem_colour_display = 'White'  // colour name
  matrixtype = 'CHILD'
  </code></pre>
  
  <p>My script can successfully change these fields, and <em>sort of</em> links the new child to the parent (ie. in lists shows as <code>ABC123 : ABC123.BLK</code>) however, the child code <em>does not</em> show up in the parent code item record in the Matrix Items list.  </p>
  
  <p>In the <code>child</code> item, the <code>subitem of</code> field <em>is</em> populated, but not <code>read-only</code> like a true child item, and thus could be deleted by any user with item-edit permissions.   </p>
  
  <p>Additionally, <em>true</em> child items show the MATRIX-SUBITEM subheading next to the item name when displaying the item record, whereas the <em>child</em>ed standard item does not. It also does <em>not</em> show the item options (such as colour) in the child record.</p>
  
  <p>This process <em>does</em> work when moving a <em>true</em> child item from one parent to another, so I suspect there is perhaps a kind of hidden flag I need to set to truely activate the child-parent link.</p>
  
  <p>To me this would be a far simpler and safer method for my scenario, rather than merging all the transactional history from one item id to another.</p>
  
  <p>Anyone with the answer to this one?</p>