Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

FunName

FunName() --> cRet

Reads the menu-option context.

FunNameAdvPL
01 · OVERVIEW

Overview

FunName identifies the menu-context program. A helper called by that program does not automatically become the result. TDN recommends testing through a menu entry; automation may set context through RpcSetEnv. A name is not authorization evidence. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

FunName() --> cRet

Return value

Text for the documented context.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed407()
    // Run from the test menu without changing context.
    ConOut(FunName())
Return Nil
Expected result

Menu-dependent text; no fixed result outside that context. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Separate routine identification, description and authentication.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. FunName — Nome do programa em execução. 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