Fixed Asset Accounting from a Prompt: Claude MCP Meets Business Central

Share This Post

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.

CSV Input FA No, Description, Amount, Dates… Claude Code + MCP Server 1. Reads CSV 2. Assigns depreciation books → FADepBooks → workflowGenJournalLines 3. Creates acquisition journals → FAAnalysis OData V4 Web Services Business Central ☑ Post acquisitions (FA G/L Journal) ☑ Calculate Depreciation (batch job) ☑ Post depreciation journal Result FA Ledger Entries

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 TypeObject IDObject NameService NamePublished
Page5619FA Depreciation BooksFADepBooksYes
Query123Analyse Fixed AssetsFAAnalysisYes
Page5611Depreciation Book CardDepBooksYes
Note on Query 123: The Analyse Fixed Assets query (Object ID 123) is a relatively recent addition by Microsoft to the Business Central base application. It consolidates FA ledger entry data with depreciation details into a single queryable dataset — making it ideal for API-driven reporting without needing to join multiple tables manually.
Built-in endpoint: The 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.
OData V4 Endpoints Used FADepBooks Page 5619 Assign depr. books Read/Write workflowGen JournalLines Built-in Create FA journals Read/Write FAAnalysis Query 123 FA ledger + depr. data Read-only DepBooks Page 5611 Depr. book master Read-only OData V4 URL pattern: /v2.0/{tenant}/{env}/ODataV4/Company(‘{company}’)/{serviceName} Standard API v2.0 /fixedAssets and /fixedAssetLocations — read-only asset master data (no FA posting fields)

2 Prepare Your Input (CSV)

Instead of navigating BC screens for each asset, prepare a simple CSV file:

fa_transactions.csv

FA_No,Description,Subclass,Transaction,Amount,Posting_Date,Depr_Method,Depr_Years,Depr_Until FA000010,Mercedes 300,VEHICLES,Acquisition,45000,2024-01-01,Straight-Line,5,2026-02-05 FA000020,Toyota Supra 3.0,VEHICLES,Acquisition,55000,2024-01-01,Straight-Line,5,2026-02-05 FA000030,VW Transporter,VEHICLES,Acquisition,35000,2024-01-01,Straight-Line,5,2026-02-05 FA000040,Conveyor Main Asset,EQUIPMENT,Acquisition,120000,2024-01-01,Straight-Line,5,2026-02-05 FA000050,Conveyor Belt,EQUIPMENT,Acquisition,25000,2024-01-01,Straight-Line,5,2026-02-05 FA000060,Conveyor Computer,EQUIPMENT,Acquisition,15000,2024-01-01,Straight-Line,5,2026-02-05 FA000070,Conveyor Lift,EQUIPMENT,Acquisition,18000,2024-01-01,Straight-Line,5,2026-02-05 FA000080,Lift for Furniture,EQUIPMENT,Acquisition,42000,2024-01-01,Straight-Line,5,2026-02-05 FA000090,Switchboard,EQUIPMENT,Acquisition,8500,2024-01-01,Straight-Line,5,2026-02-05

The Prompt

Read the attached CSV. For each fixed asset:
  1. Assign the COMPANY depreciation book with Straight-Line depreciation
  2. Create acquisition journal entries with the balancing G/L account 18400
  3. After I post the acquisitions, run Calculate Depreciation up to the Depr_Until date
  4. 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:

1 POST keys FA_No: “FA000020” Depr_Book: “COMPANY” 201 Record created 2 PATCH date Depr_Starting_Date: “2024-01-01” 200 Date set 3 PATCH details FA_Posting_Group: “VEHICLES” No_of_Depr_Years: 5 200 Complete!
Why 3 calls? BC validates that 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

