cAliasOpen alias with record already positioned.
AdvPL GuideSoftLock(cAlias)Reserves a record before confirming maintenance.
The official reference describes reserving the positioned record without an update obligation, potentially before RecLock. This lock is outside transaction tracking and standard unlock routines; its owner needs a verified release path. The documented flow uses RecLock followed by MsUnlock but does not clearly cover cancellation or RecLock failure. The community example also omits checking that return, so it is not reproduced as a complete implementation. (Sources: refs. 1–2.)
SoftLock(cAlias)cAliasOpen alias with record already positioned.
Community code uses a Boolean; the consulted official page has no formal return table.
#Include "Protheus.ch"
User Function Ed668()
// Uninvoked block: reservation requires positioning and guaranteed release.
Local bReserve := {|cAlias| SoftLock(cAlias)}
ConOut(ValType(bReserve))
Return NilCreates block B without reserving records or leaving locks. 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.