Usina BRAdvPL Guide
Sign in
← All topics
CLASSUnder review

MSMGet

MsmGet():New([cAlias],[uPar2],nOpc,lUnqFocus,[uPar5],[uPar6],[aAcho],[aPos],[aCpos],[nModelo],[uPar11],[uPar12],[uPar13],[oWnd],[lF3],[lMemoria],[lColumn],[caTela],[lNoFolder],[lProperty],[aField],[aFolder],[lCreate],[lNoMDIStretch],[uPar25])

Creates a field form from SX3 or an array.

MSMGetAdvPL
01 · OVERVIEW

Overview

MsMGet organizes field controls and validation. It can edit memory variables or table fields according to lMemoria. lProperty avoids Private aTela/aGets dependencies and uses corresponding properties. Validation runs X3_VLDUSER, X3_VALID, then the trigger. If Private aRotina exists, nOpc is its row position, not the operation code. The official page conflicts at position four: current syntax uses lUnqFocus while the old table lists uPar4; verify the LIB because lUnqFocus is documented from 20220502. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

MsmGet():New([cAlias],[uPar2],nOpc,lUnqFocus,[uPar5],[uPar6],[aAcho],[aPos],[aCpos],[nModelo],[uPar11],[uPar12],[uPar13],[oWnd],[lF3],[lMemoria],[lColumn],[caTela],[lNoFolder],[lProperty],[aField],[aFolder],[lCreate],[lNoMDIStretch],[uPar25])

Parameters

nOpc
NumericRequired

aRotina position or operation according to context.

lUnqFocus
LogicalRequired

Focus a sole field; verify LIB 20220502 or later.

Methods

NewCreates the instance with compatible context and arguments.MsmGet():New([cAlias],[uPar2],nOpc,lUnqFocus,[uPar5],[uPar6],[aAcho],[aPos],[aCpos],[nModelo],[uPar11],[uPar12],[uPar13],[oWnd],[lF3],[lMemoria],[lColumn],[caTela],[lNoFolder],[lProperty],[aField],[aFolder],[lCreate],[lNoMDIStretch],[uPar25])
RefreshRefreshes controls.oForm:Refresh()
EnableEnables editing.oForm:Enable()
DisableDisables editing.oForm:Disable()
ShowShows controls.oForm:Show()
HideHides controls.oForm:Hide()
SetFocusSets focus.oForm:SetFocus()

Return value

New creates the object; documentation gives no useful return for the listed methods.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed548()
    // Requires an existing instance; block not invoked.
    Local bRefresh := {|oForm| oForm:Refresh()}
    ConOut(ValType(bRefresh))
Return Nil
Expected result

Prints B; creates no form and writes no fields. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Consult the source for all optional arguments; do not copy historical signatures into current LIBs without checking positions. Bound editable fields, prepare container/context and separate refresh from persistence. MV_ENCHOLD affects MsMGet, not MVC.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. MsMGet. 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