You need to sign in to do that
Don't have an account?

before insert and after insert
What is the difference b/w before insert and after insert?
What is the difference b/w action function and action support?
What is the difference b/w action function and action support?
Check these links:
1. http://www.sfdc99.com/2014/01/25/use-vs-triggers/
2. http://www.cloudforce4u.com/2013/06/difference-between-action-support-and.html
Hope it helps.
Warm Regards,
Sourav
Before Trigger: Before triggers are used to perform the logic on the same object and specifically we cannot use the DML operation (Insert, update, delete) on these triggers.
These triggers are fired before the data is saved into the database.
After Trigger: After triggers are used to perform the logic on the related objects and these triggers are used access the fields values that are created by system (Ex: CreatedBy, LasteModifiedBy , Record Id etc..).
apex:ActionFunction : This component helps to envoke AJAX request (Call Controllers method) directly from Javascript method. It must be child of apex:form.
apex:ActionSupport : This component adds Ajax request to any other Visualforce component. Example : Commandlink button has inbuilt AJAX functionality however few components like OutputPanel does not have inbuilt AJAX capabilities. So with the help of this component, we can enable AJAX.
Similarities:
Both action support and function can be used to call a controller method using an AJAX request.
Differences:
1. Action function can call the controller method from java script.
2. Action support adds AJAX support to another visualforce component and then call the controller method.
for example:
Here action support adds AJAX to output panel, so once you click on output panel controller method will be called.
3. Action function cannot add AJAX support to another component. But from a particular component which has AJAX support(onclick, onblur etc) action function can be called to call the controller method.
Example:
In this example onlick of input checkbox "myactionfun" action function is called from where controller method "actionFunMethod" gets called.
Apart from this, the main difference between the "two" action support and action function is that, the action function can also be called from java script.
Example:
I hope it will help you.
Regards,
Jyothsna D