PdcPurchaseInvoices.Active

From External Bemet Wiki
Revision as of 07:09, 16 April 2014 by TC (talk | contribs)
Jump to navigation Jump to search

Declaration

Active as PdcPurchaseInvoiceHeader

Description

The active purchase invoice is returned in an object.

Notes

After you changes some data in the invoice, you have to call refresh. After calling refresh the invoice form is updated with the object data.

Code example

This example changes the invoice number, invoice date and save the changes of the active/opened invoice in PdC

dim objPI
 
  set objPI = Pdc.logistics.PurchaseInvoices.Active
  if IsValid(objPI) then
    objPI.InvoiceNo = "12345"
    objPI.InvoiceDate = Date - 2
    objPI.Save
    objPI.Refresh
  else
    msgbox "No invoice opened in PdC."
  end if

Availability