PdcPurchaseInvoiceHeader.SetRelationNo: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == SetRelationNo(strRelNr) == Description == Sets the relationnumber of the purchase invoice header. == Notes == The relation number is a mandatory property w..."
 
No edit summary
Line 1: Line 1:
== Declaration ==
== Declaration ==
SetRelationNo(strRelNr)
SetRelationNo(strRelNr) as boolean


== Description ==
== Description ==
Line 7: Line 7:
== Notes ==
== Notes ==
The relation number is a mandatory property when creating a purchase invoice header.
The relation number is a mandatory property when creating a purchase invoice header.
Relation number must exist in the relation table of PdC.


== Code example ==
== Code example ==

Revision as of 10:09, 19 August 2015

Declaration

SetRelationNo(strRelNr) as boolean

Description

Sets the relationnumber of the purchase invoice header.

Notes

The relation number is a mandatory property when creating a purchase invoice header. Relation number must exist in the relation table of PdC.

Code example

The following code example creates a new purchase invoice, sets a relation (mandatory!), invoice no, invoice date and saves the purchase invoice. 

<source lang="vb">
dim objPI

  set objPI = Pdc.logistics.PurchaseInvoices.New
  if objPI.SetRelationNo("00224") then
    objPI.InvoiceNo = "12345"
    objPI.InvoiceDate = Date - 2
    if not objPI.Save then
      msgbox objPI.ErrorMessages
    end if
  else
    msgbox objPI.ErrorMessages
  end if

Availability

Available since April 2014 (Version 4.3 onwards)