Aqui otra solución mucho más sencilla

/// Elimina un item de la producción
ClassMethod ProductionItemRemove(pProdName, pItemName) As %Status
{
    write !,"Removing Item: "_pItemName

   if ##class(Ens.Config.Item).NameExists(pProdName, pItemName,.itemId)

    {
        set objItem=##class(Ens.Config.Item).%OpenId(itemId)
        set prod=##class(Ens.Config.Production).%OpenId(pProdName)
        do prod.RemoveItem(objItem)
        do prod.%Save()
        
        kill objItem
    
        do ##class(Ens.Director).RestartProduction(0,1)
    }
    
    quit $$$OK
}

Un saludo,

Francisco López

Exactly... using %Save aftewards RemoveItem in Ens.Config.Production works

Thanks for all

it is a mistake when I've copied it in the post. The original code is the same name, and I get the idItem, thanks

Yes I have,

but it doesn't work, the item is removed from database but it still into production.cls, so the production is unestable. I should to remove the item manually.