Hi guys, like you can see, I want to delete multi selected items from my list but I can't get it, I have this:


List:


Code:
var listaPlanFact = new Ext.List({
    id: 'listaPlanFact',
    store: planFactStore,
    multiSelect: true,
    simpleSelect: true,
    onItemDisclosure: function (record) {
        planFactPanelEditor.load(record);
        planFactPanelPrincipal.setActiveItem('planFactPanelEditor', { type: 'slide', direction: 'left' });
    },
    itemTpl: '<div>{FecFact}</div>' +
        '<div>{Denomi}</div>',
    listeners: {
        'render': function (thisComponent) {
            thisComponent.getStore().load();
        }
    }
});

Button:


Code:
{
        xtype: 'button',
        iconCls: 'trash',
        iconMask: true,
        handler: function () {
            var currentPlanFactCount = listaPlanFact.getSelectionCount();
            var currentPlanFact = listaPlanFact.getSelectedRecords();
            var planfactstore = listaPlanFact.getStore();
            for(var i=0;i<currentPlanFactCount;i++)
            {
                if(planfactstore.findRecord('id', currentPlanFact[i].data.id)) {
                    planfactstore.remove(currentPlanFact[i]);
                }
                planfactstore.sync();
            }
            listaPlanFact.refresh();
        }
    }
It works fine when I delete one item selected, but when I try to delete more of that, and reload the page, I get this error message:

'Uncaught TypeError: Cannot read property 'id' of null'

What can be? Please help me.
Thanks very much for your time.