You need to sign in to do that
Don't have an account?
Renu anamalla 17
Hi, When do we go for CommandButton and when do we go for Action function ?please explain Difference also..
Hi, When do we go for CommandButton and when do we go for Action function ?please explain Difference also..
-you can use command button when you want to call controller method directly on click of button
-you can call action function from javascript method or oncomplete or onclick of any event in this case controller method not directly called
1. herte action function call from javascript method
2.Here action function called oncomplete of action
3. you can call action function on acomplete of another action function
i hope this is helpful for you
thanx,
Atul Patil
salesforce developer
Difference is in the markup.
A command button allows to call an apex method when the button is pressed, but under no other circumstances.
A action function allows to execute an apex method method via JavaScript which can be used in a number of different scenarios.
So if you want to call an apex method without performing any operations on client side then you can use command button.
If you want to perform some operations once you click on a button after that you want to call apex method then in that case you should go with action function.