Product: | TOTVS Backoffice |
Product Line: | Protheus Line |
Industry: | Services |
Module: | TOTVS Backoffice (Protheus Line) - Fixed Assets (SIGAFIS) |
Function: | ATFA250 |
Country: | Brazil |
Ticket: | Internal |
Requisite/Story/Issue | DSERCTR1-46030 |
Entry Point AF250TOK is enabled upon finishing the processing of a data screen within the routine ATFA250, responsible for analyzing the values and consistency of information entered by the user. You can use it to perform additional validations in accordance with the company's criterion, whether you save the data or not.
If ExistBlock('AF250TOK') If !ExecBlock( 'AF250TOK', .f., .f., {@aAF250Imp,@aAF250Desc,@aAF250DOri} ) Return .F. EndIf EndIf
User Function AF250TOK() // Variables received via PARAMIXB Local aAF250Imp := PARAMIXB[1] // Array with tax data Local aAF250Desc := PARAMIXB[2] // Array with descriptions Local aAF250DOri := PARAMIXB[3] // Array with original descriptions Local i := 0 Local j := 0 Local lRet := .T. // Example of use For i := 1 to Len(aAF250Imp) // Here you can implement the logic that validates the data of array aAF250Imp If Empty(aAF250Imp[i][1]) lRet := .F. // If any field is blank, it returns false EndIf Next // Logic for handling of aAF250Desc and aAF250DOri, if needed For j := 1 to Len(aAF250DOri) // Example of a possible validation If aAF250DOri[j][7] == 0 lRet := .F. // Return false if it finds a description not attributed EndIf Next Return lRet
Important !!