PdcRelationFile.GetByID

From External Bemet Wiki
Jump to navigation Jump to search

Declaration

GetByID(ID As Long) as PdcCompany

Description

Create a Company object based on a company pid.

Notes

This function will return Nothing if the pid 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.GetByID(156)
If IsNothing(aCompany) Then
    MsgBox(PDC.App.LastError)
End If

Availability

Available since 2024R1