---
id: object/codeunit/3309
type: object
title: Codeunit 3309 "PA Demo Guide"
summary: Codeunit 3309 "PA Demo Guide" in PayablesAgent (Microsoft.Agent.PayablesAgent). 9 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - payablesagent
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: d42ac49f605c9c072424e4a71b49c5989d0278af76887dcb50200affb8e32d31
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/PayablesAgent/app/Setup/PADemoGuide.Codeunit.al
    title: src/Apps/W1/PayablesAgent/app/Setup/PADemoGuide.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11213
    - change/bcapps/10568
object_type: codeunit
object_id: 3309
name: PA Demo Guide
namespace: Microsoft.Agent.PayablesAgent
app: PayablesAgent
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 9
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 4
  called_by: 3
  implements: 0
---

# Codeunit 3309 "PA Demo Guide"

> Codeunit 3309 "PA Demo Guide" in PayablesAgent (Microsoft.Agent.PayablesAgent). 9 public procedures. Introduced in BC29, still in BC30.

PayablesAgent · Microsoft.Agent.PayablesAgent · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/PayablesAgent/app/Setup/PADemoGuide.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |

## Procedures

- `DemoExperienceAvailable(): Boolean`: Returns true if the demo experience is available for the current company.
- `OpenGuidePage(PASetupConfiguration: Codeunit "PA Setup Configuration")`: Opens the demo guide page.
- `CreateDemoFilesForEmail()` (obsolete 28.0: Demo files are created during the evaluation company creation): Creates demo files to use for the demo email when the agent is enabled.
- `SendDemoInvoicesByEmail(PASetupConfiguration: Codeunit "PA Setup Configuration"): Boolean`: Sends the sample invoices by email if the agent is active, otherwise flags them to be sent at activation.
- `SendDemoEmail(PASetupConfiguration: Codeunit "PA Setup Configuration"): Boolean`: Sends a demo email using the provided PA setup configuration.
- `IsEmailConfiguredForDemoEmail(PASetupConfiguration: Codeunit "PA Setup Configuration"): Boolean`: Returns True if an email account is configured so that demo invoices can be sent by email.
- `GetDemoFilesToDownloadCount(): Integer`: Gets the count of the demo files to download.
- `ShowDemoFilesToDownload()`: Shows the page with the demo files available for download.
- `DownloadDemoFile(PADemoFile: Record "PA Demo File")` (obsolete 28.0: Sample files are now downloaded from E-Doc Sample Purch. Inv. Files page): Downloads the selected demo file.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 3304 "PA Setup Configuration"](../codeunit/3304.md) (4 calls: `IsEmailConfiguredForDemoEmail → GetEmailAccount`, `IsEmailConfiguredForDemoEmail → GetPayablesAgentSetup`, `SendDemoEmail → GetAgentSetupBuffer`, …)
- [Codeunit 8904 "Email Message"](../codeunit/8904.md) (2 calls: `SendDemoEmail → AddAttachment`, `SendDemoEmail → Create`)
- [Codeunit 8711 "Telemetry"](../codeunit/8711.md) (1 call: `SendDemoEmail → LogMessage`)
- [Codeunit 8901 "Email"](../codeunit/8901.md) (1 call: `SendDemoEmail → Send`)

## Called by

- [Page 3307 "PA Demo Guide"](../page/3307.md) (3 calls: `OnOpenPage → GetDemoFilesToDownloadCount`, `SendDemoInvoices → IsEmailConfiguredForDemoEmail`, `SendDemoInvoices → SendDemoInvoicesByEmail`)
- [Page 3304 "Payables Agent Setup"](../page/3304.md) (2 calls: `CalcOpenAgentDemoGuideVisible → DemoExperienceAvailable`, `OpenDemoGuide → OpenGuidePage`)
- [Codeunit 3307 "Payables Agent Setup"](../codeunit/3307.md) (1 call: `ApplyPayablesAgentSetup → SendDemoEmail`)

## Recent changes

- 2026-09-09 [#11213 Fix sample invoice email when the agent setup is not saved yet](../../changes/bcapps/11213.md) (main, BC30, fix)
- 2026-08-27 [#10568 Send sample invoices from the demo guide directly](../../changes/bcapps/10568.md) (main, BC30, fix)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

## Deprecations

- procedure CreateDemoFilesForEmail: Pending 28.0 (#if not CLEAN28), "Demo files are created during the evaluation company creation"
- procedure DownloadDemoFile: Pending 28.0 (#if not CLEAN28), "Sample files are now downloaded from E-Doc Sample Purch. Inv. Files page"

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "PA Demo Guide")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
