Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

AXVISUAL()

AxVisual( <cAlias>, <nReg>, <nOpc>, [aAcho], [nColMens], [cMensagem], [cFunc], [aButtons], [lMaximized] )

Configures record viewing in a legacy interface.

AXVISUAL()AdvPL
01 · OVERVIEW

Overview

AxVisual supplies the record viewing interface according to the Protheus dictionary. The alias must exist in SX2 with fields and validations in SX3; the caller supplies record and browse context. nOpc is the option position in aRotina. It differs from the operation code in the fourth menu column: 2 in this example. Optional argument positions differ across Ax functions; do not transfer AxAltera positions to AxInclui or AxDeleta. The page does not formalize a return. The fragment only configures an option in an already prepared legacy routine without executing the operation. (TOTVS, n.d., ref. 1)

02 · SYNTAX

Syntax

AxVisual( <cAlias>, <nReg>, <nOpc>, [aAcho], [nColMens], [cMensagem], [cFunc], [aButtons], [lMaximized] )

Parameters

cAlias
CharacterRequired

Alias registered in SX2 and available in context.

nReg
NumericRequired

Record RecNo in browse context.

nOpc
NumericRequired

Option position in aRotina, not a universal operation code.

aAcho
ArrayOptional

Displayed fields; NOUSER can prevent user-defined fields being added.

nColMens
NumericOptional

Unused in the page.

cMensagem
CharacterOptional

Unused in the page.

cFunc
CharacterOptional

Function for loading memory variables.

aButtons
ArrayOptional

Additional buttons: bitmap, block and title.

lMaximized
LogicalOptional

Dialog maximization.

Return value

The consulted page does not specify a return contract; the example does not use it.

03 · PRACTICAL EXAMPLE

Commented example

// Fragment: aRotina already exists in the legacy caller.
// The framework supplies alias, record and option position.
AAdd(aRotina, {"Viewing", "AxVisual", 0, 2})
Expected result

Adds one menu entry; it does not independently open a screen or modify data. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Test on a custom test table with permissions and validation. Generic functions do not replace complete business-routine rules or an MVC design.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. AXVISUAL(). TDN. Contrato da função e exemplo aRotina. 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