PdcRelationFile.GetByRelNr

From External Bemet Wiki
Jump to navigation Jump to search

Declaration

GetByRelNr(RelNr As String) as PdcCompany

Description

Create a Company object based on a relation number.

Notes

This function will return Nothing if the relation number can not be found, or if an error occurs while reading it. An error message will be stored in the LastError property

Code example

This example code tries to retrieve a company object, and will display an error message if it fails

Dim aCompany As PDCEXT.ICompany = PDC.App.MasterData.RelationFile.GetByRelNr("00460")
If IsNothing(aCompany) Then
    MsgBox(PDC.App.LastError)
End If

Availability

Available since 2024R1