Usina BRAdvPL Guide
Sign in
← All topics
PRACTICAL GUIDEUnder review

Conventional entry points and PARAMIXB

ExecBlock(cPE,...,uParams) -> xReturn; PARAMIXB

Checks each entry point’s caller, received data and return.

Conventional entry points and PARAMIXBAdvPL
01 · OVERVIEW

Overview

In the official sample, ExistBlock checks the customization and ExecBlock passes an array as argument four; the entry point reads its elements through PARAMIXB. This does not impose an array on every entry point: shape depends on the actual call. Check type, size and meaning before indexing; PARAMIXB[1] is not always another array. Return exactly what the caller consumes rather than universal .T. or NIL. The demonstration inspects a synthetic array without registering a hook or calling ExecBlock. (Sources: refs. 1–2.)

02 · SYNTAX

Syntax

ExecBlock(cPE,...,uParams) -> xReturn; PARAMIXB
03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed572()
    Local uInput := {"ED01",3}
    // Envelope simulation; do not overwrite PARAMIXB in a real entry point.
    If ValType(uInput) == "A"
        If Len(uInput) >= 2
            ConOut(ValType(uInput[1])+" "+ValType(uInput[2]))
        EndIf
    EndIf
Return Nil
Expected result

Prints C N for the synthetic array. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Verify release/caller branch, transaction, work area, re-entry and return consumption. Do not capture tokens, documents or personal data in diagnostic logs.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. Utilização da função Execblock. Central de Atendimento. Accessed on 2026-10-27.
  2. TOTVS. Ponto de Entrada Padrão do MVC — comparação com pontos convencionais. Accessed on 2026-10-27.
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