Defines an action to be performed when the object starts running. It is a system event that takes place when an object starts running. It is commonly used to assign values to variables that, during the object's execution, will be used by counting operations or by other events, for example. Web Panels generally use this event to place default values in the 'fixed area' of the form.
In Web interfaces, the Start event is executed when the page is loaded (get) and with every post to the server.
In mobile apps, it is executed only the first time a Panel object or a Work With object node is opened on a device. It is not executed again unless the panel is exited and opened again.
Code associated to the event.
If we need to control access to the transaction, we could call a Procedure object:
ChkSecurity.Call(&WebUserExtKey, &WebUserLogin, &aUserProfiles(), &aUserRights(), &Message)
if not Null(&Message)
The Start event is used to assign the &Date variable with the value indicated by the current date before the Web Panel is displayed. This ensures that the current date can be properly shown when the panel is displayed. This technique is very useful to assign default values.
&Date = Today()
The organization's name will be displayed at the start of the Transaction's execution:
&OrgName = GetOrgName.Udp(OrgCode)
What this UDP does is call the Procedure called GetOrgName which returns the name corresponding to the Organization's Code (OrgCode) which has been passed as parameter and assigns it to the Organization name variable (&OrgName).
Objects: Transaction object, Web Panel object, Panel object,Work With object