Usina BRAdvPL Guide
Sign in
← All topics
PRACTICAL GUIDEUnder review

Notifications

Selects informational, critical and confirmation messages for a workflow.

NotificationsAdvPL
01 · OVERVIEW

Overview

Informing differs from confirming. Alert and APMsgInfo communicate; APMsgStop does not terminate its caller; APMsgYesNo supplies a logical choice according to the historical reference and official MVC example. Choose the API for its contract rather than its icon. The community Alertas.prw example groups these calls without demonstrating transactions or authorization. This thematic guide is not a complete specification of the Aviso function. (Manual AdvPL, n.d., pp. 333–335, ref. 1; SANTOS, 2020, ref. 2; TOTVS, n.d., ref. 3)

Return value

No single return value: this is a composite workflow.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"
User Function EdAvisos()
    // Test choice; no data write.
    If APMsgYesNo("Review the test summary?", "Review")
        APMsgInfo("Summary available for review.", "Information")
    EndIf
Return Nil
Expected result

The informational message is requested only after confirmation; no record changes. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Do not use dialogs in REST or Jobs. Test returns, closing and Escape; never put passwords or sensitive data in messages.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. Manual AdvPL. Referência histórica, pp. 333–335. Accessed on 2026-10-26.
  2. SANTOS, Milton J. dos. Alertas.prw, 2020. Exemplo comunitário analisado. Accessed on 2026-10-26.
  3. TOTVS. Ponto de entrada MVC. Central de Atendimento. Accessed on 2026-10-26.
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