acadon_client.connector samples
To use the samples follow the following steps:
- create a new BC extension
- add the acadon_client.connector extension as dependency:
"dependencies": [
{
"appId": "51f73749-16c5-4ec1-9264-17684f89f768",
"publisher": "acadon AG",
"name": "acadon_client.connector",
"version": "1.0.0.0"
}
],
- register the LUA script as a function. This can be done by using the dev extension or using a install codeunit:
codeunit 50000 "ACA - Sample Install"
{
Subtype = Install;
trigger OnInstallAppPerDatabase()
var
ACCFunction: Record "ACA - ACC Function";
TempBlob: Record TempBlob temporary;
CRLF: Text;
begin
CRLF[1] := 13;
CRLF[2] := 10;
// Write LUA script to TempBlob
TempBlob.WriteTextLine('import(''System.IO'')' + CRLF);
TempBlob.WriteTextLine('import(''System'',''System.Diagnostics'')' + CRLF);
...
ACCFunction.InsertFunction(50000, 'Sample', TempBlob);
end;
}
- add an object to execute the AL code.
- publish and install the extension.
- Done!