Usina BRAdvPL Guide
Sign in
← All topics
FOUNDATIONUnder review

Customization

Chooses a supported extension and defines how to verify its effect.

CustomizationAdvPL
01 · OVERVIEW

Overview

Customization turns a need into an extension contract: event, input, return, effects and release. The TDN page titled Customização has no visible technical body and cannot justify an implementation. Official entry-point and TDS documentation helps separate extension, compilation and testing. Prefer a documented mechanism and preserve standard behavior when customization is absent. The example is a fictional pure calculation illustrating a verifiable contract without claiming an entry point or writing data. (TOTVS, n.d., refs. 1–2)

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"
User Function Ed320(nBase)
    // Teaching contract: accepts only a nonnegative number.
    If ValType(nBase) != "N"
        Return Nil
    EndIf
    If nBase < 0
        Return Nil
    EndIf
Return nBase * 2
Expected result

U_Ed320(5) proposes 10; invalid type or negative input proposes Nil. Not a ready-made business function. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Document cases, dependencies and recovery. Do not use entry points to hide standard-product defects without diagnosis and appropriate guidance.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. Ponto de Entrada. TDN. Accessed on 2026-10-26.
  2. TOTVS. TOTVS Developer Studio Code. Wiki oficial. 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