PdcRelationFile.GetByRelNr

From External Bemet Wiki
Revision as of 12:27, 9 January 2024 by TC (talk | contribs) (Created page with "== 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 <source lang="vb"> Dim aCompany...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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