Request_Validate - BaseData_Set

Request_Validate sends validation messages to all DDO Field's that will participate in the upcoming save

Type: Function

Return Data Type: Boolean

Parameters: None

Return Value

Returns 0 (zero) if all items are valid, else returns a non-zero value.


Syntax
Function Request_Validate Returns Boolean

Call: Get Request_Validate to BooleanVariable


Description

Request_Validate returns 0 (zero) if all items are valid, else returns a non-zero value.

A DataDictionary object (DDO) save is normally a two step process. First you send Request_Validate to the DDO, to make sure that your data is ready for the save. If your data is valid (Request_Validate returns 0), you then send Request_Save to the DDO to perform the save.

In some cases, you will use objects such as data entry object (DEOs) to handle the entire save for you. In other cases, you will need to write custom code to perform the save. In all cases, the save process itself is the same.

Before a Request_Save is sent to a DDO, the Request_Validate message should be sent to validate that all data is valid for a save. When performing saves with a DEO or using a Web Browser object's high level save, this message is sent for you. If you are performing saves manually within a Batch Process or Web Object, you will need to send this message yourself.

Request_Validate sends validation messages to all DDO Field's that will participate in the upcoming save. If the validation of any field fails, an error is reported and the save will not proceed.

Function SaveCustomer returns Boolean
    Boolean bErr

    Get Request_Validate of oCustomer_DD to bErr
    If Not bErr Begin
       Send Request_Save of oCustomer_DD
       Move (Err) to bErr
    End
    Function_Return bErr
End_Function


Request_Validate will return the handled error 4527 - DFERR_CANT_REFIND_RECORD when records cannot be refound/reread. The intent is to notify the user that someone must have deleted this record since it was last found by the user and that this is not a bug, but normal multi-user behavior when one user deleted a record that another user has pulled up in a view, etc.

It is important that you understand when and how this process occurs.

See Also

Save Operations in DDOs