Routine purpose and analysis scope
OFIOM030 handles service requests and time entries for a service order in the Workshop module (SIGAOFI). In the analyzed caller, VO1 identifies the order, VO2 participates in the request header and VO4 contains services and time entries. TOTVS functional documentation explains the standard-time field; it provides routine context but does not confirm the hook contracts described here (TOTVS, 2019).
There are 20 distinct identifiers in 24 literal ExecBlock calls. OM030AST occurs twice, OM030VTS twice and VERTPGCC three times. These are code locations, not 24 executions per operation (MICHELSEN, 2026).
Execution paths and transaction boundaries
MenuDef appends actions through OM030ROT. OM030LEG prepares legends with OM030CLG and, when nReg == Nil, color rules through OM030COR. These helpers are not consecutive save steps.
OM030 and OM030A check OM030AST on different opening paths. During requests, OM3020TP precedes the interface branch; OM030INI and OM030ABT belong to interactive setup with services. Field, deletion, edit, selection and TudoOk validation are callbacks or alternative paths; they do not form one sequence.
FS_GRSRVs checks OM030ANGR before Begin Transaction (1200), invokes OM030DPGR inside that transaction and reaches printing branches, including IMPSUBORD, only after End Transaction (1773). FS_ALTSRV is a different path: OM030VAS precedes Begin Transaction (4510) and OM030ADG precedes End Transaction (4727). Neither persistence hook is post-commit.
OM030OKN accompanies confirm/cancel and does not prove save success. OM030TERC belongs to third-party processing; VERTPGCC may run repeatedly. Select a hook by its contract and path, not merely its name.
OM030AST — OM030 / OM030A
Defines the status checked when opening request and edit screens. Receives {VO1->VO1_STATUS}. Its return replaces the status only in the comparison with "A"; any other value blocks opening. It does not write VO1_STATUS. Block existence is cached in a Static variable.
Calls at lines 192, 3824. (MICHELSEN, 2026).
OM3020TP — OM030
Runs after grid preparation, before F4 setup and screen opening. The confirmed spelling is OM3020TP. No explicit fourth argument is supplied and the caller ignores the return. The call precedes the interactive/automatic branch.
Calls at lines 472. (MICHELSEN, 2026).
OM030INI — OM030
Validates interactive opening when the service grid contains rows. The fourth argument is {}: an empty array. Called only when Len(aColsSrv)>0 and !lOM030Auto. .F. returns immediately from OM030; .T. allows screen setup to continue.
Calls at lines 481. (MICHELSEN, 2026).
OM030ABT — OM030
Replaces the Other Actions button array in the request interface. Receives {aNewBot}, already containing the service-order lookup action. The return replaces aNewBot without a type check here. Preserve existing actions and the {resource, block, text} structure. Same interactive conditions as OM030INI.
Calls at lines 491. (MICHELSEN, 2026).
OM030OKN — OM030OKNO
Runs at the end of confirm/cancel handling. Receives {lOperacao}: .T. on confirmation and .F. on cancellation. The return is ignored; OM030OKNO returns lOk. Confirmation does not prove a successful save: earlier validation may fail and still reach this call.
Calls at lines 915. (MICHELSEN, 2026).
OM030ANGR — FS_GRSRVs
Validates before the service-save transaction begins. The source leaves the fourth argument empty with a trailing comma. No explicit payload exists. .F. returns from FS_GRSRVs before Begin Transaction (line 1200); .T. allows continuation. This is not a per-item validator.
Calls at lines 1190. (MICHELSEN, 2026).
OM030DPGR — FS_GRSRVs
Runs after save operations, still inside the transaction. No explicit payload; return ignored. VO1 is selected immediately beforehand. The call precedes End Transaction (line 1773), so it is not a post-commit event. Execution alone does not establish success.
Calls at lines 1770. (MICHELSEN, 2026).
IMPSUBORD — FS_GRSRVs
Replaces default suborder printing in the printing branch. No explicit payload; return ignored. Located after End Transaction, with Len(aColsSrv)#0 in the relevant branch. When present, FS_SUBORDEM() is skipped: an empty hook suppresses default printing. This does not attest an outer transaction commit.
Calls at lines 1797. (MICHELSEN, 2026).
OM030TERC — FS_MOVSRVTERC
Runs in third-party service processing after the branch financial operations. No explicit payload; return ignored. Located within the processing branch after possible FINA050 MSExecAuto calls. FS_MOVSRVTERC returns !lMsErroAuto, not the hook result. Its position does not establish error-free automatic processing.
Calls at lines 2202. (MICHELSEN, 2026).
OM030VTS — FS_SERTEM / FS_SELECIONA
Validates service type and time type in two contexts. PARAMIXB: [1] numeric context (1 in FS_SERTEM, 2 in FS_SELECIONA); [2] service type; [3] time type; [4] lMensagem; [5] lTpo. Context 2 sends .F. in [4] and [5]. .F. stops the calling function; .T. allows its remaining checks. FS_SERTEM lTpSrvBlq is not passed.
Calls at lines 2592, 8718. (MICHELSEN, 2026).
OM030DEL — FS_VALDEL
Validates deletion before native tab restrictions. Receives {nAba}, tab number: 1 for services and 2 for time entries. .F. stops FS_VALDEL; .T. continues native checks. It does not receive cCodSer, cSequencia or lMensagem, even though they are caller arguments.
Calls at lines 2880. (MICHELSEN, 2026).
OM030VAS — FS_ALTSRV
Validates service editing before subsequent checks and writes. No explicit payload. Logical return assigned to lRet: .F. returns immediately; .T. proceeds. Called before the transaction beginning at line 4510. Distinguish it from OM030ADG, which runs inside that transaction.
Calls at lines 4393. (MICHELSEN, 2026).
VERTPGCC — FS_ALTSRV / FS_030VALID / FS_030TUDOK
Controls entry into credit-check branches. Receives {"OFIOM030"}. Its Boolean fills lVerTpgCC. .T. allows credit rules, still gated by MV_CHKCRE and VOI_SITTPO; .F. skips that branch rather than directly rejecting the request. Three calls exist, including one in an FS_030TUDOK loop.
Calls at lines 4488, 5149, 8206. (MICHELSEN, 2026).
OM030ADG — FS_ALTSRV
Runs at the end of edit persistence, before the transaction ends. No explicit payload; return ignored. Located between Begin Transaction (4510) and End Transaction (4727). The source comment mentions a successful edit, but this is not a post-commit event or standalone proof of success.
Calls at lines 4724. (MICHELSEN, 2026).
OM030VLD — FS_030VALID
Adds field validation after memory-variable preparation. Receives {__ReadVar}, the field being validated. Located in the cLinhaField == "F" branch after FG_MEMVAR(). .F. returns before further service or time-entry checks; .T. continues. It is not a universal line-validation callback.
Calls at lines 5023. (MICHELSEN, 2026).
OM030CLG — OM030LEG
Replaces the legend array before color-rule construction or legend display. Receives {aLegenda}. The return replaces the {bitmap, description} pair array; the next code indexes its four original positions. Preserve these positions and pairs. Called both with nReg Nil and with an nReg value.
Calls at lines 6962. (MICHELSEN, 2026).
OM030COR — OM030LEG
Replaces color rules returned to the browse. Receives {uRetorno,aLegenda}. Runs only when nReg == Nil, after four {expression, bitmap, description} rules are built. Returns the rule array, not a single color. The other branch calls BrwLegenda without OM030COR.
Calls at lines 6973. (MICHELSEN, 2026).
ALTTPREQ — FS_ALTTPREQ / OM030VALTT
Validates continuation of request time-type editing. No explicit payload. FS_ALTTPREQ directly returns the hook value; without it, .T. is returned. OM030VALTT tests !FS_ALTTPREQ() at line 4226 and returns .F. on rejection. The consumer therefore requires a Boolean, although the wrapper does not check its type.
Calls at lines 7159. (MICHELSEN, 2026).
OM030ROT — MenuDef
Adds options to the routine main menu. No explicit payload. Only an "A" ValType result is iterated with aEval/aAdd and appended to aRotina. {} preserves the existing menu. A non-array is ignored here; distinguish this from aNewBot replacement in OM030ABT.
Calls at lines 7194. (MICHELSEN, 2026).
OM030TOK — FS_030TUDOK
Applies final additional validation only while lRet remains true. Receives {aClone(aAuxaHeader),aClone(aAuxaCols)}: copies of the auxiliary header and rows used by validation. The logical return replaces lRet, which FS_030TUDOK returns. .F. rejects validation. Editing these copies does not write the original grids through this contract.
Calls at lines 8229. (MICHELSEN, 2026).
How to validate a customization
Under review: static caller analysis; editorial examples neither compiled nor run in Protheus. Confirm includes, dependencies, release and environment patch.
Preserve work areas when adding queries; avoid irreversible external effects and validate interactive and automatic paths separately.
Check validator false/true results, menu and legend array preservation, default-print suppression, both OM030VTS contexts and all three VERTPGCC sites. Exercise failure and rollback without treating OM030DPGR or OM030ADG as external confirmation.

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