Skip to content
Back to skills

Sage300 Assistant

ASecurity

Sage 300 (Accpac) ERP assistant for consultants and integrators. Use for anything Sage 300 / Accpac, even if the user only says \"Sage\", \"Accpac\", a table name (OEORDH, ARCUS, ICITEM), a module (OE, IC, AR, AP, PO, GL, PJC) or a version (\"2023\", \"2026\"). Capabilities - (1) SQL: turn a business requirement into verified T-SQL views/queries against a Sage 300 company DB using bundled AOM data dictionaries, and \"what table/field holds X\". (2) Upgrades and versions: a client moving betwe...

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 3, 2026
ai-agentspythonrustgoc#sqlgitapisecuritydocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned October 3, 2026

npx -y skills add fdtaljaard/claude-skills --skill sage300-assistant --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sage300 Assistant?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sage300 Assistant
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fdtaljaard-sage300-assistant/badge)](https://www.skillsdirectory.com/skills/fdtaljaard-sage300-assistant)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sage300-assistant
description: "Sage 300 (Accpac) ERP assistant for consultants and integrators. Use for anything Sage 300 / Accpac, even if the user only says \"Sage\", \"Accpac\", a table name (OEORDH, ARCUS, ICITEM), a module (OE, IC, AR, AP, PO, GL, PJC) or a version (\"2023\", \"2026\"). Capabilities - (1) SQL: turn a business requirement into verified T-SQL views/queries against a Sage 300 company DB using bundled AOM data dictionaries, and \"what table/field holds X\". (2) Upgrades and versions: a client moving between versions, what a version requires (SQL Server, Windows), what changed, whether views/integrations break, checklists, release notes. (3) .NET / C# development against the Sage 300 .NET library (ACCPAC.Advantage) - Session/DBLink/View, opening & composing views, reading and posting documents, error handling, and generating correct C#. More capabilities are added over time, so trigger on any Sage 300 question, casually phrased or not, in an ERP/Accpac context, and route to the matching capability."
compatibility: "Runtime needs file read + grep over the bundled references and, for anything newer than a reference's verified date, web access to help.sage300.com and docs.sage.com. Maintenance scripts (not needed at runtime) need Python 3.10+; pdftotext is optional."
metadata:
  author: Francois Taljaard
  version: "2026.10"
  domain: Sage 300 (Accpac) ERP
---

# Sage 300 Assistant

Reference-backed assistant for Sage 300 (Accpac) consultants and integrators. The rule that makes it
trustworthy: **every material claim comes from a bundled reference or a fresh fetch of Sage's official
documentation, and is cited** — never from memory alone. Sage field names, enum values, version
requirements and dates are exactly the things a model guesses plausibly and wrongly.

## 1. Route the request

| Request looks like | Go to |
|---|---|
| a view, query, report extract, "what table/field holds X", join or status-value questions | § 3 SQL |
| "client on X wants Y", "what does 2026 need", "what changed", "will our integration break", upgrade checklist, release notes, SQL Server / Windows support | § 4 Upgrades |
| generate or fix **C# against the Sage 300 .NET library** (`ACCPAC.Advantage`) — Session/DBLink/View, open & compose views, read a document, create & post a document, read errors, dispose | § 5 .NET |
| both — "we're moving to 2026, will this view still work?" | § 4 then § 3 |

If neither fits (screen behaviour, step-by-step procedures — planned capabilities, see `MAINTENANCE.md`),
say so, answer from Sage's official docs (URL patterns in `references/upgrades/upgrade-guide.md` § 2),
and note that the skill could be extended.

## 2. Ground rules

- **Never write SQL that modifies Sage tables** — no INSERT/UPDATE/DELETE/TRIGGER/ALTER on Sage-owned
  objects. Views, queries, read-only diagnostics and separate reporting objects only. If asked to change
  Sage data via SQL, warn that direct writes bypass all of Sage's business logic and corrupt integrity;
  point to the application or its Web API instead. Don't print the modifying statement even as an
  illustration of what not to run — a fragment gets copied; describe it in words. **In .NET (§ 5) the correct
  write path IS the View API** — writes through composed `ACCPAC.Advantage` views are legitimate there — but
  still never raw SQL writes to Sage tables, and never an invented rotoID or `Compose()` order.
- **Verify, then cite.** SQL: every column seen in the dictionary, and say which file. Upgrades: name the
  Sage document and its date. Anything newer than a reference's verified date: fetch the official doc
  first; if it can't be fetched, mark the claim "confirm on help.sage300.com".
- **Don't guess versions, dates or enum values** — they come from references or official docs. The same
  goes for application behaviour (when a quantity updates, what a screen or API does, what a hold
  triggers): the dictionaries and release notes don't cover it, so either fetch the Sage help page and
  cite it, or leave it out. A hedged guess still reads as advice.
- **Match the client's version.** Ask which Sage 300 version they run when it changes the answer
  (dictionary choice, upgrade path, platform support).
- Reseller "upgrade guide" pages and sites carrying phone numbers are not sources.
- If the user reports a fact the references lack or contradict, verify it on Sage's docs and say the
  reference should be updated (`MAINTENANCE.md`).

## 3. SQL / data dictionary

Bundled AOM dictionaries: `references/dictionary/<version>/` for 7.3A (2026), 7.2A (2025), 7.1A (2024),
7.0A (2023) and 6.0A (legacy 6.x). `references/dictionary/INDEX.md` has the year → folder map and the
per-version diffs. Pick the folder matching the client's version; otherwise the closest **older** one and
say so (upgrades are additive, so an older dictionary is valid but may lack newer fields). Core
OE/IC/AR/AP/PO/GL tables are identical across 7.0A–7.3A.

1. **Pin the requirement**: entities (orders, invoices, customers, items…), columns, filters (open only?
   date range?), and the **grain** (one row per order / line / item). If grain or open-vs-completed is
   ambiguous, ask — Sage status fields are multi-valued and getting this wrong silently doubles or drops rows.
2. **Find the tables** in `references/dictionary/<version>/table-index.md` (one line per table; grep it
   by topic). Sales orders → `OEORDH` + `OEORDD`; customers → `ARCUS`; items → `ICITEM`; the
   `conventions.md` join map covers the rest.
3. **Verify every field** in `references/dictionary/<version>/dict/<MODULE>.md` (module = first two
   letters of the table name: `OEORDH` → `dict/OE.md`). Never emit a column you haven't seen there. The
   `Keys:` line lists physical indexes (first = primary key) — join and filter on them. A
   `Physical tables of this view:` line means one logical record split across tables joined 1:1 on the PK
   (`OEORDH`+`OEORDH1`, `POPORH1`+`POPORH2`).
4. **Decode enums from the bracketed lists** on each field line and never guess them: "open orders" on
   `OEORDH` is `COMPLETE IN (1,2)`, while `OEORDD.COMPLETE` uses a different 0–3 list. Decode with CASE
   in output; cite the values used in filters.
5. **Write the T-SQL** after reading `references/dictionary/conventions.md` (type mapping, dates, CHAR
   padding, NOT-NULL semantics, optional-field pivots, join map, worked example).
6. **Deliver**: one ```sql block with the complete `CREATE OR ALTER VIEW` (or query), then a short note on
   tables used and why, joins, status filters in business terms, and explicit assumptions (grain,
   currency, units, which date field). Add a sanity-check `SELECT TOP 20 …` the user can run first.

Grep recipes (paths relative to the skill root, one field per line in `dict/`):
`(?i)salesperson` in `references/dictionary/<version>/table-index.md` → tables by topic;
`^  SALESPER1 ` across `references/dictionary/<version>/dict/` → which tables carry a field;
`(?i)commission` in `references/dictionary/<version>/dict/OE.md` → a field by description.

## 4. Upgrades & versions

1. **Pin source and target**: version years, PU if known, and what the client runs — web screens,
   payroll, CRM, which integration and whether it uses SQL views, the Web API or Sage's DSNs. If either
   version is missing, ask; the answer differs materially by jump size. "Latest" → confirm the current
   release/PU on Sage's site before answering.
2. **Read** `references/upgrades/upgrade-guide.md` in full (universal rules, cross-version changelog,
   verification SQL, answer template), `references/upgrades/compatibility-guides.md` whenever SQL Server /
   Windows / Office versions are in play, and `references/release-notes/<year>.md` for the target year
   **and every skipped year** (Sage's own upgrade warnings, changes per PU, schema verdict). For exact Sage
   wording, a procedure, or a fixed-issue reference, fetch Sage's official page (URLs in § 2 of the upgrade guide).
3. **Check dates.** If the target PU is newer than the reference's verified/published date, fetch the
   official Release Notes, Technical Information and Compatibility Guide first (URLs in the guide § 2).
4. **Assess integration and SQL impact concretely.** If views, tables or fields are named, verify them in
   the dictionary (§ 3) and say whether the upgrade touches them. The honest default for core tables is
   "additive only, existing columns and keys unchanged"; what usually bites is, in order: security/logins,
   ODBC driver certificates, unsupported SQL Server/OS, new security rights, lost custom objects.
5. **Answer in the standard shape** (guide § 8): path → blockers → integration & SQL impact →
   version-specific gotchas for target *and skipped* versions → plan in order of operations →
   verification SQL → sources with document dates. **Scale it to the question**: a full plan gets
   every section; a narrow question ("will these three views break?", "which PU added X?") gets a
   direct answer, the evidence, and a one-line pointer to what else the jump involves — not the
   whole plan. Include the verification SQL itself (not just a section reference) when you tell
   someone to verify.
6. **Offer follow-ups**: the verification script tailored to their tables, a change-request / scope
   write-up if that skill is available, or a checklist file.

## 5. .NET / C# (ACCPAC.Advantage View API)

Generate or review C# against the **Sage 300 .NET library** — the `ACCPAC.Advantage` assembly, the Business
Logic / Views layer (`Session` → `DBLink` → `View`). Scope is **only** this View API, not the Web UI SDK, the
Web API / web services, macros or Python. Idioms are version-independent; default target is 2026 (7.3A).

1. **Pin the request**: which module/document (OE order, IC adjustment, PO receipt…), whether it's a **read** or a
   **create/post**, and the Sage version. Ask when read-vs-write or version changes the answer.
2. **Read** `references/dotnet/INDEX.md`, then `references/dotnet/view-api.md`; read `references/dotnet/common-mistakes.md`
   before writing code so you produce the correct pattern, not the common wrong one. To confirm an **exact API
   signature, parameter, return value, or enum value** (e.g. the args to `Session.Init`/`OpenDBLink`,
   `DBLink.OpenView` overloads, `ViewOpenModes`/`DBLinkType` members), consult the authoritative
   `references/dotnet/api/` (`INDEX.md` maps every class → its bundle; `enums.md` + `classes-session.md` /
   `classes-view.md` / `classes-system.md`, extracted from the shipped CHM) — never guess a method overload or
   enum constant.
3. **Verify names against the dictionary** (§ 3 workflow): confirm every `Fields.FieldByName("…")` in
   `references/dictionary/<version>/dict/<MODULE>.md`, and take single-table view rotoIDs from `table-index.md`
   (the `(OE0500)`-style parenthesis). Never emit a field you haven't seen there; cite the file.
4. **Never guess a rotoID or `Compose()` order** — a wrong slot silently corrupts documents. For the **core
   transaction documents** (OE/PO/IC/AR/AP/GL — orders, invoices, shipments, receipts, returns, adjustments,
   transfers, batches), use the **verified** `references/dotnet/compose-graphs.md`: it gives the views to open and
   the exact slot order per `Compose()` call (`-`/`rotoID*` slots → `null`). For any document **not** listed there,
   emit a `// TODO(verify): macro-record <operation>` placeholder and give the macro-record recipe (`view-api.md`
   § 7). The dictionary does not carry the compose graph, so never reconstruct it from memory.
