What if you could manage your entire fixed asset lifecycle — acquisitions, depreciation, and disposals with automatic gain/loss calculation — just by handing an AI a spreadsheet and a few instructions?
That’s exactly what we (me and Claude) did. Using Claude Code with the Model Context Protocol (MCP) connected to Business Central, we went from a CSV file of fixed assets to fully posted acquisitions, depreciation entries, and asset disposals — all driven by natural language prompts.
Here’s the complete, reproducible path.
Prerequisites
- Business Central environment with API access (OAuth2 client credentials)
- Claude Code with an MCP server connected to BC (see setup guide)
- The standard MCP tools:
bc_list_fixed_assets,bc_list_companies,bc_query, etc.
1 Enable OData V4 Web Services in Business Central
The standard BC API v2.0 gives you basic fixed asset data (/fixedAssets, /fixedAssetLocations), but it cannot:
- Assign depreciation books to assets
- Create FA journal entries with FA-specific fields (FA Posting Type, Depreciation Book Code)
- Read depreciation details (book value, accumulated depreciation, depreciation method)
To unlock these capabilities, publish three OData V4 web services in BC:
Web Services Setup
In BC, search for Web Services and add these rows:
| Object Type | Object ID | Object Name | Service Name | Published |
|---|---|---|---|---|
| Page | 5619 | FA Depreciation Books | FADepBooks | Yes |
| Query | 123 | Analyse Fixed Assets | FAAnalysis | Yes |
| Page | 5611 | Depreciation Book Card | DepBooks | Yes |
workflowGenJournalLines OData V4 endpoint is already available without any setup. This is the key endpoint for creating FA G/L Journal entries with full FA-specific fields.
2 Prepare Your Input (CSV)
Instead of navigating BC screens for each asset, prepare a simple CSV file:
fa_transactions.csv
The Prompt
- Assign the COMPANY depreciation book with Straight-Line depreciation
- Create acquisition journal entries with the balancing G/L account 18400
- After I post the acquisitions, run Calculate Depreciation up to the Depr_Until date
- Show me the final book values via FAAnalysis
3 Claude Assigns Depreciation Books (via FADepBooks)
For each asset, Claude makes three API calls to the FADepBooks endpoint. This multi-step approach is needed because BC validates fields sequentially during insert:
Depreciation_Starting_Date is set before accepting No_of_Depreciation_Years. A single POST with all fields fails because BC applies fields sequentially during insert — the date isn’t set yet when the years field is validated.
Result: All 9 Assets with Depreciation Books
BC automatically calculated the ending date (2028-12-31) from the starting date + 5 years.
4 Claude Creates Acquisition Journal Lines (via workflowGenJournalLines)
For each asset, Claude creates a journal line in the FA G/L Journal using the built-in OData V4 endpoint:
POST /ODataV4/Company('CRONUS USA, Inc.')/workflowGenJournalLines
{
"journalTemplateName": "ASSETS",
"journalBatchName": "DEFAULT",
"lineNumber": 10000,
"accountType": "Fixed Asset",
"accountNumber": "FA000020",
"postingDate": "2024-01-01",
"faPostingDate": "2024-01-01",
"documentType": "Invoice", // Required!
"documentNumber": "FA-ACQ-002",
"description": "Acquisition - Toyota Supra 3.0",
"faPostingType": "Acquisition Cost", // Not in standard API!
"depreciationBookCode": "COMPANY", // Not in standard API!
"balAccountType": "G/L Account", // Required!
"balAccountNumber": "18400", // Required!
"amount": 55000
}
Critical Fields
| Field | Value | Why |
|---|---|---|
documentType | "Invoice" | Required — without this, posting fails |
balAccountNumber | "18400" | Offsetting G/L account (found from existing G/L entries) |
faPostingType | "Acquisition Cost" | FA-specific field not available in standard API v2.0 |
depreciationBookCode | "COMPANY" | Links to the depreciation book assigned in Step 3 |
journalLines endpoint does not expose faPostingType or depreciationBookCode. The built-in workflowGenJournalLines OData V4 endpoint does — it exposes the full Gen. Journal Line table with all FA fields.
Result: 9 Journal Lines Ready to Post
5 Post Acquisitions (BC UI)
The OData V4 endpoint does not expose a Post action for FA G/L Journals — the posting codeunit is not published as a web service by default.
- Search for Fixed Asset G/L Journal
- Select batch DEFAULT (ASSETS template)
- Verify the journal lines are present
- Click Post → Confirm
6 Post Depreciation (BC UI)
Rather than calculating depreciation amounts manually, use BC’s built-in Calculate Depreciation batch job:
- Search for Calculate Depreciation
- Set:
- Depreciation Book: COMPANY
- FA Posting Date: 2026-02-05
- Posting Date: 2026-02-05
- Document No.: DEPR-2026
- Choose the Bal. Account per posting group:
- VEHICLES → G/L Account 82000 (Depreciation, Fixed Assets)
- EQUIPMENT → G/L Account 66200 (Depreciation, Equipment)
- Run the batch job → journal lines are created with BC-calculated amounts
- Post the journal
7 Claude Verifies via FAAnalysis
After posting, Claude reads the FAAnalysis OData V4 endpoint to show the complete picture:
All 9 assets show 41.9% depreciated — exactly right for ~2 years of 5-year Straight-Line depreciation (Jan 2024 to Feb 2026).
8 Asset Disposal with Gain/Loss (via workflowGenJournalLines)
The lifecycle continues. After 2 years of depreciation, it’s time to sell some assets. Claude can create disposal journal entries that BC will use to calculate gain or loss automatically.
The Disposal Prompt
Current Book Values & Expected Gain/Loss
| Asset | Book Value | Sale Price | Result |
|---|---|---|---|
| FA000090 (Switchboard) | $8,500 | $5,000 | LOSS $3,500 |
| FA000060 (Conveyor Computer) | $15,000 | $18,000 | GAIN $3,000 |
Claude Creates Disposal Journal Lines
For each asset sale, Claude POSTs to workflowGenJournalLines with faPostingType: "Disposal":
POST /ODataV4/Company('CRONUS USA, Inc.')/workflowGenJournalLines
{
"journalTemplateName": "ASSETS",
"journalBatchName": "DEFAULT",
"lineNumber": 10000,
"accountType": "Fixed Asset",
"accountNumber": "FA000090",
"postingDate": "2026-02-05",
"faPostingDate": "2026-02-05",
"documentNumber": "FA-SALE-001",
"description": "Sale of Switchboard",
"faPostingType": "Disposal", // NOT "Proceeds on Disposal"!
"depreciationBookCode": "COMPANY",
"balAccountType": "G/L Account",
"balAccountNumber": "18400", // Bank/Cash account
"amount": -5000 // Negative = proceeds
}
Critical Fields for Disposal
| Field | Value | Why |
|---|---|---|
faPostingType | "Disposal" | NOT “Proceeds on Disposal” — API uses different enum values than the UI |
amount | Negative | The sale proceeds (credit to cash/bank) |
balAccountNumber | "18400" | The bank/cash account receiving the proceeds |
depreciationBookCode | "COMPANY" | Must match the depreciation book used for the asset |
Result: 2 Disposal Lines Ready
9 Post Disposals (BC UI)
- Search for Fixed Asset G/L Journal
- Select batch DEFAULT (ASSETS template)
- Verify the 2 disposal lines are present
- Click Post → Confirm
BC automatically:
- Calculates gain/loss based on book value vs. proceeds
- Posts to the Gains and Losses G/L account (defined in FA Posting Group)
- Credits the bank account with sale proceeds
- Closes out the asset’s acquisition cost and accumulated depreciation
After Posting: Verify via FAAnalysis
The Complete Fixed Asset Lifecycle
API Endpoints Summary
| What | Endpoint | Type | Used For |
|---|---|---|---|
| List fixed assets | /fixedAssets | Standard API v2.0 | Reading asset master data |
| Assign depr. books | /FADepBooks | OData V4 (Page 5619) | Writing FA Depreciation Book records |
| Create journal lines | /workflowGenJournalLines | OData V4 (built-in) | Writing FA G/L Journal lines (acquisitions, disposals) |
| Read FA analysis | /FAAnalysis | OData V4 (Query 123) | Reading posted entries with book values |
| Read depr. books | /DepBooks | OData V4 (Page 5611) | Reading depreciation book definitions |
| Read G/L entries | /G_LEntries | OData V4 (built-in) | Finding balancing G/L accounts |
| Read Chart of Accounts | /Chart_of_Accounts | OData V4 (built-in) | Finding depreciation expense & gain/loss accounts |
Key Lessons Learned
Standard API v2.0 Can’t Handle FA Transactions
The journalLines endpoint does not expose faPostingType or depreciationBookCode. Posting FA acquisitions through it fails with “FA Posting Type must not be blank.” Use the OData V4 workflowGenJournalLines instead.
OData V4 Insert Requires Multi-Step PATCH for Some Pages
The FADepBooks page validates fields sequentially. You can’t POST all fields at once — the depreciation starting date must be set before the number of years. Solution: POST keys → PATCH date → PATCH remaining fields.
Document Type and Balancing Account Are Required
Journal lines without documentType: "Invoice" and a balAccountNumber will fail to post. Check existing G/L entries for a posted FA transaction to find the correct balancing account.
Let BC Calculate Depreciation
Don’t compute depreciation amounts manually. BC’s Calculate Depreciation batch job handles rounding, accounting periods, and leap years correctly. Use the API to create acquisitions, but let BC handle depreciation calculations.
FA Posting Type Values Differ from UI Labels
The API uses "Disposal" not "Proceeds on Disposal". Always check the error message — BC helpfully lists the valid options: Acquisition Cost, Depreciation, Write-Down, Appreciation, Custom 1, Custom 2, Disposal, Maintenance.
Gain/Loss is Automatic
You don’t need to calculate or post gain/loss separately. When you post a disposal entry, BC automatically compares book value to proceeds, posts the difference to the appropriate gain/loss account, and closes out the asset’s ledger entries.
Posting Still Requires BC UI — And That’s a Good Thing
The OData V4 endpoints for journal pages don’t expose a “Post” bound action — the posting codeunit bindings are simply not published as web services. Journal lines are created via the API but must be posted through the BC user interface. Far from being a limitation, this is a valuable safety net: a human operator reviews exactly what the AI produced, verifies the amounts and accounts, and only then commits the entries to the ledger. We still require a human to oversee what was produced.
Complete Workflow Summary
| Step | Who | What |
|---|---|---|
| 1 | Human | Prepare CSV with asset data |
| 2 | Claude | Assign depreciation books (FADepBooks) |
| 3 | Claude | Create acquisition journal lines (workflowGenJournalLines) |
| 4 | Human | Post acquisitions in BC UI |
| 5 | Human | Run Calculate Depreciation in BC |
| 6 | Human | Post depreciation journal in BC UI |
| 7 | Claude | Create disposal journal lines (workflowGenJournalLines) |
| 8 | Human | Post disposals in BC UI |
| 9 | Claude | Verify final state via FAAnalysis |
Total API endpoints used: 4 (FADepBooks, workflowGenJournalLines, FAAnalysis, Chart_of_Accounts)
Human oversight points: 4 (all posting steps)
Automation potential: ~70% of the workflow
What’s Next
With this foundation, you could build:
- Bulk asset onboarding from CSV/Excel files
- Automated month-end depreciation workflows
- Mass disposal processing for end-of-life equipment
- Real-time asset reporting using FAAnalysis queries
- Asset revaluation via write-up/write-down journal entries
- Insurance claim processing for damaged assets
The combination of Claude’s natural language understanding and BC’s OData V4 web services turns fixed asset accounting from a multi-screen, multi-click process into a conversation.
This guide was produced through approximately 4–5 hours of hands-on prompting, analyzing API responses, diagnosing failures, and iterating on solutions — all in collaboration with Claude. Every endpoint discovery, every multi-step workaround, and every lesson learned emerged from that real-time back-and-forth between a human operator and an AI agent connected to a live Business Central environment.
This entire guide was produced with zero lines of new AL code. That’s both a feature and a limitation. We relied entirely on Business Central’s built-in OData web services and standard API pages—which is powerful for read operations and simple queries, but also constrains what’s possible. If you need custom endpoints, bound actions for posting documents, or tighter integration with BC’s business logic, you’ll need to roll up your sleeves and write some AL code.


2 Responses