Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

APMsgNoYes

APMsgNoYes( <cMsg>, [cTitulo] ) --> lRet

Documents historical confirmation and its interpretation limits.

APMsgNoYesAdvPL
01 · OVERVIEW

Overview

The historical manual documents a logical return and describes true on cancellation; the same work assigns true to APMsgYesNo confirmation. Do not silently apply that description to current releases. SANTOS’s example opens APMsgNoYes and ignores the return, so it does not resolve semantics. The editorial proposal records the raw value to compare each button, Escape and window closing in a test environment, without making writes depend on an unconfirmed interpretation. (Manual AdvPL, n.d., p. 334, ref. 1; SANTOS, 2020, ref. 2)

02 · SYNTAX

Syntax

APMsgNoYes( <cMsg>, [cTitulo] ) --> lRet

Parameters

cMsg
CharacterRequired

Displayed message.

cTitulo
CharacterOptional

Dialog title.

Return value

Logical; button-to-value meaning requires verification in the target release.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function EdApmsgno()
    Local lReturn
    // Compare answers in testing; no write depends on them.
    lReturn := APMsgNoYes("Choice test; no changes.", "Diagnostics")
    ConOut(cValToChar(lReturn))
Return Nil
Expected result

Displays the returned value. Record the selected action for each test; this page does not assume each button’s result. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Do not interchange YesNo and NoYes based on names. Check the default button and cancellation behavior before adapting business flows.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. Manual AdvPL. Historical reference hosted by ProtheusAdvPL, p. 334. Accessed on 2026-10-26.
  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-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