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.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.


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"





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

Thank you.

Amy Haas