OnRun (Codeunit) Trigger
Version: Available or changed with runtime version 1.0.
Runs when a codeunit is run.
Syntax
trigger OnRun()
begin
...
end;
Example
The OnRun()
trigger is used to initialize the codeunit. A codeunit can be called from another codeunit, a page, or a report. The OnRun()
trigger is run when the codeunit is called. The following pseudo code illustrates how the OnRun()
trigger is run when a codeunit is called from a page.
page 50111 MyPage
{
trigger OnOpenPage();
begin
Codeunit.Run(Codeunit::RunMyCode);
end;
}
codeunit 50110 RunMyCode
{
trigger OnRun()
begin
// Run some code here
end;
}
See Also
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour