Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

DBOrderNickname

DBOrderNickname( cApelido ) --> lRet

Selects an order by its registered nickname.

DBOrderNicknameAdvPL
01 · OVERVIEW

Overview

The nickname must have been associated with the order through DBSetNickname. It is neither a field name nor a universal Protheus nickname. The reference describes a logical return and an error message when absent; false is not a guaranteed silent failure. This fragment requires caller-defined cNickname and an order previously registered on EDTRB. EDTRB identifies only an owned test table already open with the required schema and permissions; examples are not intended for standard tables. (TOTVS, n.d., ref. 1)

02 · SYNTAX

Syntax

DBOrderNickname( cApelido ) --> lRet

Parameters

cApelido
CharacterRequired

Nickname already registered in the area.

Return value

Logical: true when selected; a missing nickname may emit an error.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed335()
    // Fragment: cNickname comes from the caller contract.
    If Select("EDTRB") > 0
        ConOut(cValToChar(EDTRB->(DBOrderNickname(cNickname))))
    EndIf
Return Nil
Expected result

Selects the existing order; requires the stated context, not self-contained. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check RDD, alias and pending operations. Navigation can flush updates; preserve context under the caller contract and handle errors in the complete routine.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. DBOrderNickname. TDN. 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