Version: eXtendSanMar 1.0.5.2 and above
Audience: Administrator, Developer

If the matrix list in your NetSuite account, which is used to save the color values of constituted items, has duplicate entries, an error will appear when you try to constitute an item. This occurs because the automation cannot determine which color value to use when there are duplicate entries.

To resolve this issue, consider one of the following methods:
  1. Clean your color list by marking duplicate color options as inactive, renaming them, or deleting them.
  2. If you prefer not to mark them as inactive or delete them, create a function in the suite_sanmar_transformers.js file to return the desired entry when duplicates are present:
Available Arguments:
      /**
       * @param {Object} args
       * @prop  {String} args.color
       * @prop  {String} args.colorListId
       * @prop  {Array}  args.colorMapRegExp
       * @prop  {Object} args.sourceNativeRecord
       */
Function name: 
getNsColorValue()

The above function should return a JSON object that includes the properties colorId and abbreviation.

The colorId corresponds to the NetSuite color list id, while the abbreviation is used to update the submatrix item template.