Initializes the user-defined variables on the form or page.
Applies To
-
Forms
-
Pages
Remarks
The C/AL code in this trigger is executed immediately after the variables are cleared and the form or page is loaded. This trigger cannot be used to access the controls on the form or page. You can change properties that are dynamic, including those properties that can only be changed when the form or page is opened.
After this trigger is executed, the OnOpenForm Trigger for forms or the OnOpenPage Trigger for pages is called. If an error occurs in the trigger code, then the form or page is closed.
Differences Between the Classic Client and RoleTailored Client
In the RoleTailored client, if you set filters, keys, sort order, or other settings that affect a table view in the OnInit trigger, then the settings are overwritten by the OnOpenForm trigger. Instead of setting these in the OnInit trigger, do one of the following tasks:
-
Specify the settings on the table view of the page instead of in a trigger.
-
Specify the settings in the OnOpenForm trigger.
See Also
© 2010 Microsoft Corporation. All rights reserved.