Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

FWIsInCallStack

FWIsInCallStack(cFuncName) --> lRet

Checks whether a function is in the call stack.

FWIsInCallStackAdvPL
01 · OVERVIEW

Overview

Returns a logical result for the supplied name. It depends on the current call chain rather than user identity, permissions or transaction state. The callback allows testing an owned-source name without treating routine names as authorization. Applications must account for indirect calls and changed flows. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

FWIsInCallStack(cFuncName) --> lRet

Parameters

cFuncName
CharacterRequired

Function name to locate.

Return value

True when the function is in the stack.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed431()
    // Receives the expected name without inferring authorization.
    Local bCheck := {|cRoutine| FWIsInCallStack(cRoutine)}
Return Nil
Expected result

Prepared block; result depends on the stack at evaluation. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check context and return before integration; the example does not replace a 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. FWIsInCallStack. TDN. Accessed on 2026-10-27.
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