Usina BRAdvPL Guide
Sign in
← All topics
PRACTICAL GUIDEUnder review

User messages and alerts

MsgInfo(cTexto,cTitulo); MsgStop(cTexto,cTitulo); MsgYesNo(cTexto,cTitulo)

Chooses information, warning or confirmation for the workflow.

User messages and alertsAdvPL
01 · OVERVIEW

Overview

MsgInfo conveys information; MsgStop signals a warning; MsgYesNo asks for a decision. An error icon does not undo writes and confirmation does not execute an action itself. The consulted community samples show these interaction differences. This adaptation retains one confirmation without a business operation. Jobs should use logs and processing state instead of modal windows. (Sources: refs. 1–4.)

02 · SYNTAX

Syntax

MsgInfo(cTexto,cTitulo); MsgStop(cTexto,cTitulo); MsgYesNo(cTexto,cTitulo)
03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed526()
    Local lContinue := MsgYesNo("Show information?","Example")
    If lContinue
        MsgInfo("No data was written.","Example")
    EndIf
Return Nil
Expected result

Yes opens information; No ends without changing data. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Separate decision, validation and persistence. Check dismissal/cancellation in the deployed client, avoid repetitive alerts and keep technical details in protected logs.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. MsgInfo. TDN. Accessed on 2026-10-27.
  2. TOTVS. MSGSTOP%28%29. TDN. Accessed on 2026-10-27.
  3. TOTVS. MSGYESNO%28%29. TDN. Accessed on 2026-10-27.
  4. Atilio/Terminal de Informação. Exemplo 204; commit 7d275a7. Accessed on 2026-10-27.
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