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.

  • If you are trying to display something using ui:inputNumber, try checking whether its a valid number. – Junaid P Khader Jul 11 '16 at 9:48
  • were you able to solve this error ? – Razu Nov 28 '16 at 22:07
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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.