---
id: post/aardvarklabs-blog/2759
type: post
title: Using CoPilot to Upgrade Service Notes for Invoices in Business Central AL
summary: This post demonstrates how to use Copilot to automatically upgrade raw service technician notes into professional, customer-facing text for invoices in Business Central. It addresses the common problem of processing hundreds of poorly written service notes daily by creating a table for resolution notes, extending the Sales Header with a BLOB field, and implementing a Copilot prompt dialog that generates formatted HTML summaries.
tier: community
language: en
tags:
  - copilot
  - ai
  - azure openai
  - prompt engineering
  - service invoices
  - rich text
  - page extension
  - al development
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:58:34.242Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: c4af0c589398160a680e7a1b44ca9ea8e3048584cf696c06bba1ff6ec98f6186
evidence:
  - kind: blog
    url: https://aardvarklabs.blog/2025/10/31/using-copilot-to-upgrade-service-notes-for-invoices-in-business-central-al/
    title: Using CoPilot to Upgrade Service Notes for Invoices in Business Central AL
    date: "2025-10-31"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://aardvarklabs.blog/2025/10/31/using-copilot-to-upgrade-service-notes-for-invoices-in-business-central-al/
    title: Using CoPilot to Upgrade Service Notes for Invoices in Business Central AL
    date: "2025-10-31"
    commit: null
    t: null
    quote: The problem is that the notes are less than sufficient for a customer facing document.
  - kind: blog
    url: https://aardvarklabs.blog/2025/10/31/using-copilot-to-upgrade-service-notes-for-invoices-in-business-central-al/
    title: Using CoPilot to Upgrade Service Notes for Invoices in Business Central AL
    date: "2025-10-31"
    commit: null
    t: null
    quote: The response must be formatted in as HTML.
  - kind: blog
    url: https://aardvarklabs.blog/2025/10/31/using-copilot-to-upgrade-service-notes-for-invoices-in-business-central-al/
    title: Using CoPilot to Upgrade Service Notes for Invoices in Business Central AL
    date: "2025-10-31"
    commit: null
    t: null
    quote: The user should always be in control (the user must confirm anything Copilot suggests before any change is saved).
links:
  learn: []
  objects:
    - object/table/36
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "2759"
source_id: aardvarklabs-blog
source_name: Aardvark Labs
url: https://aardvarklabs.blog/2025/10/31/using-copilot-to-upgrade-service-notes-for-invoices-in-business-central-al/
published_at: "2025-10-31T12:00:00.000Z"
author: Marcel Chabot
full_text: false
words: 2546
quotes:
  - text: The problem is that the notes are less than sufficient for a customer facing document.
    why_it_matters: "Establishes the core business problem that Copilot solves: transforming raw internal notes into polished customer communication."
  - text: The response must be formatted in as HTML.
    why_it_matters: Shows that system prompt precision directly controls output format, enabling integration with rich text display controls.
  - text: The user should always be in control (the user must confirm anything Copilot suggests before any change is saved).
    why_it_matters: Emphasizes a critical UX principle for Copilot features, preventing unreviewed AI changes from persisting to the database.
code_objects_mentioned:
  - table ARD_ResolutionNotes
  - table Sales Header
  - codeunit ARD_CopilotResolutionSummary
  - page ARD_ResolutionNotes
  - page ARD_ResolutionNotesPrompt
  - page ARD_SalesInvoice
systems:
  - copilot
  - sales
  - integration
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://aardvarklabs.blog/2025/10/31/using-copilot-to-upgrade-service-notes-for-invoices-in-business-central-al/embed/
  image: https://aardvarklabs.blog/wp-content/uploads/2025/10/cdd1070b-2f6b-482f-8aee-763da9d54af7.jpg
  image_alt: null
  image_w: 1024
  image_h: 1024
  site_name: Aardvark Labs
  favicon: https://aardvarklabs.blog/wp-content/uploads/2024/04/design-1.png?w=32
  probed_at: "2026-10-07T11:51:24.213Z"
---

# Using CoPilot to Upgrade Service Notes for Invoices in Business Central AL

[Read the post](https://aardvarklabs.blog/2025/10/31/using-copilot-to-upgrade-service-notes-for-invoices-in-business-central-al/) · Aardvark Labs (Marcel Chabot) · 2025-10-31 · 2546 words · tier community · reviewed (checked by Opus)

> This post demonstrates how to use Copilot to automatically upgrade raw service technician notes into professional, customer-facing text for invoices in Business Central. It addresses the common problem of processing hundreds of poorly written service notes daily by creating a table for resolution notes, extending the Sales Header with a BLOB field, and implementing a Copilot prompt dialog that generates formatted HTML summaries.

## Key points

- A custom table stores resolution notes linked to sales invoices, allowing technicians to enter raw service details that are later transformed by AI.
- The solution uses Azure OpenAI chat completion with a carefully crafted system prompt that instructs the AI to act as a service manager and produce professional, jargon-free HTML output.
- A prompt dialog page uses PageType PromptDialog with PromptMode = Generate to automatically generate and display Copilot suggestions for user confirmation before saving.
- The generated resolution text is stored in a BLOB field on the Sales Header using UTF-16 encoding and displayed as rich content on the Sales Invoice card.
- The implementation retries generation up to 5 times if the result is empty, ensuring robustness without overcomplicating the architecture.

## Quotes

- "The problem is that the notes are less than sufficient for a customer facing document." (Establishes the core business problem that Copilot solves: transforming raw internal notes into polished customer communication.)
- "The response must be formatted in as HTML." (Shows that system prompt precision directly controls output format, enabling integration with rich text display controls.)
- "The user should always be in control (the user must confirm anything Copilot suggests before any change is saved)." (Emphasizes a critical UX principle for Copilot features, preventing unreviewed AI changes from persisting to the database.)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- table "ARD_ResolutionNotes"
- [table 36 "Sales Header"](../../objects/table/36.md)
- codeunit "ARD_CopilotResolutionSummary"
- page "ARD_ResolutionNotes"
- page "ARD_ResolutionNotesPrompt"
- page "ARD_SalesInvoice"

Not found in BC28-30: table "ARD_ResolutionNotes", codeunit "ARD_CopilotResolutionSummary", page "ARD_ResolutionNotes", page "ARD_ResolutionNotesPrompt", page "ARD_SalesInvoice".

## Context

- Features: Copilot prompt dialog, Azure OpenAI chat completion, BLOB field storage, rich text content, prompt mode generate, system prompt engineering, HTML formatted output, resolution note summarization

Source: Aardvark Labs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
