AllUsers
AllUsers()Identifies the discontinued API and guides query migration.
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)
Syntax
AllUsers()Return value
Legacy contract is not presented as current; the example receives data from the replacement API.
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 NilProposes 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.
- 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.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.