Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

FWEmpLoad

FWEmpLoad([lAll]) --> aReturn

Lists companies and branches under user access.

FWEmpLoadAdvPL
01 · OVERVIEW

Overview

True lAll requests every company; false limits results to logged-in user access. The function neither switches active company nor grants rights. The page lists company code/name and branch code/name in the result. The example explicitly passes false and shows only the count rather than organizational data. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

FWEmpLoad([lAll]) --> aReturn

Parameters

lAll
LogicalOptional

True includes all; false lists accessible entries.

Return value

Array with company and branch data.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed419()
    // Requires authenticated context; does not broaden lookup.
    ConOut(cValToChar(Len(FWEmpLoad(.F.))))
Return Nil
Expected result

Count depends on context permissions. 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. FWEmpLoad. 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