Páginas filhas
  • ATFA036 - Data validation of form for asset posting and asset posting cancellation

 

Description

Routine ATFA036 has an entry point for validating the data of the form for asset posting and asset posting cancellation.

Notes

Saving point of total validation of form (Form + grid).  It replaces the entry point AF030VBX of routine ATFA030.

Examples

/*/{Protheus.doc} ATFA036

Saving point of total validation of form (Form + grid) Replacing the entry point AF030VBX of routine ATFA030.

@author TOTVS @since 05/05/2014 @version 1.0 /*/ User Function ATFA036 Local aParam := PARAMIXB // Vector with parameters received by entry points of asset posting routine.

Local lRet := .T. // Return variable of entry points of asset posting routine. Local oObj := aParam[1] // Object of Data Model of asset posting routine. Local cIdPonto := aParam[2] // Identifier of entry point to be called through function ATFA036 of asset posting routine. Local cIdModel := IIf( oObj<> NIL, oObj:GetId(), aParam[3] ) // Identifier of Data Model of asset posting routine (ATFA036) 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

ATFA036.PRW