Using Part Business Object to add warehouse to all parts

Using Business Objects to add Part Warehouse data.

 

I am trying to add a warehouse to a part using the Epicor.Mfg.BO.Part.  I am using the following code


       objPart = New Epicor.Mfg.BO.Part(objSess.ConnectionPool)

 

       dsPart = New Epicor.Mfg.BO.PartDataSet

       objPart.GetByID("390-006-012")

       objPart.CheckCOOPercents("390-006-012")

       objPart.GetPartXRefInfo("390-006-012", "", "", "", "", False)


“Getting Error Below Here after execution of GetNewPartWarehouse”

"Failure to enable constraints. One or more rows contain values violating non-null, unique or foreign key constraints.

Table:PartWhse

Company='CC'PartNum='390-006-012'Plant='Mfgsys'WarehouseCode='' RowIdent='':ForeignKeyConstraint PartToPartWhse requires the child key values.objPart.GetNewPartWhse(dsPart, "390-006-012", "MfgSys")

        dsPart.PartWhse.Rows(0)("RowMod") = "I"

        dsPart.PartWhse.Rows(0)("WarehouseCode") = "Pangbo"

        objPart.Update(dsPart)

 

 

 

No parameter exists for the GetNewPartWhse for the warehouse code.  Any help would be appreciated.

Thank you.

Amy Haas

330-715-4175

ahaas@...