Toolbar .removeItem

Upgraded from Pro 2.5 to 2.6, the following code was in production and no longer works:

        this.TOOLBAR.forEachListOption("fields_add", function(listOptionId){
            DESIGNER.TOOLBAR.removeItem(listOptionId);
        });

The loop is being executed, however the item(s) are never removed.

Hello,

Please try this:

toolbar.forEachListOption(“new”,function(id){
toolbar.removeListOption(“new”,id);
});

perfect