Community

Unique ID for a recognized document

Hi All,

I am looking for a way to access the document id after recognized. I need to write it in a database during the export of the data. Can anyone help?

Was this article helpful?

0 out of 0 found this helpful

Comments

6 comments

  • Avatar
    Vladimir Dimitrijević

    Hi,

    Are you using custom script in a workflow stage, or export out of document definition?

     

    Best regards,

    Vladimir

    0
  • Avatar
    Permanently deleted user

    Well, currently i am trying with a custom script/rule for a custom field and searching for such value. If there is such value at all I should be able to get it by a rule, at least I hope so...

    0
  • Avatar
    Vladimir Dimitrijević

    Hi,

    Yes, there is. If you are using "Batch processing" type of script, then you would go with:

    foreach (IDocument document in Documents) {

    string documentId = document.Id;

    ...

    }

     

    Best regards,

    Vladimir

    0
  • Avatar
    Permanently deleted user

    In fact, there are two different situations for the values that are written in the IDocument :: Id property.
    If the documents are assembled by the layout, then IDocument :: Id is just the string representation of document's number in the batch (equals to IDocument :: Index)
    If the documents are assembled by barcodes, then IDocument :: Id is the same as barcode value. In this case to get the unique number of a document a hidden property IDocument :: InternalId can be used.

    0
  • Avatar
    Permanently deleted user

    Hi Ekaterina,

     I am using FC12 for invoices if that excludes somе of the proposed solutions. 

    Can I access this internalID value from a rule in Document Definition to map it to a field?

    0
  • Avatar
    Permanently deleted user

    Hello,

    Due to changes made to object model of FC12, the InternalId will not work as document index in the batch, however it will be still a unique document identifier. 

    You may use Service Field "Document Number" or Context.Document.Pages[0].Id.ToString() to get document's number in the batch.

    0

Please sign in to leave a comment.