Páginas filhas
  • ATFA036L - Full Validation of Form for Asset Posting in Batches (Form + grid)



Description

Entry Point ATFA036L performs the full validation of form for asset posting in batches (Form + grid).

Notes

It substitutes entry point AF030VLBX of routine ATFA030 and entry point AF035BLBX of routine ATFA035.

Examples

#Include 'Protheus.ch'
#Include 'FWMVCDef.ch'
/*/{Protheus.doc} ATFA036L
@author TOTVS
@since 06/05/2014
@version 1.0
/*/
User Function ATFA036L
Local aParam := PARAMIXB // Vector with parameters received by entry points of routine for posting assets in batches.
Local lRet := .T. // Return variable of entry points of routine for asset posting in batches.
Local oObj := aParam[1] // Object of Data Model of routine for asset posting in batches.
Local cIdPonto := aParam[2] // Identifier of entry point to be called through function ATFA036L of asset posting routine.
Local cIdModel := IIf( oObj<> NIL, oObj:GetId(), aParam[3] ) // Identifier of Data Model of routine for asset posting in batches. (ATFA036L)
Local cClasse := IIf( oObj<> NIL, oObj:ClassName(), '' ) // Name of class used in routine (FWFORMFIELD - Form, FWFORMGRID - Grid)
Local nOperation := 0
/*

·   Checking whether the data model is active for using data from the asset posting routine before running entry point procedures.
*/
If oObj != Nil .AND. oObj:IsActive()
/*

·   Editing Mode in Routine (4-Posting, 5-Cancellation)
*/
nOperation := oObj:GetOperation()
/*

·   Checking whether the Entry Point Identifier is Processed before the Saving of Data (Commit)
*/ If cIdPonto == "MODELPOS"
/*

·   Saving of Posting
*/
If nOperation == MODEL_OPERATION_UPDATE
Help("" ,1, "MODELPOS",,"Entry Point Executed to validate after confirmation of form for saving the record of asset posting." ,1,0)
lRet := .F.
/*

·   Saving of Posting Cancellation
*/
ElseIf nOperation == MODEL_OPERATION_DELETE
Help("" ,1, "MODELPOS",,"Entry Point Executed to validate after confirmation of form for saving the record of asset posting cancellation." ,1,0)
lRet := .F.
EndIf
EndIf
EndIf
Return lRet

Language

Portuguese(Brazil)

Versions

Microsiga_Protheus12

Operating Systems Supported

All

Compatible with the following Databases

TOTVSDBAccess

Return

Logic Return (lRet := (.T./.F.) )

Source Program

ATFA036L.PRW