Usina BRAdvPL Guide
Sign in
← All topics
PRACTICAL GUIDEUnder review

AxCadastro registration exercise

Prepares generic maintenance on an owned test table.

AxCadastro registration exerciseAdvPL
01 · OVERVIEW

Overview

Exercise objective: verify prerequisites before opening simple maintenance. Prepare ZZ1 in SX2, SX3 fields and validation, indexes and test permissions; then check search, view, insert, edit and delete using fictional data. AxCadastro supplies these dictionary-driven operations. Scheron Martins’s source shows a short SA1 call; this adaptation avoids the standard table and uses prepared ZZ1. Alias presence alone proves neither full configuration nor suitability for complex business rules. (TOTVS, n.d., ref. 1; MARTINS, 2023, ref. 2)

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"
User Function Ed371()
    Private cCadastro := "Editorial laboratory"
    Private aRotina := {}
    // Owned ZZ1, dictionary and permissions already validated.
    If Select("ZZ1") > 0
        AxCadastro("ZZ1", cCadastro)
    EndIf
Return Nil
Expected result

With prepared ZZ1, requests an interactive screen; also check cancellation and validation rejection without claiming operations were tested. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Do not use SA1/SA2 for a generic lab. Define accepted/rejected cases and record each action’s actual outcome.
  • 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 analisado. 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