You need to sign in to do that
Don't have an account?
lali
Lightning app - only one serverside call works.
Hi,
I created expense tracker app in my orgnization just like it is given in the Lightning component Developer Guide.
When I ran the application I was able to see all the Expenses from the Expense object - as expected.
Enter a new expense and cliking on the submit button doesn't create an expense record. - reason found after debugging is
the action.setCallback(this, callback) is not being executed
if I comment the action.setcallback in getexpenses and then try to execute the action.setCallback(this, callback) in create expense then it works.
So what I understodd finally is that only calling the serverside call once worked but the second time it doesn't do anything.
Is there something in my org that I need to enable to get the full version of the lightning to work?
Thanks in advance.
I created expense tracker app in my orgnization just like it is given in the Lightning component Developer Guide.
When I ran the application I was able to see all the Expenses from the Expense object - as expected.
Enter a new expense and cliking on the submit button doesn't create an expense record. - reason found after debugging is
the action.setCallback(this, callback) is not being executed
if I comment the action.setcallback in getexpenses and then try to execute the action.setCallback(this, callback) in create expense then it works.
So what I understodd finally is that only calling the serverside call once worked but the second time it doesn't do anything.
Is there something in my org that I need to enable to get the full version of the lightning to work?
Thanks in advance.
You may want to refer to the official documentation (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/apex_records.htm)and this thread (https://developer.salesforce.com/forums/ForumsMain?id=906F0000000AndMIAS) which explains this in more detail.
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others and improve the overall quality of Discussion Forums.
Gaurav Kheterpal
Certified Force.com Developer| Salesforce Mobile Evangelist| Developer Forums Moderator| Dreamforce Speaker