Events are oportunities created by the Scriptcase to the developer insert his own code in order to customize the applications, each event will run in a different period of time making the business rules creating even more easy.
Each application has different events because they have different definitions, for example, in the grid application there is the onRecord event, only exist on grid applications, that will run one time for each line loaded in the grid application, on form and control applications there is the onValidate event that will run every time when the appliation is submited.
Here is a list with the most used events in each application:
onValidate – This event runs by clicking on the validation (OK, Update, Insert, Delete, Filter) depending on application.
onNavigate – This event runs when navigating from one record to another one.
onLoad – This event occurs when the page is loaded, ie when navigating from one record to another one, clicking on the buttons (new, insert, etc. earlier.).
onAfterInsert – This event runs after insert a record.
onBeforeInsert – This event runs before insert a record.
onApplicationInit – This event runs when the application is loading just for the first time.
onRecord – This event is executed before displaying each grid record.
onScriptInit – This event is executed just one time, before the main select of the application execution. In this scope, normally, are executed the macros that update the select, as these: sc_select_field, sc_select_order,sc_select_where(add) and etc.
To know a little bit more about Scriptcase programming and events don’t miss our Q&A Webinar on next friday (May 16th), click on this link to register.