didonato
9 years agoCreator II
Delete item from BOM
Hi,
I created a new method that transfers a item from one BOM to another. The adding to a new BOM works fine, its the deleting from the old BOM is where I'm having a problem. I'm getting "Aras.Server.Core.MissingCriteriaException" error. with the following details:
Aras.Server.Core.MissingCriteriaException " type ="
Aras.Server.Core.MissingCriteriaException " />
Method below
// *** Delete transfer components in old BOM
Item TDC_BOM = this.newItem("MIN_TDC_Delivered_BOM","get");
TDC_BOM.setProperty("source_id",myTDC.getID());
TDC_BOM = TDC_BOM.apply();
List<string> TDCIds = new List<string>();
for (int j=0 ; j<TDC_BOM.getItemCount() ; j++){
Item deleteComponentBom = this.newItem("MIN_System_BOM","delete");
deleteComponentBom.setProperty("related_id",TDC_BOM.getItemByIndex(j).getRelatedItemID());
deleteComponentBom.apply();
}