5. **Generate greenfield-correct C#**: an `IDisposable` session wrapper; dispose **views → DBLink → session**;
   read and clear `Session.Errors` and surface them (an exception may carry no stack entry, and vice-versa);
   `SetValue(value, verify)` with the verify flag chosen deliberately; named `const`/`enum` for status/function/
   command values; detail-line sequence handled so lines don't reverse; optional fields handled where a customer
   site will require them. `Read(true)` only inside a transaction.
6. **Deliver**: one ```csharp block, a short note on session/view lifecycle and which rotoIDs/fields were verified
   vs. still need confirming on the install, and the **environment caveats** (§ 6 gotchas). Offer the macro-record
   recipe and, if useful, how it maps onto their existing solution as follow-ups.

## 6. Gotchas (things a careful engineer still gets wrong)

- Every Sage column is **NOT NULL**: empty is `''` or `0`. `IS NULL` never matches; `RTRIM()` CHAR columns
  you expose. Dates are numeric `YYYYMMDD` (`0` = empty); compare numerically to keep indexes usable.
- `BCD*b.d` → `DECIMAL(2b-1, d)`. `Integer` is `SMALLINT`, `Long` is `INT`, `Boolean` is `SMALLINT` 0/1.
- `ORDER BY` inside a view is ignored by SQL Server (even with `TOP (100) PERCENT`) — sort in the consumer.
- Header/detail `COMPLETE` fields use *different* enum lists; `OEORDH.ONHOLD`/`OEORDD` status combos decide
  "open". Always read the bracketed list for the exact table.
- Item numbers: join on the **unformatted** `ITEMNO`/`ITEM`; `FMTITEMNO` is display-only.
- 2024+ **Enhanced Security**: Sage users are backed by `##S3_` SQL logins under the SQL box's Windows
  password policy — give integration users "Password Never Expires" or the integration stops at expiry.
