Usina BRAdvPL Guide
Sign in
← All topics
ENTRY POINTUnder review

F290FORNP

User Function F290FORNP()

Controls destination supplier and store editing on the first FINA290 screen.

F290FORNPFINA290
01 · OVERVIEW

Overview

The historical TDN page describes locking the destination supplier and store fields. .F. prevents editing; .T. allows it. The standard context exposes mutable private variables cFornP and cLojaP. (TOTVS, ref. 1) The P12.2210 listing places the call in both field WHEN conditions in FA290AUT, without a fourth argument. MV_PAR01 == 2 is another condition: returning .T. does not remove that outer restriction. (Ref. 2)

02 · SYNTAX

Syntax

User Function F290FORNP()

Parameters

cFornP
Private / CharacterExecution context

Destination supplier, mutable private variable. (Ref. 1)

cLojaP
Private / CharacterExecution context

Destination store, mutable private variable. (Ref. 1)

Return value

Logical: .F. locks the fields; .T. allows editing when the other screen conditions are satisfied. (Ref. 1)

03 · PRACTICAL EXAMPLE

Lock editing without replacing the supplier

#Include "Protheus.ch"

User Function F290FORNP()
    // Adapted from the purpose and return documented by TOTVS (ref. 1).
    // Called from field WHEN conditions; do not write records here.
    // Keeps the current cFornP and cLojaP values.
Return .F.
Expected result

Proposes retaining current values and locking both fields. Does not define a supplier, store or invoicing rule. Example not compiled or run in Protheus.

BEST PRACTICES
  • Declaring Local cFornP or Local cLojaP creates local variables instead of updating the caller private variables.
  • The official example assigns private values and returns .F.; fixed supplier and store values require master data validation and a business rule. The editorial example only locks editing.
  • The interface may evaluate WHEN repeatedly. Avoid repeated messages, record writes or integrations with side effects.
  • The historical page lists Protheus 10/11 and Brazil. This does not establish automatic compatibility with every current release.
  • Editorial test plan: compare standard and customized behavior in the described operations, inspect resulting records and record release and patch.
  • Under review: sources and example checked against documentation; code not compiled or run in Protheus. Exact transaction position and target release behavior remain unconfirmed.

Related content

REFERENCES
  1. TOTVS. F290FORNP - Bloqueia dados. TDN. Accessed on 2026-10-23.
  2. EURAI. Pontos de Entrada P12.2210 - Parte 2. Universo do Desenvolvedor, 2023. 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