Validates the data set in the order's properties against cross-property business rules. If any errors are found, Validate
will return false and the Asi.iBO.Errors property should be checked for details. Validate can be called at any
time to check for errors but it will automatically be called at save time.
Namespace:
Asi.iBO.CommerceAssembly: Asi.iBO (in Asi.iBO.dll) Version: 15.1.2.0
Syntax
| C# |
|---|
public override bool Validate() |
| Visual Basic (Declaration) |
|---|
Public Overrides Function Validate As Boolean |
| Visual C++ |
|---|
public: virtual bool Validate() override |
Return Value
True if the Order passes all business rules or only warnings are found, false if any errors are found.
Remarks
Warnings will be recorded in the Errors property but won't cause this method to return false.
If OrderTypeCode or Batch are not set, an error is generated.
If the Ship-to contact or address is not valid, an error is generated.
If the CStandardOrder has no order lines an error is generated.
If thePayment is not either zero or the full amount, or is not valid, an error is generated.
If the Balance is negative, an error is generated.