views:

72

answers:

1
var debtProtectionId = 0
    // get the selected id of debt protection dropdown
    if (mainPanel.generalPanel.calculationsFieldSet.debtProtection.getValue() != '') {
        debtProtectionId = mainPanel.generalPanel.calculationsFieldSet.debtProtection.getValue();
    }
    // get the store record with this id
    var storeRecord = planCombinationsStore.getAt(debtProtectionId)

When I run the code it says 'storeRecord is undefined'.

What could be the cause of this?

+3  A: 

Store.getAt expects an index to its internal collection. Do you mean Store.getById instead?

bmoeskau