FA No Book Group Method Years Start End ──────────────────────────────────────────────────────────────────────────── FA000010 COMPANY VEHICLES Straight-Line 5 2024-01-01 2028-12-31 FA000020 COMPANY VEHICLES Straight-Line 5 2024-01-01 2028-12-31 FA000030 COMPANY VEHICLES Straight-Line 5 2024-01-01 2028-12-31 FA000040 COMPANY EQUIPMENT Straight-Line 5 2024-01-01 2028-12-31 FA000050 COMPANY EQUIPMENT Straight-Line 5 2024-01-01 2028-12-31 FA000060 COMPANY EQUIPMENT Straight-Line 5 2024-01-01 2028-12-31 FA000070 COMPANY EQUIPMENT Straight-Line 5 2024-01-01 2028-12-31 FA000080 COMPANY EQUIPMENT Straight-Line 5 2024-01-01 2028-12-31 FA000090 COMPANY EQUIPMENT Straight-Line 5 2024-01-01 2028-12-31

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

FieldValueWhy
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
Key discovery: The standard BC API v2.0 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

FA No Doc Type Doc No Bal Acct Amount Description ───────────────────────────────────────────────────────────────────────── FA000010 Invoice FA-ACQ-001 18400 45,000 Acquisition – Mercedes 300 FA000020 Invoice FA-ACQ-002 18400 55,000 Acquisition – Toyota Supra 3.0 FA000030 Invoice FA-ACQ-003 18400 35,000 Acquisition – VW Transporter FA000040 Invoice FA-ACQ-004 18400 120,000 Acquisition – Conveyor, Main Asset FA000050 Invoice FA-ACQ-005 18400 25,000 Acquisition – Conveyor Belt FA000060 Invoice FA-ACQ-006 18400 15,000 Acquisition – Conveyor Computer FA000070 Invoice FA-ACQ-007 18400 18,000 Acquisition – Conveyor Lift FA000080 Invoice FA-ACQ-008 18400 42,000 Acquisition – Lift for Furniture FA000090 Invoice FA-ACQ-009 18400 8,500 Acquisition – Switchboard ───────────────────────────────────────────────────────────────────────── TOTAL 363,500

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.

User action in BC:
  1. Search for Fixed Asset G/L Journal
  2. Select batch DEFAULT (ASSETS template)
  3. Verify the journal lines are present
  4. Click Post → Confirm

6 Post Depreciation (BC UI)

Rather than calculating depreciation amounts manually, use BC’s built-in Calculate Depreciation batch job:

User action in BC:
  1. Search for Calculate Depreciation
  2. Set:
    • Depreciation Book: COMPANY
    • FA Posting Date: 2026-02-05
    • Posting Date: 2026-02-05
    • Document No.: DEPR-2026
  3. Choose the Bal. Account per posting group:
    • VEHICLES → G/L Account 82000 (Depreciation, Fixed Assets)
    • EQUIPMENT → G/L Account 66200 (Depreciation, Equipment)
  4. Run the batch job → journal lines are created with BC-calculated amounts
  5. Post the journal
Lesson learned: We initially tried calculating depreciation amounts manually via the API (using a days/total_days formula). BC’s calculated amounts differed slightly due to its internal rounding and accounting period logic. Always use BC’s Calculate Depreciation for accuracy.

7 Claude Verifies via FAAnalysis

After posting, Claude reads the FAAnalysis OData V4 endpoint to show the complete picture:

Fixed Asset Book Values as of Feb 5, 2026 Acquisition Cost vs Accumulated Depreciation (41.9% depreciated) FA000010 FA000020 FA000030 FA000040 FA000050 FA000060 FA000070 FA000080 FA000090 26,125 45,000 31,931 55,000 20,319 35,000 69,667 120,000 14,514 25,000 8,708 15,000 10,450 18,000 24,383 42,000 4,935 8,500 Book Value (Vehicles) Book Value (Equipment) Acquisition Cost
FA No Description Acquisition Depreciation Book Value Depr % ═══════════════════════════════════════════════════════════════════════════════════════ FA000010 Mercedes 300 45,000 -18,875 26,125 41.9% FA000020 Toyota Supra 3.0 55,000 -23,069 31,931 41.9% FA000030 VW Transporter 35,000 -14,681 20,319 41.9% FA000040 Conveyor, Main Asset 120,000 -50,333 69,667 41.9% FA000050 Conveyor Belt 25,000 -10,486 14,514 41.9% FA000060 Conveyor Computer 15,000 -6,292 8,708 41.9% FA000070 Conveyor Lift 18,000 -7,550 10,450 41.9% FA000080 Lift for Furniture 42,000 -17,617 24,383 41.9% FA000090 Switchboard 8,500 -3,565 4,935 41.9% ═══════════════════════════════════════════════════════════════════════════════════════ TOTAL 363,500 -152,468 211,032 41.9%

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

