📚 SAP Business One SDK Help

GetByKey Method
See Also 
lAbsEntry

For vesrions prior to 2007 A, use DocumentNumber property.

From version 2007 A, use AbsoluteEntry property.

Historically the GetByKey method for production order got the DocumentNumber property Field name: DocNum) as an input, different from any other document that got the DocEntry as an input.

Starting from SAP Business One 2007 A release the GetByKey for production order gets as an input the AbsoluteEntry property Field name: DocEntry), like any other document.

Description

Retrieves and sets the values of the object's properties by the object's absolute key from the Company database.

Syntax

Visual Basic
Public Function GetByKey( _
   ByVal lAbsEntry As Long _
) As Boolean

Parameters

lAbsEntry

For vesrions prior to 2007 A, use DocumentNumber property.

From version 2007 A, use AbsoluteEntry property.

Historically the GetByKey method for production order got the DocumentNumber property Field name: DocNum) as an input, different from any other document that got the DocEntry as an input.

Starting from SAP Business One 2007 A release the GetByKey for production order gets as an input the AbsoluteEntry property Field name: DocEntry), like any other document.

Return Type

If the object with the key you specified is found, the method returns True and the properties of the object will be filled with object's data.

If the object with the key you specified is not found, the method returns False and the properties of the object remain unchanged.

Remarks

To use this method you must specify the object key.

You can also use this method to find whether or not there is an object related to the key you specify.

If you do not know the object key, you can use the DataBrowser object to retreive an object using more complex queries.

Example

See Also