Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

AXCADASTRO()

AxCadastro( <cAlias>, <cTitulo>, [cVldExc], [cVldAlt] )

Opens dictionary-driven generic maintenance for a simple table.

AXCADASTRO()AdvPL
01 · OVERVIEW

Overview

AxCadastro provides search, view, insert, edit and delete for simple tables defined in SX2/SX3. The page accepts named deletion and editing validation functions; the minimal example omits both. Scheron Martins’s community source calls AxCadastro on SA1, illustrating invocation without proving suitability for every installation’s customer rules. The editorial proposal uses only fictional alias ZZ1, previously created, opened and validated in the dictionary, with cCadastro/aRotina in legacy context. It is not a ready-made standard-table maintenance routine. (TOTVS, n.d., ref. 1; MARTINS, 2023, ref. 2)

02 · SYNTAX

Syntax

AxCadastro( <cAlias>, <cTitulo>, [cVldExc], [cVldAlt] )

Parameters

cAlias
CharacterRequired

SX2 alias.

cTitulo
CharacterRequired

Maintenance title.

cVldExc
CharacterOptional

Deletion validation function name.

cVldAlt
CharacterOptional

Editing validation function name.

Return value

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

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function EdAxcadas()
    Private cCadastro := "Editorial test table"
    Private aRotina := {}
    // ZZ1 must exist in the dictionary and be open in testing.
    If Select("ZZ1") > 0
        AxCadastro("ZZ1", cCadastro)
    EndIf
Return Nil
Expected result

Requests interactive maintenance only if ZZ1 is already open; otherwise no screen is opened. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Restrict to a test table. Review authorization and rules before enabling operations; do not use generic screens to bypass module rules.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. AXCADASTRO(). TDN. Accessed on 2026-10-26.
  2. MARTINS, Scheron. AxCadastro.prw, 22 set. 2023. Commit b12d5cb980785626e184454c968f41d5d954b932. Exemplo comunitário analisado, não reproduzido integralmente. 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