ACF Events Codeunit

The codeunit ACF Events contains various triggers that are triggered by events in the Anveo Web Portal. You can equip the trigger with a functionality and adapted for your solution.

The triggers include the following functions of the codeunit ACF Events:

OnLogin

The trigger OnLogin is called when a Anveo User logs into the client.


OnLogout

The trigger OnLogout is called when a Anveo User logs out of the client.


OnLoadEnvironment

OnLoadEnvironment is called after reloading the user interface in the client (e.g. after pressing F5). This trigger is called immediately after OnLogin.

OnBeforeLoad

The trigger OnBeforeLoad is called before loading an Anveo Page Element.

OnAfterGetField

The trigger OnAfterGetField is called after loading a field of an Anveo Page. In this way is it possible to use a finer granularity than when loading a record with OnAfterGetRecord.

OnAfterGetRecord

The trigger OnAfterGetRecord is called – similar to the same trigger in – after the complete loading of a record.

OnAfterLoad

The trigger OnAfterLoad is called after the complete loading of an Anveo Page Element.

OnInit

The trigger OnInit is called before inserting a new record within the client. It can be used to set initial values.

OnBeforeValidate

The trigger OnBeforeValidate is called after setting a new value in a field. This call is before the trigger OnValidate on the next page.


OnValidate

The trigger OnValidate is called after validating a field, just like in .


CallOnInsertTrigger

The trigger CallOnInsertTrigger is called when a new record is inserted. Using of the return value of the function can be decided whether then INSERT(TRUE) or INSERT(FALSE) is called in .

CallOnModifyTrigger

The trigger CallOnModifyTrigger is called when a record is modified. Using of the return value of the function can be decided whether then MODIFY(TRUE) or MODIFY(FALSE) is called in .


CallOnDeleteTrigger

The trigger CallOnDeleteTrigger is called when a record is deleted. Using of the return value of the function can be decided whether then DELETE(TRUE) or DELETE(FALSE) is called in .

OnInsertRecord

The trigger OnInsertRecord is called on inserting a new record and can be used to enhance the trigger OnInsertRecord with additional functionality.

OnModifyRecord

The trigger OnModifyRecord is called on modifying a record and can be used to enhance the trigger OnModifyRecord with additional functionality.

OnRenameRecord

The trigger OnRenameRecord is called on changing a field within the primary key of a record and can be used to enhance the trigger OnRenameRecord with additional functionality.

OnDeleteRecord

The trigger OnDeleteRecord is called on deleting a record and can be used to enhance the trigger OnDeleteRecord with additional functionality.

OnAfterInsertRecord

The trigger OnAfterInsertRecord is called after successfully inserting a record into the database.


OnAfterModifyRecord

The trigger OnAfterModifyRecord is called after successfully modifying a record of the database.

OnAfterRenameRecord

The trigger OnAfterRenameRecord is called after successfully modifying a field within the primary key of a record.

OnAfterDeleteRecord

The trigger OnAfterDeleteRecord is called after successfully deleting a record of the database.

OnAction

The trigger OnAction is called after pressing a menu item or button. All actions that can be activated via menu items or buttons are defined here. The following functions of the Anveo Client Suite are located there as standard defaults:

CLOSE_WEBPAGE()

The action CLOSE_WEBPAGE() closes the current Anveo Page the action is called in.

SAVE_RECORD()

The action SAVE_RECORD() saves the current record in .

NEW_RECORD()

The action NEW_RECORD() inserts a new record on the current Anveo Page.

NEW_RECORD_WEBPAGE()

The action NEW_RECORD_WEBPAGE() opens a linked Anveo Page and inserts a new record into the database. The opened Anveo Page shows the new record.

DELETE_VIRTUAL_TBL()

The action DELETE_VIRTUAL_TBL() deletes all data of a virtual table shown on the current Anveo Page Element. This action can be used to reset search masks.

DELETE_ALL_V_TBLS()

The action DELETE_ALL_V_TBLS() deletes all data of all virtual tables shown on the current Anveo Page.

REC_INFO()

The action REC_INFO() shows the current information and filter of a record in a message box.

PREVREC()

The action PREVREC() jumps to the previous record and shows that record on the current Anveo Page.

NEXTREC()

The action NEXTREC() jumps to the next record and shows that record on the current Anveo Page.

As per convention, all internal functions of Anveo Client Suite are equipped with a pair of parentheses () at the end of the name. These function names should not be changed under any circumstances.


OnBeforeCloseAnveoPage

The trigger OnBeforeCloseAnveoPage is called before closing an Anveo Page.

Besides the trigger the following functions of codeunit ACF Events are also important:


IsWriteBack

The time when a record should be written into the database can be defined here. This works only for Anveo Page Elements setup with the Write Behavior Defined. Find more information about this setup here.


CustomAnveoPageRelation

All of the own table relations are defined within the function CustomAnveoPageRelation. The function ends with the return of an RecRef which has filter set.


DropDownFieldDefinition

In the function DropDownFieldDefinition fields (maximum of 2) can be defined which should be displayed in a drop-down that refers to a certain table. For example, in the block DATABASE::Item in codeunit ACF Events the field numbers are defined which should be displayed when a drop-down is implemented in a field that refers to an item (table #18). In the example the number (Item.FIELDNO(“No.”)) and the description (Item.FIELDNO(“Description”)) is displayed to identify an item in the dropdown list.


GetLanguageFilter

The function GetLanguageFilter returns a filter string that represents all languages that can be chosen in the client connected to Anveo Client Suite. As a standard default these are the language codes DEU (German, Germany) and ENU (English, USA).


ReadSecurityFilter

The function ReadSecurityFilter allows the definition of security filters. These security filters depend on the fields Relation Type and Relation Code of the Anveo User. Find out more about the Anveo User setup here.


Checkpassword

Using the function Checkpassword you can use C/AL code to stipulate the password guidelines for client users, for instance that a password must include special characters or be a certain length.


TestPassword

The function TestPassword tests a given password using the Checkpassword function and reports an error when the password does not comply with the guidelines.