Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

APMsgAlert

APMsgAlert( <cMsg>, [cTitulo] ) --> Nil

Displays a warning dialog.

APMsgAlertAdvPL
01 · OVERVIEW

Overview

The historical manual describes APMsgAlert as a warning dialog with a message and optional title. It informs the user without performing rollback or automatically terminating its caller. To end a flow after the message, application logic must use its own Return or error handling. Do not display completion before confirming the actual result. (Manual AdvPL, n.d., p. 333, ref. 1) The community example lists this call without demonstrating business rules. (SANTOS, 2020, ref. 2)

02 · SYNTAX

Syntax

APMsgAlert( <cMsg>, [cTitulo] ) --> Nil

Parameters

cMsg
CharacterRequired

Displayed message.

cTitulo
CharacterOptional

Dialog title.

Return value

Nil according to the historical reference.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function EdApmsgal()
    // Teaching message without customer data.
    APMsgAlert("Check the result before continuing.", "Review")
Return Nil
Expected result

Proposes a message; the wrapper terminates through its own Return Nil. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Use an interactive session. Check appearance and behavior in the installed release; the reference is historical and community source was not compiled.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. APMsgAlert. TDN. Accessed on 2026-10-25.
  2. SANTOS, Milton J. dos. Alertas.prw, 2020. Repositório rogeriosacra/ADVPL, ETHIOS/Aula 01 - Alertas001/Aula 01 - Alertas/Alertas.prw. Commit a10ba66270cd96ec062c3ad54547a0145b8b29b8. Exemplo comunitário analisado, sem reprodução integral. 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