AMP Mass Journal Paste
Validated multi-row Excel-to-BC paste for journals and master data lists.
- Current version: v0.1.1.0
- AL prefix: AMPMA
- Object range: 80300-80399
- Business Central: 26.0.0.0
- Publisher: Amplio Solutions
AMP Mass Journal Paste (Power Paste / Excel Power-Edit)
Validated multi-row Excel-to-BC paste experience that bypasses the standard 50-row paste cap and the single-row paste error.
| Property | Value |
|---|---|
| Publisher | Amplio Solutions |
| App ID | b8e7c4d1-9a52-4f36-bc89-1d4e5a6b7c8d |
| Version | 0.1.0.0 |
| BC App / Platform target | 26.0.0.0 / 26.0.0.0 |
| Object range | 80300..80399 |
| Object prefix | AMP |
| Country | GB (en-GB) |
What it does
When a user selects rows in Excel and pastes into a journal or list in Business Central today, two things break:
- The web client silently caps the paste at 50 rows.
- Pasting into a single cell sometimes errors out with the "values cannot be pasted into the cell" message because BC tries to parse the rich HTML payload directly.
Power Paste routes the paste through a dedicated control add-in:
- The user opens the Power Paste page (action on the journal/list).
- The JS add-in captures both the HTML and the TSV payloads from the clipboard via the standard
pasteevent. - AL receives them through the standard
Microsoft.Dynamics.NAV.InvokeExtensibilityMethodevent protocol. - Rows are written to a generic 16-column staging table.
- The validator builds a
RecordReffor the target table and runsFieldRef.Validate(...)for every captured cell, row by row, using[TryFunction]s so the standard BC field triggers fire (and their errors are captured per row/column rather than aborting). - Errors are surfaced inline in the staged-rows grid AND highlighted on the JS preview by row/column.
- Only when the user confirms the commit do staged rows get inserted into the real target table via
Insert(true).
Object map
| Type | ID | Name |
|---|---|---|
| Enum | 80350 | AMP Power Paste Target |
| Table | 80300 | AMP Power Paste Session |
| Table | 80301 | AMP Power Paste Line (16-col staging) |
| Page | 80310 | AMP Power Paste (Card, hosts the control add-in) |
| Page | 80311 | AMP Power Paste Lines (ListPart subpage) |
| PageExt | 80330 | AMP Gen. Jnl. Power Paste (extends General Journal) |
| PageExt | 80331 | AMP Item Jnl. Power Paste (extends Item Journal) |
| PageExt | 80332 | AMP Customer Power Paste (extends Customer List) |
| PageExt | 80333 | AMP Vendor Power Paste (extends Vendor List) |
| PageExt | 80334 | AMP Dim. Value Power Paste (extends Dimension Values) |
| Codeunit | 80340 | AMP Power Paste Parser |
| Codeunit | 80341 | AMP Power Paste Validation |
| Codeunit | 80342 | AMP Power Paste Mgt |
| ControlAddIn | (named) | AMP Power Paste AddIn |
| PermissionSet | 80360 | AMP Power Paste |
09-Mass-Journal-Paste/
├── app.json
├── README.md
├── .editorconfig
├── .gitignore
├── .vscode/launch.json
├── ControlAddIn/
│ ├── PowerPasteAddIn.js
│ └── PowerPasteAddIn.css
└── src/
├── ControlAddIn/PowerPasteAddIn.ControlAddIn.al
├── Enum/PowerPasteTarget.Enum.al
├── Table/
│ ├── PowerPasteSession.Table.al
│ └── PowerPasteLine.Table.al
├── Page/
│ ├── PowerPaste.Page.al
│ └── PowerPasteLines.Page.al
├── PageExtensions/
│ ├── GenJournalPowerPaste.PageExt.al
│ ├── ItemJournalPowerPaste.PageExt.al
│ ├── CustomerListPowerPaste.PageExt.al
│ ├── VendorListPowerPaste.PageExt.al
│ └── DimensionValuesPowerPaste.PageExt.al
├── Codeunit/
│ ├── PowerPasteParser.Codeunit.al
│ ├── PowerPasteValidation.Codeunit.al
│ └── PowerPasteMgt.Codeunit.al
└── PermissionSet/
└── PowerPaste.PermissionSet.al
Install / build (sandbox)
- Open the folder in VS Code with the AL Language extension.
Ctrl+Shift+P→AL: Download symbols(BC 26.0 sandbox).Ctrl+Shift+P→AL: Package.F5to publish + launch.- The Local Sandbox (Docker) config targets
http://bcserver, instanceBC— adjust to your container. - The Cloud Sandbox config targets
Sandbox.
- The Local Sandbox (Docker) config targets
- After publish, search the role centre for Power Paste or open any of the 5 target lists and click the new Power Paste action.
MVP status — what's complete
- End-to-end flow for General Journal + Item Journal + Customer, Vendor, Dimension Value via the staging-and-validate pipeline.
- JS control add-in captures both HTML and TSV payloads, posts back via
Microsoft.Dynamics.NAV.InvokeExtensibilityMethod. - Validator runs standard BC field triggers (so posting groups, dimensions, currency exchange, etc. all behave as native paste).
- Inline error grid + per-cell highlight in the JS preview.
Insert(true)only after explicit user confirmation (Confirm Management.GetResponseOrDefault).- Promoted Power Paste action on all 5 target pages.
- Custom permission set
AMP Power Paste. app.jsondeclares deps on Base + System Application 26.0.0.0.
What Lee needs to do to ship
- Replace the placeholder GUID in
app.json. The current valueb8e7c4d1-9a52-4f36-bc89-1d4e5a6b7c8dwas generated during scaffolding — regenerate one for the published app and pin it before the first AppSource/PartnerSource publish (it must never change again). - Verify the launch.json server / instance. The local profile currently points at
http://bcserverwith instanceBC— change to match your Docker container name. The cloud profile targets a sandbox literally namedSandbox. - Download symbols and confirm a clean compile. The
[TryFunction]-based validator is built against BC 26.x APIs (RecordRef.Field(),FieldRef.Validate(),GetLastErrorText,ClearLastError) — all stable, but you should confirm a cleanAL: Packageagainst your downloaded symbols. - Translate strings. All user-visible labels are
Labelliterals inen-GB. RunAL: Generate XLIFFand translateTranslations/AMP Mass Journal Paste.g.xlfif you need additional locales (the manifest currently lists onlyen-GB). - Test the commit path against your real templates/batches. The commit helpers
CommitToGenJournal/CommitToItemJournaluse the session header'sJournal Template Name+Journal Batch NameandInsert(true)— verify with a dry-run batch before turning users loose, especially on production companies. - Decide on telemetry. Nothing is logged at the moment. Consider wiring
Session.LogMessagecalls inHandlePasteCapturedandCommitSessionfor ops visibility before GA. - Write smoke tests. A small
Test Codeunitper target — paste 3 rows, mutate one cell to invalidate, re-validate, then commit — would catch field-rename regressions when symbols update. - Optional polish before GA:
- Larger UoM/Bin lookups in the JS preview (currently TSV-only).
- Toast notification with row count after a successful commit (currently a
Message). - Friendly column headers per target — the staging table is generic
Col 01..16; the AddIn is told the headers via a pipe-delimitedInitialize(...)call but the AL list-part still shows generic captions.
Deferred to v2 (explicitly out of MVP)
- AI-assisted column auto-mapping (currently column order is fixed per target, see
BuildColumnHeaderson page 80310). - Rich-cell HTML parsing (formulas, hyperlinks, formatting). The JS already captures the
text/htmlpayload but AL only consumes thetext/plainTSV. - Per-target bespoke staging tables with strongly-typed columns (current MVP uses one shared 16-column buffer — fine for paste, but not as nice for editing).
- Additional targets (Sales/Purchase Header + Lines, Item, FA Card, Job Journal).
Conventions
- All AL object names use the
AMPprefix. - All object IDs land inside
80300..80399. - Country / locale:
GB/en-GBonly. - No
withblocks (NoImplicitWithfeature flag is enabled inapp.json).