You need to sign in to do that
Don't have an account?
Eldon
order of Lightning JS controller ' $A.enqueueAction'
Hi,
I have developed an app using lightning components. I have 5 apex server calls in the init function of its JS controller.
But some time my app is not loading fine. Some time it is loading correctly. I have given the '$A.enqueueAction' of all server calls at last part after all server calls in the init fnction. Is there any order in giving the '$A.enqueueAction' of each server calls if there are multiple APEX server calls in single function?
Thankyou
I have developed an app using lightning components. I have 5 apex server calls in the init function of its JS controller.
But some time my app is not loading fine. Some time it is loading correctly. I have given the '$A.enqueueAction' of all server calls at last part after all server calls in the init fnction. Is there any order in giving the '$A.enqueueAction' of each server calls if there are multiple APEX server calls in single function?
Thankyou
Like this way we can achieve the right output always . This is the correct way to call $A.enqueueAction() .
The code is here :
Thanks.
All Answers
Check below link for more infomration-
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_actions_call.htm
Like this way we can achieve the right output always . This is the correct way to call $A.enqueueAction() .
The code is here :
Thanks.
Can you please let me know in line 19, should I need to use action_2 or action as you had declared action_2 for the component to get. I used the similar code and am getting error as "Uncaught Error in $A.getCallback() [v is not defined] Callback failed"
Thanks.
Regards,
MB
Remove the 21st line, then your code will run without any exception.
Regards,
Abhi
Can we handle the above multiple server side calls in Client side JS controller it self or can we also create differemt helper to make different server side calls?
Which is the best way according to the performance as suggested by salesforce.
Regards,
Vijay.