Documented resourceHas official documentation covering purpose, syntax, parameters, return and conditions of use; it is the preferred choice for customizations.
AdvPL GuideDocumented API → public contract; internal resource → implementation with no compatibility guaranteeLearn why internal Protheus functions, classes and variables should not underpin customizations and how to replace these dependencies.
Not every identifier found in source code, old examples or the product repository is a public API. According to TOTVS, restricted or undocumented functions, classes and variables are outside standard support and may change behavior or be discontinued without notice. Confirm official documentation before adopting a resource; when it is internal, replace it with a documented API or your own implementation.
Documented API → public contract; internal resource → implementation with no compatibility guaranteeDocumented resourceHas official documentation covering purpose, syntax, parameters, return and conditions of use; it is the preferred choice for customizations.
Internal or restricted resourceWas created for product use, may depend on implicit assumptions and provides no public compatibility contract.
Resource found only in source codeTechnical existence does not prove that the identifier is public, supported or stable; confirm it in official documentation.
The classification guides the architectural decision: use the public API, replace the internal dependency or submit the requirement through official TOTVS channels.
#Include "TOTVS.ch"
User Function ExDocumentedResource()
Local cMessage := "Processing completed"
// Prefer a public, documented function for the requirement.
MsgInfo(cMessage, "Result")
ReturnThe example uses a documented public function. In a real migration, replace the internal call with the official API for the requirement and test it on the approved release.
1. Find every call. 2. Record inputs, outputs and context. 3. Check official documentation. 4. Choose a public API or your own implementation. 5. Add regression tests. 6. Remove the dependency and validate the target release.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use