Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124

整個開發與測試的完整步驟,包含:
launch.json 指定要佈署的測試環境https://businesscentral.dynamics.com/<tenant>/<environment>/在命令列或 VS Code 命令面板 (Ctrl+Shift+P) 輸入:
AL: Go!app.json、launch.json。在專案資料夾下建立新檔案 HelloWorld.al
pageextension 50110 CustomerListExt extends "Customer List"
{
actions
{
addlast(Processing)
{
action(HelloWorld)
{
ApplicationArea = All;
Caption = 'Hello World';
Image = Smile;
trigger OnAction()
begin
Message('Hello World from AL Extension!');
end;
}
}
}
}說明:
Hello World 按鈕。Hello World from AL Extension!。launch.json打開 .vscode/launch.json,確認內容大致如下(修改成你的環境資訊):
{
"configurations": [
{
"name": "Microsoft cloud sandbox",
"request": "launch",
"type": "al",
"environmentType": "Sandbox",
"environmentName": "Your Environment Name",
"startupObjectId": 22,
"startupObjectType": "Page",
"breakOnError": "All",
"launchBrowser": true,
"enableLongRunningSqlStatements": true,
"enableSqlInformationDebugger": true,
"tenant": "Your tenant Code"
}
]
}說明:
startupObjectId: 22 代表 Customer List(系統內建頁面)打開根目錄下的 app.json,確認內容大致如下(修改成你的環境資訊):
{
"id": "9f1d30b1-3f1e-4be7-86e6-6f29091d3120",
"name": "Hello World",
"publisher": "Default Publisher",
"version": "1.0.0.0",
"brief": "",
"description": "",
"privacyStatement": "",
"EULA": "",
"help": "",
"url": "",
"logo": "",
"dependencies": [],
"screenshots": [],
"platform": "1.0.0.0",
"application": "26.0.0.0",
"idRanges": [
{
"from": 50100,
"to": 50149
}
],
"resourceExposurePolicy": {
"allowDebugging": true,
"allowDownloadingSource": true,
"includeSourceInSymbolFile": true
},
"runtime": "15.0",
"features": [
"NoImplicitWith"
]
}在 VS Code 按 F5 或執行 Debug > Start Debugging。
.app 檔
至此,就完成了 第一個 AL Hello World 專案,並且佈署到 Business Central Sandbox 環境。
Business Central 的客製程式建議物件ID 分為兩大類:50,000-99,999 適用於每個客戶/租戶的自訂項目,而 1,000,000-74,999,999 的RSP 或 App Object Range 則用於合作夥伴開發的應用程式,但必須進行授權申請。
針對每個客戶/租戶的自訂(Per-Tenant Customizations)
針對合作夥伴開發的應用程式(ISV Solutions/Extensions)
App Object Range (70,000,000-74,999,999) 最初是為了在Microsoft 商業市集中的應用程式設計,但這兩個範圍的擴充功能都可以在Business Central online 和on-premises 環境中實現。
建議範圍: 1,000,000-69,999,999 (RSP Object Range) 或70,000,000-74,999,999 (App Object Range)。
目的: 適用於合作夥伴開發的獨立軟體供應商(ISV) 解決方案或擴充功能。
重要考量:
若要使用這些範圍進行應用程式開發,您需要向Microsoft 申請授權,Microsoft Learn 指出這是專門為開發者準備的。