Sell the Switchboard (FA000090) for $5,000 and the Conveyor Computer (FA000060) for $18,000. Create the disposal journal entries.

Current Book Values & Expected Gain/Loss

AssetBook ValueSale PriceResult
FA000090 (Switchboard)$8,500$5,000LOSS $3,500
FA000060 (Conveyor Computer)$15,000$18,000GAIN $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

FieldValueWhy
faPostingType"Disposal"NOT “Proceeds on Disposal” — API uses different enum values than the UI
amountNegativeThe 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

FA No Doc No Description Amount Bal. Account ───────────────────────────────────────────────────────────────────────────── FA000090 FA-SALE-001 Sale of Switchboard -$5,000 18400 FA000060 FA-SALE-002 Sale of Conveyor Computer -$18,000 18400

9 Post Disposals (BC UI)

User action in BC:
  1. Search for Fixed Asset G/L Journal
  2. Select batch DEFAULT (ASSETS template)
  3. Verify the 2 disposal lines are present
  4. 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

FA No Posting Type Amount Description ═══════════════════════════════════════════════════════════════════════ FA000090 Acquisition Cost 8,500 Switchboard FA000090 Disposal -8,500 Sale of Switchboard FA000090 Gain/Loss -3,500 Loss on disposal —— Net Book Value: 0 (Asset fully disposed) FA000060 Acquisition Cost 15,000 Conveyor Computer FA000060 Disposal -15,000 Sale of Conveyor Computer FA000060 Gain/Loss 3,000 Gain on disposal —— Net Book Value: 0 (Asset fully disposed)

The Complete Fixed Asset Lifecycle

COMPLETE FA LIFECYCLE VIA MCP ACQUISITION CSV → Claude → API POST DEPRECIATION BC Calculate Depreciation DISPOSAL Claude API → Disposal Entries GAIN/LOSS BC Automatic Calculation FA Ledger: +$363,500 FA Ledger: -$152,468 FA Ledger: -$23,500 G/L Ledger: Net -$500

API Endpoints Summary

WhatEndpointTypeUsed For
List fixed assets/fixedAssetsStandard API v2.0Reading asset master data
Assign depr. books/FADepBooksOData V4 (Page 5619)Writing FA Depreciation Book records
Create journal lines/workflowGenJournalLinesOData V4 (built-in)Writing FA G/L Journal lines (acquisitions, disposals)
Read FA analysis/FAAnalysisOData V4 (Query 123)Reading posted entries with book values
Read depr. books/DepBooksOData V4 (Page 5611)Reading depreciation book definitions
Read G/L entries/G_LEntriesOData V4 (built-in)Finding balancing G/L accounts
Read Chart of Accounts/Chart_of_AccountsOData V4 (built-in)Finding depreciation expense & gain/loss accounts

Key Lessons Learned

1

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.

2

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.

3

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.

4

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.

5

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.

6

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.

7

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

StepWhoWhat
1HumanPrepare CSV with asset data
2ClaudeAssign depreciation books (FADepBooks)
3ClaudeCreate acquisition journal lines (workflowGenJournalLines)
4HumanPost acquisitions in BC UI
5HumanRun Calculate Depreciation in BC
6HumanPost depreciation journal in BC UI
7ClaudeCreate disposal journal lines (workflowGenJournalLines)
8HumanPost disposals in BC UI
9ClaudeVerify 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.

Share This Post

Related Articles

2 Responses

Leave a Reply

Recent Posts

Get Notified About New Posts

Categories

Discover more from Business Central Musings

Subscribe now to keep reading and get access to the full archive.

Continue reading