2

I am new to Salesforce Lightning. I am following the below documentation to create my first Lightning App.

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/qs_aotp_app_step3_model.htm

Issue

Upon saving my lightning app, I am getting the following error :

Something has gone wrong. rerender threw an error in 'markup://ui:outputNumber' [Error: Unable to format NaN] Failing descriptor: {markup://ui:outputNumber}. Please try again.

2
  • If you are trying to display something using ui:inputNumber, try checking whether its a valid number. Commented Jul 11, 2016 at 9:48
  • were you able to solve this error ?
    – Razu
    Commented Nov 28, 2016 at 22:07

2 Answers 2

1

I am not using namespace in my application. But I found that one of the old records in the expense list had a null-value in the amount field. That was the reason for the error. I deleted the old record and put some non null value in that field.

-1

Your problem is not having your namespace prepended to Amount__c in line 6 of the formHelper.js code.

updateTotal : function(component) {
    var expenses = component.get("v.expenses");
    var total = 0;
    for(var i=0; i<expenses.length; i++){
        var e = expenses[i];
        total += e.Amount__c;
    }
    //Update counters
    component.set("v.total", total);
    component.set("v.exp", expenses.length);
},//Delimiter for future code

It should be:-

total += e.myNamespace__Amount__c

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .