Business Assistant
Language support for Business Assistant .ba files in VS Code.
A folder with ba.json is a Business Assistant project. .ba files describe pages, profiles, and role centers using unquoted field names, enums, and symbols. Strings must use single quotes. Double quotes wrap a symbol that is not a plain identifier.
Features
- Syntax highlighting for field names, enums, symbols, strings, and numbers
- Completions and hover docs for pages, profiles, and role centers
- Go to Definition on page names such as
CardPage, DialogPage, SubPage, and DrillDownPage
- Snippets:
page, profile, rolecenter, control, field
- Format Document
- From Json converts a JSON page, profile, or role center to BA and renames
.json to .ba
- Convert All To BA converts matching JSON files in the project
- Rename Files names
.ba files from kind, id, and name
- Package renames
.ba files, then builds a {AppName}.app zip (includes ba.json and the pages, profiles, and role centers)
- Publish packages the app and uploads that
.app file to your Business Assistant server
- Download Symbols fetches table metadata from the server into
.bapackages for page completions, hover, and validation
Project settings
Create ba.json in the project root:
{
"id": "98925f90-a0cc-4ad9-8d1d-d1153116dc99",
"name": "Finance",
"publisher": "Passioncloud",
"version": "1.0.0.0",
"homepage": "https://passioncloud.net",
"idRange": [
{ "from": 1, "to": 5000 }
]
}
Put the API connection in .vscode/launch.json so credentials are not packed into the app:
{
"baseUrl": "https://localhost:5001/api",
"username": "admin",
"password": "secret"
}
Then run Business Assistant: Download Symbols from the Command Palette, then Business Assistant: Package or Business Assistant: Publish.
id, name, publisher, version, and homepage are packed into {AppName}.app with the pages, profiles, and role centers. Page, profile, and role center Id values must fall in idRange. Publish sends that .app file to {baseUrl}/Publish.
Downloaded symbols and packaged apps are stored in .bapackages/ next to ba.json as zip files, not as readable JSON — for example Finance.app. The folder is hidden in VS Code by default. Add .bapackages/ to your project .gitignore. After symbols are downloaded, page SourceTable values and field names are completed and validated against the server tables.
Example
Page {
Id: 30
Name: 'Item'
Caption: 'Item'
PageType: Card
SourceTable: Item
PageActions: []
PageControls: [
{
ControlType: Group
Caption: 'Item'
Fields: [
{ Name: No }
{ Name: Description }
]
}
]
}
Table and field names (SourceTable, control Name, FieldName, RelatedFieldName) are symbols. Write SourceTable: Customer, or use double quotes when the name is not a plain identifier: Name: "No.". Page references use the page name the same way: CardPage: GLAccountCard or Page: "Chart of Accounts". Double quotes around a symbol are part of the name syntax, not a string. String properties such as Name and Caption use single quotes: Name: 'Item List'.
Press Ctrl+Space for completions. Hover a field for its documentation. Hover or Ctrl+Click a page name such as CardPage: GLAccountCard to see and open that page. Use Format Document to pretty-print BA. Format also rewrites older CardPageId / PageId keys to CardPage / Page, and double-quoted strings to single quotes.