Skip to Content
0
Feb 16, 2011 at 10:41 AM

How to get the final document number?

169 Views

Hi,

How do I retrieve the document number of a document (e.g. delivery note) that is just added?

Currently, I use the following event listener:

[B1Listener(BoEventTypes.et_FORM_DATA_ADD, false)]

in which I retrieve the document number by reading out the text field on the form:

EditText text = (EditText)form.Items.Item("8").Specific;
string deliveryNoteNumber = text.Value;

This works perfect if only one person is adding documents. But if two persons are posting a document, they both see the same (temporary) document number in the form while entering the data. The latest person who finalizes his document, will get another number than the one that was displayed in the form (because the first person already used that number). So, how can I retrieve the number of a document that is just finalized?

Thank you very much for your help.

Regards,

Pieter Verhaeghe