cAliasNumbered alias.
AdvPL GuideGetSXENum(cAlias,cCampo,[cAliasSXE],[nOrdem],[cGroup],[cBranch])Obtains sequential numbering from SXE/SXF or the numbering server.
Alias and field are required; index order, control alias and company group/branch are optional. Default order 1 requires the numbered field immediately after branch. Group and branch take effect when supplied together. TOTVS discourages direct default-initializer calls because numbers can be reserved outside inclusion. (Sources: refs. 1–1.)
GetSXENum(cAlias,cCampo,[cAliasSXE],[nOrdem],[cGroup],[cBranch])cAliasNumbered alias.
cCampoNumbered field.
#Include "Protheus.ch"
User Function Ed474()
// Block not executed: reservation requires confirmation or release workflow.
Local bReserve := {|cAlias,cField,nOrder| GetSXENum(cAlias,cField,,nOrder)}
ConOut(ValType(bReserve))
Return NilPrepares a block without consuming numbers; this is not a full insertion workflow. 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.