nTop, nLeft, nBottom, nRightStart and end browse coordinates; abbreviated signature, see reference for remaining arguments.
AdvPL GuideMBrowse( nTop, nLeft, nBottom, nRight, cAlias, ... )Understand the traditional browse and its SX3 and aRotina integration.
MBrowse displays alias records using the SX3 dictionary. Documentation requires Private aRotina before the call; each option contains caption, function, reserved value and operation. Operations 1 through 6 mean search, view, add, edit, delete and special. A function name without parentheses receives alias, record and option from the framework. For worktables, consult TRB and aFixe requirements. The example restricts the menu to search and view rather than suggesting unimplemented CRUD. (Ref. 1)
MBrowse( nTop, nLeft, nBottom, nRight, cAlias, ... )nTop, nLeft, nBottom, nRightStart and end browse coordinates; abbreviated signature, see reference for remaining arguments.
cAliasOpen alias with a compatible dictionary.
The consulted page does not establish an application return contract.
#Include "Protheus.ch"
User Function EdMBrow()
Local aArea := GetArea()
Private cCadastro := "Customer inquiry"
Private aRotina := {;
{"Search", "AxPesqui", 0, 1},;
{"View", "AxVisual", 0, 2};
}
// Requires a Protheus environment and open SA1 with valid dictionary.
If Select("SA1") > 0
DbSelectArea("SA1")
MBrowse(6, 1, 22, 75, "SA1")
EndIf
RestArea(aArea)
Return NilWith SA1 available, proposes an inquiry with two options; otherwise no browse is opened. Return Nil belongs to the editorial wrapper, not a documented MBrowse return. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.