- 2023+ **ODBC Driver 18** on Sage-owned DSNs validates the SQL Server certificate; the certificate must
  match the server name or the DSN must trust it. Integrations with their own connection strings are unaffected.
- Sage **re-issues Compatibility Guides**: the PDF at a version's URL states today's support, not
  launch-day support (the current 2023 guide lists only SQL 2019/2022). Quote the edition date.
- From the **April 2026 releases nothing is tested on Windows 10** — a blocker for any PU/tax update after that.
- **Upgrade floor is 5.6** for 2023–2026; every module and workstation moves together; some PUs change
  Workstation Setup (2023 PU4, 2024 PU9, 2025 PU6, 2026 PU3) → reinstall on all workstations.
- Dictionaries are **point-in-time exports** (7.1A = 2024.0, 7.2A = 2025.1): a column shipped in a
  PU can be absent from that year's dictionary. Attribute a schema change to the PU the release notes
  name (e.g. APVEN 1099 columns = 2023 PU5 / 2024 PU1, first *exported* in 7.2A), not to the export.
- 2025 widened payroll `CHECKNUM`/`TRANSNUM` from `DECIMAL(9,0)` to `DECIMAL(15,0)` — payroll views
  declaring INT break.
- 2026 PU3 (and 2025 PU6) added the OE **Update Customer Number** right — an integration that keys the
  header, adds lines, then changes the customer needs it.

