Usina BRAdvPL Guide
Sign in
← All topics
COMMANDUnder review

ACTIVATE DIALOG

ACTIVATE DIALOG <oDlg> [CENTERED]

Activates a dialog after definition and setup.

ACTIVATE DIALOGAdvPL
01 · OVERVIEW

Overview

Defining a dialog creates its structure; ACTIVATE DIALOG starts interaction. TDialog documentation describes a modal window that prevents input into other windows while active. CENTERED appears in official examples and centers the dialog. Handle closing validation and interaction results explicitly; reaching code after ACTIVATE does not mean the user confirmed a write. (TOTVS, n.d., ref. 1)

02 · SYNTAX

Syntax

ACTIVATE DIALOG <oDlg> [CENTERED]

Parameters

oDlg
ObjectRequired

Previously defined dialog object.

Return value

Activation command; application logic must manage the business result.

03 · PRACTICAL EXAMPLE

Commented example

#Include "TOTVS.ch"

User Function EdDialog()
    Local oDlg
    // Build the window before starting modal interaction.
    DEFINE DIALOG oDlg TITLE "Test inquiry" FROM 0, 0 TO 160, 300 PIXEL
    ACTIVATE DIALOG oDlg CENTERED
    // Closing the window does not confirm a write.
Return Nil
Expected result

Proposes an empty test window closed through the standard window control. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Run in an interactive session. Do not open dialogs in jobs or REST; plan validation and object cleanup on closing.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. Classe TDialog. TOTVSTEC/TDN. Accessed on 2026-10-25.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha