RESET ENVIRONMENT
RESET ENVIRONMENT [IN SERVER oEnvSrv]Closes an environment owned by the routine.
Overview
The analyzed public TBICONN.CH macro expands RESET ENVIRONMENT to RpcClearEnv; IN SERVER uses a remote call. This is evidence about that historical include, not proof of equivalence with the installed include. Environment closure is neither GetArea restoration nor a transaction rollback. RpcSetEnv documentation warns against closing menu-, REST PrepareIn- or Schedule-owned contexts. The exercise comments out the command to avoid closing the current context. (Sources: refs. 1–2.)
Syntax
RESET ENVIRONMENT [IN SERVER oEnvSrv]Commented example
#Include "Protheus.ch"
#Include "TBICONN.ch"
User Function Ed618()
// Execute only when closing an environment opened by this routine.
// RESET ENVIRONMENT
ConOut("RESET ENVIRONMENT")
Return NilDisplays the command name without executing it. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Verify the installed TBICONN.CH and cleanup on success/error. Do not install community includes as updates.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.