bdev.Address Prediction API
The bdev.Address Prediction API codeunit object is providing the Address Prediction functionalities and allows other extensions to integrate.
Properties
Property | Value |
---|---|
Object Type | Codeunit |
Object Subtype | Normal |
Object ID | 5523621 |
Accessibility Level | Public |
Procedures
InitializeAddressPrediction()
Reset and initialize Address Prediction instance.
Syntax
InitializeAddressPrediction()
OnControlAddInReady()
Activate “bdev.Address Autocomplete” Control Add-In on OnControlReady() event.
Syntax
OnControlAddInReady(tableNo: Integer, control: ControlAddIn "bdev.Address Autocomplete")
Parameters
tableNo
Type: Integer
Table No. the Address Prediction is invoked for. Subscribe to OnIsAddressPredictionEnabled(Integer, var Boolean) event in “bdev.Address Prediction” Codeunit to support custom tables.
control
Type: ControlAddIn “bdev.Address Autocomplete”
Control Add-In from the current page.
BindAddressPrediction()
Bind list of fields from current page.
Syntax
BindAddressPrediction(fieldNames: Dictionary of [Text, Enum "bdev.Address Prediction Type"], control: ControlAddIn "bdev.Address Autocomplete")
Parameters
fieldNames
Type: Dictionary of [Text, Enum “bdev.Address Prediction Type”]
Dictionary of fieldnames with their address prediction type. Use type to specify address prediction should look up for address or establishment.
control
Type: ControlAddIn “bdev.Address Autocomplete”
Control Add-In from the current page.
BindAddressPrediction()
Bind list of fields from current page.
All fields will be added as type “Address”.
Syntax
BindAddressPrediction(fieldNames: List of [Text], control: ControlAddIn "bdev.Address Autocomplete")
Parameters
fieldNames
Type: List of [Text]
List of fieldnames.
control
Type: ControlAddIn “bdev.Address Autocomplete”
Control Add-In from the current page.
BindAddressPrediction()
Bind field from current page.
Field will be added as type “Address”.
Syntax
BindAddressPrediction(fieldName: Text, control: ControlAddIn "bdev.Address Autocomplete")
Parameters
fieldName
Type: Text
Fieldname.
control
Type: ControlAddIn “bdev.Address Autocomplete”
Control Add-In from the current page.
BindAddressPrediction()
Bind field from current page.
Syntax
BindAddressPrediction(fieldName: Text, addrPreditionType: Enum "bdev.Address Prediction Type", control: ControlAddIn "bdev.Address Autocomplete")
Parameters
fieldName
Type: Text
Fieldname.
addrPreditionType
Type: Enum “bdev.Address Prediction Type”
Specify address prediction should whether look up for address or establishment.
control
Type: ControlAddIn “bdev.Address Autocomplete”
Control Add-In from the current page.
UnbindAddressPrediction()
Unbind field from current page.
Syntax
UnbindAddressPrediction(fieldName: Text, control: ControlAddIn "bdev.Address Autocomplete")
Parameters
fieldName
Type: Text
Fieldname.
control
Type: ControlAddIn “bdev.Address Autocomplete”
Control Add-In from the current page.
GetAddressPredictions()
Get address predictions based on the given input for specified fieldname.
Syntax
GetAddressPredictions(fieldName: Text, input: Text, control: ControlAddIn "bdev.Address Autocomplete")
Parameters
fieldName
Type: Text
Fieldname.
input
Type: Text
Current input by the user.
control
Type: ControlAddIn “bdev.Address Autocomplete”
Control Add-In from the current page.
GetSelectedAddressPrediction()
Get address dictionary for given address prediction id. Invoke this procedure from OnPredictionSelected(Text, Text) trigger of the control add-in.
Syntax
[Boolean] := GetSelectedAddressPrediction(var address: Dictionary of [Text, Text], addressType: Enum "bdev.Address Prediction Type", id: Text)
Parameters
address
Type: Dictionary of [Text, Text]
Out variable containing address dictionary.
addressType
Type: Enum “bdev.Address Prediction Type”
Specify address prediction type. Select whether address or establishment.
id
Type: Text
Address prediction id.
Return
Boolean
GetAddressType()
Get address prediction type for specified fieldname.
Syntax
[Enum "bdev.Address Prediction Type"] := GetAddressType(fieldName: Text)
Parameters
fieldName
Type: Text
Fieldname.
Return
Enum “bdev.Address Prediction Type”
Return value of type Enum “bdev.Address Prediction Type”.