Sets or returns the number of the document.
Field name: DocNum.
Sets or returns the number of the document.
Field name: DocNum.
| Visual Basic |
|---|
Public Property DocNum() As Long |
In case the value of the HandWritten property is tNO and you add a sales document, SAP Business One automatically assigns the next available number to the document, in accordance with the document numbering system defined during system configuration.
When saving the document as a draft, this number is stored for the document draft only. So that the number of the draft is still available in the system for other new documents. The system may assign this number to a new document of the same type. When saving the draft as a document, SAP Business One assigns a new available number.
In case the value of the HandWritten property is tYES, set a value (greater than 0) to the DocNum property and also set the Series property to -1.