AxCadastro registration exercise
Prepares generic maintenance on an owned test table.
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)
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 NilWith 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.
- 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.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.