Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

AllUsers

AllUsers()

Identifies the discontinued API and guides query migration.

AllUsersAdvPL
01 · OVERVIEW

Overview

TOTVS marks AllUsers as discontinued and unsupported with the data dictionary stored in the database. Its indicated replacement is FWSFAllUsers. Do not merely rename the call: layouts differ. In the replacement’s standard result the first two slots are RecNo and ID; when aKeyValues is provided, requested fields follow them. The example uses the replacement to query only the session user and request the name, but logs only a count. Requires an authenticated Protheus session and appropriate permissions. (TOTVS, n.d., refs. 1–2)

02 · SYNTAX

Syntax

AllUsers()

Return value

Legacy contract is not presented as current; the example receives data from the replacement API.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function EdAlluser()
    // Migration example, not a call to the discontinued function.
    Local aUsers := FWSFAllUsers({__cUserID}, {"USR_NOME"})
    If ValType(aUsers) == "A"
        ConOut(cValToChar(Len(aUsers)))
    EndIf
Return Nil
Expected result

Proposes a count filtered by session ID without exposing names, email or settings. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Explicitly map each field when migrating AllUsers indexing. Do not copy examples with indexes incompatible with aKeyValues; verify the layout description.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. AllUsers. TDN. Accessed on 2026-10-25.
  2. TOTVS. FWSFAllUsers. Linha Microsiga Protheus/TDN. Accessed on 2026-10-25.
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