EngWorkBench API add BOM Materials

I’m using the EngWorkBench API to add materials to a part BOM. I have the code written currently to work with client DLLs, and works well. I’m currently in the process of converting my code to work with REST services. The same code, converted to work with REST (Custom Methods) is resulting in an error on Update after adding more than 1 material. The error is due to blank PartDescription field of the ECORev table. I’m not making any changes to ECORev directly, but rows appear to be added on Update. The rows that are added have an empty PartDescription field.

Steps (via code)

  1. Check out part
  2. Get new ECOMtl row
  3. Change various field values of new row (part number, qty, custom fields, etc)
  4. Update call
  5. Loop, repeating steps 2-4 for each material
  6. Approve and Check In

Error Details
Message: Description is required.
Table: ECORev
Field: PartDescription

Running the equivalent code using Client DLLs also results in the ECORev rows with empty PartDescription field, but subsequent Update calls don’t result in an error.

I have found a workaround when using REST. It is to clear the ECORev collection in the EngWorkBenchTableset before each Update call, with no apparent ill effects, but I am sure this is not the ‘right’ way to handle it.

Code examples are attached.

Maybe this is better suited for a support call, but thought I’d throw it up here first in case I’m doing anything obviously wrong.

Thanks

InsertBomMaterial-ClientDLLs.cs (1.2 KB)
InsertBomMaterial-REST.cs (1.3 KB)

Another option might be to just delete the RowMod value for the offending ECORevs. Not much different than deleting the whole row though.

I had problems with a bunch of rows in the same ECOGroup coming back on update return. in E10 I started using EngWorkBench.Erp.Proxy.BO.EngWorkBenchImpl.UpdateCurrentECORev
I still get description required now and then but its not in random records unrelated to my immediate bom. I am wondering if this method is in the rest api?