Usina BRAdvPL Guide
Sign in
← All topics
ENTRY POINTUnder review

F241IRAN

User Function F241IRAN()

FINA241 {cNumBor} context: community example analysis and editorial diagnostics.

F241IRANFINA241cNumBorPARAMIXBExecBlock
01 · OVERVIEW

Overview

The official list records ExecBlock("F241IRAN", .F., .F., {cNumBor}); the specific index entry remains under construction. (TOTVS, n.d., refs. 2–3) Eurai Rapelli reads PARAMIXB[1] as character and returns NIL; the SEA lookup is commented out. (Rapelli, 2023, ref. 1) The P12.2210 listing places the call in FA241BORDE. (Universo do Desenvolvedor, 2023, ref. 4) The diagnostics below are original code and do not reproduce the full article. Whether the call occurs before or after recording or commit remains unconfirmed. GitHub searches returned catalog references but no useful implementation.

02 · SYNTAX

Syntax

User Function F241IRAN()

Parameters

PARAMIXB[1] / cNumBor
Character in community exampleContext to confirm

The call wraps cNumBor in a one-element array. Under the ExecBlock mechanism, the whole array reaches PARAMIXB and cNumBor corresponds to PARAMIXB[1]. (TOTVS, n.d., refs. 2 and 5) The article reads it as character. Length, format, uniqueness and key composition remain unconfirmed.

Return value

The article uses NIL; this does not establish an official return contract. The caller excerpt does not assign the result. The diagnostics follow that example, requiring confirmation in the target release before being enabled. (refs. 1 and 4)

03 · PRACTICAL EXAMPLE

Editorial diagnostics without querying SEA

#Include "Protheus.ch"

User Function F241IRAN()
    // Original code based on Eurai Rapelli example context (ref. 1).
    // Check only the received shape; do not validate or print the number.
    Local uContext := PARAMIXB
    Local lExpectedShape := .F.

    // Separate checks avoid indexing a value that is not an array.
    If ValType(uContext) == "A"
        If Len(uContext) >= 1
            lExpectedShape := ValType(uContext[1]) == "C"
        EndIf
    EndIf

    ConOut("F241IRAN: array with character first element = " + IIf(lExpectedShape, "yes", "no"))

    // NIL follows the community example; target-release contract remains unconfirmed.
Return NIL
Expected result

Logs yes if context is an array with at least one element and the first is character; otherwise logs no. Returns NIL without accessing tables or changing context. This does not validate batch existence, contents or authorization. Neither compiled nor executed in Protheus.

BEST PRACTICES
  • The community source dbSeek line is commented out; it is neither an executed query nor a complete lookup block.
  • Do not enable a SEA lookup without confirming alias opening, index order, key and work-area preservation.
  • Do not interpret cNumBor availability as proof that the batch has been recorded or the transaction committed.
  • The diagnostics recognize only context shape. An empty string is also character and does not establish a valid identifier.
  • Test generation, repeated calls and any reprocessing on the target release and patch.
  • Do not treat NIL as authorization to record, cancel or ignore failures. Full purpose and return handling remain under review.

Related content

REFERENCES
  1. RAPELLI, Eurai. FINA241-F241IRAN - Execução do bordero de impostos. Universo do Desenvolvedor, 2023. Accessed on 2026-10-23.
  2. TOTVS. Pontos de Entrada. TDN. Indexed evidence accessed on 2026-10-23.
  3. TOTVS. Pontos de Entrada - Financeiro - P12. TDN. Indexed evidence accessed on 2026-10-23.
  4. EURAI. Pontos de Entrada P12.2210 - Parte 2. Universo do Desenvolvedor, 2023. Accessed on 2026-10-23.
  5. TOTVS. ExecBlock - Execução do ponto de entrada. TDN. Accessed on 2026-10-23.
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