ISInvoiceFilter.StartFromId

Description

This filter property is used to load the invoices starting from the specified invoice ID.

Syntax

object.StartFromId

Part Attribute Type Description
object Required
The object always implements the ISInvoiceFilter interface

Return Value

int

Example

Display the number of the invoices loaded on the basis of the selected filter and some information about them.

Dim aFilter
Dim aInvoices, aInvoice
Dim aLastId
Dim aTotalCount 
Dim aMessage
Dim i    

Set aFilter = Profile.CreateInvoiceFilter
aFilter.StartFromId = 0
aFilter.MaxCount = 3 'the size of the batch

aLastId = 0
aTotalCount = 0
do
  set aInvoices = aFilter.Load

  for i = 0 to aInvoices.Count - 1
    set aInvoice = aInvoices.Items(i)
    aMessage = aMessage & (i + 1) & ". " &_
      "Date: " & aInvoice.Date & vbNewLine &_
      "    ID: " & aInvoice.ID & vbNewLine &_
      "    GUID: " & aInvoice.GUID & vbNewLine &_
      "    Pos Code: " & aInvoice.PosCode & vbNewLine &_  
      "    Get DT Modified: " & aInvoice.GetDTModified & vbNewLine &_  
      "    Patient: " & aInvoice.Patient.SurnameFirstName & vbNewLine     

    aTotalCount = aTotalCount + 1 
    
    if aInvoice.Id > aLastId then aLastId = aInvoice.Id   
  next 
     
  aFilter.StartFromId = aLastId + 1
  aMessage = aMessage & vbNewLine
loop until aInvoices.Count = 0

aMessage = "Invoices Count = " & aTotalCount & vbNewLine & aMessage   

Profile.MsgBox(aMessage)   
Note:

In Profile Client v8 on User Interface ID cannot be found, but Invoices can be found in Financial > Audit Transactions > Invoices.

Version information

Added in v8.4.0