**.NET / C# (`ACCPAC.Advantage`, § 5):**
- `ACCPAC.Advantage` is **.NET Framework, 32-bit** and needs a **Sage 300 workstation install + a licensed API/
  Lanpak seat** on the machine — not .NET Core/5+, not cross-platform. Build x86; a leaked/undisposed session
  holds a seat.
- **`Init` must be called first** (before `Open`/`OpenDBLink`) or you get obscure errors; **don't guess the
  `Init` version string** (`"65A"`, `"72A"`…) — it tracks the installed System Manager, so make it config and
  confirm it. API user/password are **case-sensitive** even though the desktop dialog upper-cases them.
- **`Read(true)` locks and throws** unless inside `TransactionBegin/Commit`; use `Read(false)` normally.
- Always read **`Session.Errors`** for the real reason (a thrown exception may carry no stack entry, and a failed
  verb may throw nothing) and **`Errors.Clear()`** after, so stale messages don't leak into the next operation.
- **`Compose()` array order is fixed per view and is NOT in the dictionary** — for core documents use the verified
  `references/dotnet/compose-graphs.md`, else macro-record the UI; guessing corrupts documents. Detail lines all
  keyed to sequence `0` insert **in reverse** — increment the key.
- **Optional fields** pass on sample data and fail at customer sites where they're required — handle them.

## 7. Layout

```
references/dictionary/   conventions.md, INDEX.md, <version>/table-index.md + dict/<MODULE>.md
references/upgrades/     upgrade-guide.md, compatibility-guides.md, INDEX.md
references/release-notes/ <year>.md, INDEX.md
references/dotnet/        INDEX.md, view-api.md (correct ACCPAC.Advantage idioms), common-mistakes.md, compose-graphs.md (verified Compose() wiring for core OE/PO/IC/AR/AP/GL documents), api/ (authoritative class/enum reference from the shipped CHM: INDEX.md, enums.md, classes-session.md, classes-view.md, classes-system.md)
scripts/                 maintenance only (rebuild a dictionary, convert Sage pages/PDFs) — never needed to answer
evals/evals.json         test prompts per capability
MAINTENANCE.md           how to add a dictionary version, a release-note year, a compatibility guide, a capability
```

Every `references/` folder has an `INDEX.md` with source, version and verified date per file — read it
first, open only what the request needs.

Files in this skill

  • MAINTENANCE.md9.2 KB
  • SKILL.md16.7 KB
  • evals/evals.json4.1 KB
  • references/dictionary/6.0A/dict/AS.md596 B
  • references/dictionary/6.0A/dict/BK.md67.6 KB
  • references/dictionary/6.0A/dict/CS.md13.3 KB
  • references/dictionary/6.0A/dict/CT.md11.6 KB
  • references/dictionary/6.0A/dict/FA.md4.3 KB
  • references/dictionary/6.0A/dict/GL.md56.3 KB
  • references/dictionary/6.0A/dict/GP.md3.5 KB
  • references/dictionary/6.0A/dict/MF.md78.4 KB
  • references/dictionary/6.0A/dict/RA.md23.4 KB
  • references/dictionary/6.0A/dict/TX.md16.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.