advpl-pontos-entrada

Create Protheus TOTVS Point of Entry User Functions with correct PARAMIXB handling.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/JoniPraia/plugadvpl --skill advpl-pontos-entrada
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: advpl-pontos-entrada
Source: https://github.com/JoniPraia/plugadvpl/tree/main/skills/advpl-pontos-entrada
Command: npx skills add https://github.com/JoniPraia/plugadvpl --skill advpl-pontos-entrada

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you identify, create, and debug Protheus “Ponto de Entrada” (PE) customizations so you can change standard TOTVS behavior safely without modifying original sources.

Core Features & Use Cases

  • Understand PE naming, signature, and return rules: choose the right User Function name, rely on PARAMIXB (1-based), and return the correct value type (e.g., .T./.F. for validations).
  • Pick the correct PE moment in the execution flow: use naming patterns and common suffixes like LOK, TOK, INC, ALT, EXC, COMMIT, STRU, MOD, and VLD to target validations, post-events, MVC structure hooks, and commits.
  • Diagnose “PE not firing”: verify function existence in the RPO (conceptually via ExistBlock/ExecBlock), check naming typos, and resolve potential conflicts between client and TOTVS RPO compilations.

Quick Start

Use the advpl-pontos-entrada skill to find which PE to implement for routine behavior you want to change, then name the User Function exactly and write the correct PARAMIXB handling and return value for that hook.

Frequently Asked Questions about advpl-pontos-entrada

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Protheus customization without modifying the original TOTVS source code?

To customize Protheus safely, implement a Ponto de Entrada (PE) as a User Function to hook into the standard execution flow. This allows you to change behavior without modifying original TOTVS sources.

Why does my Protheus Ponto de Entrada not fire during execution?

A Ponto de Entrada might not fire due to naming typos or the function missing from the compiled RPO. Verify function existence conceptually via ExistBlock and check for compilation conflicts between client and TOTVS environments.

How do I use PARAMIXB correctly in an ADVPL Ponto de Entrada?

Use PARAMIXB in ADVPL with 1-based indexing to access execution parameters passed to the Ponto de Entrada. You must handle it carefully and return the correct value type, such as .T. or .F. for validations, to avoid breaking runtime context.

What naming patterns should I follow for MVC hooks in Protheus?

For MVC hooks in Protheus, follow naming patterns using common suffixes like LOK, TOK, INC, ALT, EXC, COMMIT, STRU, MOD, and VLD. These suffixes target specific execution moments like pre/pos validations, post-events, and structure hooks.

Can I use a Ponto de Entrada to validate data before a commit in Protheus MVC?

Yes, you can use a Ponto de Entrada for pre-validation before a commit in Protheus MVC. You must name the User Function exactly with the correct validation suffix and return .T. or .F. to control the execution flow.

What precautions should I take to avoid breaking the runtime context when implementing an ADVPL PE?

To avoid breaking the runtime context when implementing an ADVPL PE, apply GetArea and RestArea guidance to preserve the database state. Ensure you return the appropriate type per PE class and use 1-based PARAMIXB indexing.