📚 SAP Business One SDK Help

EndTransaction Method
See Also 
endType

Indicates whether to save the data changes of the transaction.

Description

Ends a global transaction that started with the StartTransaction method.

Syntax

Visual Basic
Public Sub EndTransaction( _
   ByVal endType As BoWfTransOpt _
) 

Parameters

endType
ValueDescription
wf_RollBackRolls back the transaction so that the data is discarded.
wf_CommitCommits the transaction so that the data is saved.

Indicates whether to save the data changes of the transaction.

Remarks

You can only use the StartTransaction and EndTransaction methods when the connection with the database is active.

If an exception occurs when you call EndTransaction, the changes are not committed. To correct this:

  • Troubleshoot and fix the exception.
  • Call StartTransaction.
  • Resubmit the changes (by calling the Add, Update, and Delete methods).
  • Call EndTransaction.

Example

See Also