---
id: object/table/5071
type: object
title: Table 5071 "Campaign"
summary: Table 5071 "Campaign" in Base Application (Microsoft.CRM.Campaign). 38 fields, 3 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC24, BC27-28.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: ab695859489a6c88be8c852f5971fc9d45791179ed8e6487bde3a523edd4d34b
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/CRM/Campaign/Campaign.Table.al
    title: src/Layers/W1/BaseApp/CRM/Campaign/Campaign.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 5071
name: Campaign
namespace: Microsoft.CRM.Campaign
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 38
  procedures: 6
  events: 2
  subscribers: 0
relations:
  out: 24
  referenced_by: 39
  pages: 3
  extended_by: 0
  event_subscribers: 6
  calls: 3
  called_by: 0
  implements: 0
---

# Table 5071 "Campaign"

> Table 5071 "Campaign" in Base Application (Microsoft.CRM.Campaign). 38 fields, 3 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC24, BC27-28.

Base Application · Microsoft.CRM.Campaign · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/CRM/Campaign/Campaign.Table.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Caption | Campaign |
| DataClassification | CustomerContent |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | No. | Code[20] | Specifies the number of the involved entry or record, according to the specified number series. |  |
| 2 | Description | Text[100] | Specifies the description of the campaign. |  |
| 3 | Starting Date | Date | Specifies the date on which the campaign is valid. There are certain rules for how dates should be entered. |  |
| 4 | Ending Date | Date | Specifies the last day on which this campaign is valid. |  |
| 5 | Salesperson Code | Code[20] | Specifies the code of the salesperson responsible for the campaign. | TableRelation [Table 13 "Salesperson/Purchaser"](../table/13.md) ("Salesperson/Purchaser" where(Blocked = const(false))) |
| 6 | Comment | Boolean | — | FlowField: exist("Rlshp. Mgt. Comment Line" where("Table Name" = const(Campaign), "No." = field("No."))); not editable |
| 7 | Last Date Modified | Date | Specifies the date when the campaign card was last modified. This field is not editable. | not editable |
| 8 | No. Series | Code[20] | — | TableRelation [Table 308 "No. Series"](../table/308.md) (No. Series); not editable |
| 9 | Global Dimension 1 Code | Code[20] | Specifies the code for the global dimension that is linked to the record or entry for analysis purposes. Two global dimensions, typically for the company's most important activities, are available on all cards, documents, reports, and lists. | TableRelation [Table 349 "Dimension Value"](../table/349.md) ("Dimension Value".Code where("Global Dimension No." = const(1), Blocked = const(false))) |
| 10 | Global Dimension 2 Code | Code[20] | Specifies the code for the global dimension that is linked to the record or entry for analysis purposes. Two global dimensions, typically for the company's most important activities, are available on all cards, documents, reports, and lists. | TableRelation [Table 349 "Dimension Value"](../table/349.md) ("Dimension Value".Code where("Global Dimension No." = const(2), Blocked = const(false))) |
| 11 | Status Code | Code[10] | Specifies the status code for the campaign. | TableRelation [Table 5073 "Campaign Status"](../table/5073.md) (Campaign Status) |
| 12 | Target Contacts Contacted | Integer | Specifies the number of target contacts that you have contacted with this campaign. The field is not editable. | FlowField: count("Interaction Log Entry" where("Campaign No." = field("No."), "Campaign Target" = const(true), Canceled = const(false), Date = field("Date Filter"), Postponed = const(false))); not editable |
| 13 | Contacts Responded | Integer | Specifies the number of contacts who have responded to the campaign. This field is not editable. | FlowField: count("Interaction Log Entry" where("Campaign No." = field("No."), "Campaign Response" = const(true), Canceled = const(false), Date = field("Date Filter"), Postponed = const(false))); not editable |
| 14 | Duration (Min.) | Decimal | Specifies the total time it took to complete all the interactions linked to the campaign. This field is not editable. <small>via [Page 5088 "Campaign Statistics"](../page/5088.md)</small> | FlowField: sum("Interaction Log Entry"."Duration (Min.)" where("Campaign No." = field("No."), Canceled = const(false), Date = field("Date Filter"), Postponed = const(false))); not editable |
| 16 | Cost (LCY) | Decimal | Specifies the total cost of all the interactions created as part of the campaign. This field is not editable. <small>via [Page 5088 "Campaign Statistics"](../page/5088.md)</small> | FlowField: sum("Interaction Log Entry"."Cost (LCY)" where("Campaign No." = field("No."), Canceled = const(false), Date = field("Date Filter"), Postponed = const(false))); not editable |
| 17 | No. of Opportunities | Integer | Specifies the number of opportunities created as part of this campaign. This field is not editable. | FlowField: count("Opportunity Entry" where("Campaign No." = field("No."), Active = const(true))); not editable |
| 18 | Estimated Value (LCY) | Decimal | Specifies the estimated value of the opportunities created as part of this campaign. This field is not editable. <small>via [Page 5088 "Campaign Statistics"](../page/5088.md)</small> | FlowField: sum("Opportunity Entry"."Estimated Value (LCY)" where("Campaign No." = field("No."), Active = const(true))); not editable |
| 19 | Calcd. Current Value (LCY) | Decimal | Specifies the calculated current value of the opportunities linked to the campaign. This field is not editable. <small>via [Page 5088 "Campaign Statistics"](../page/5088.md)</small> | FlowField: sum("Opportunity Entry"."Calcd. Current Value (LCY)" where("Campaign No." = field("No."), Active = const(true))); not editable |
| 20 | Date Filter | Date | — | FlowFilter |
| 23 | Action Taken Filter | Enum "Opportunity Action Taken" | — | FlowFilter; enum [Enum 5091 "Opportunity Action Taken"](../enum/5091.md) |
| 24 | Sales Cycle Filter | Code[10] | — | TableRelation [Table 5090 "Sales Cycle"](../table/5090.md) (Sales Cycle); FlowFilter |
| 25 | Sales Cycle Stage Filter | Integer | — | TableRelation [Table 5091 "Sales Cycle Stage"](../table/5091.md) ("Sales Cycle Stage".Stage where("Sales Cycle Code" = field("Sales Cycle Filter"))); FlowFilter |
| 26 | Probability % Filter | Decimal | — | FlowFilter |
| 27 | Completed % Filter | Decimal | — | FlowFilter |
| 28 | Contact Filter | Code[20] | — | TableRelation [Table 5050 "Contact"](../table/5050.md); FlowFilter |
| 29 | Contact Company Filter | Code[20] | — | TableRelation [Table 5050 "Contact"](../table/5050.md) (Contact where(Type = const(Company))); FlowFilter |
| 30 | Estimated Value Filter | Decimal | — | FlowFilter |
| 31 | Calcd. Current Value Filter | Decimal | — | FlowFilter |
| 32 | Chances of Success % Filter | Decimal | — | FlowFilter |
| 33 | Task Status Filter | Enum "Task Status" | — | FlowFilter; enum [Enum 5081 "Task Status"](../enum/5081.md) |
| 34 | Task Closed Filter | Boolean | — | FlowFilter |
| 35 | Priority Filter | Option | — | FlowFilter; OptionCaption: Low,Normal,High |
| 36 | Team Filter | Code[10] | — | TableRelation [Table 5083 "Team"](../table/5083.md); FlowFilter |
| 37 | Salesperson Filter | Code[20] | — | TableRelation [Table 13 "Salesperson/Purchaser"](../table/13.md) (Salesperson/Purchaser); FlowFilter |
| 38 | Opportunity Entry Exists | Boolean | — | FlowField: exist("Opportunity Entry" where("Campaign No." = field("No."), Active = const(true), "Salesperson Code" = field("Salesperson Filter"), "Contact No." = field("Contact Filter"), "Contact Company No." = field("Contact Company Filter"), "Sales Cycle Code" = field("Sales Cycle Filter"), "Sales Cycle Stag...; not editable |
| 39 | Task Entry Exists | Boolean | — | FlowField: exist("To-do" where("Campaign No." = field("No."), "Contact No." = field("Contact Filter"), "Contact Company No." = field("Contact Company Filter"), "Salesperson Code" = field("Salesperson Filter"), "Team Code" = field("Team Filter"), Status = field("Task Status Filter"), Closed = field("Task Closed...; not editable |
| 40 | Close Opportunity Filter | Code[10] | — | TableRelation [Table 5094 "Close Opportunity Code"](../table/5094.md) (Close Opportunity Code); FlowFilter |
| 41 | Activated | Boolean | Specifies if a sales lines price discount has been activated. After you set up a campaign and create segments for it, you can create discounts for targeted audiences. | FlowField: exist("Campaign Target Group" where("Campaign No." = field("No."))); not editable |

## Keys

- Key1: No. (clustered)
- Key2: Salesperson Code

## Events published

- `OnAfterValidateShortcutDimCode(Campaign: Record Campaign; xCampaign: Record Campaign; FieldNumber: Integer; var ShortcutDimCode: Code[20])` (integration)
- `OnBeforeValidateShortcutDimCode(Campaign: Record Campaign; xCampaign: Record Campaign; FieldNumber: Integer; var ShortcutDimCode: Code[20])` (integration)

## Trigger event subscribers

- OnAfterDeleteEvent: [Codeunit 7006 "Price Helper - V16"](../codeunit/7006.md) AfterDeleteCampaign, [Codeunit 7019 "Price Helper - V15"](../codeunit/7019.md) AfterDeleteCampaign
- OnAfterModifyEvent: [Codeunit 7019 "Price Helper - V15"](../codeunit/7019.md) AfterModifyCampaign
- OnAfterRenameEvent: [Codeunit 7006 "Price Helper - V16"](../codeunit/7006.md) AfterRenameCampaign
- OnAfterValidateEvent(Ending Date): [Codeunit 7006 "Price Helper - V16"](../codeunit/7006.md) AfterModifyEndingDateCampaign
- OnAfterValidateEvent(Starting Date): [Codeunit 7006 "Price Helper - V16"](../codeunit/7006.md) AfterModifyStartingDateCampaign

## Procedures

- `AssistEdit(OldCampaign: Record Campaign): Boolean`
- `ValidateShortcutDimCode(FieldNumber: Integer; var ShortcutDimCode: Code[20])`
- `ToPriceSource(var PriceSource: Record "Price Source")`

Plus 1 local procedures.

## Triggers

OnDelete, OnInsert, OnModify, OnRename

## Relations

- lookup page [Page 5087 "Campaign List"](../page/5087.md)
- Salesperson Code: TableRelation [Table 13 "Salesperson/Purchaser"](../table/13.md)
- Salesperson Filter: TableRelation [Table 13 "Salesperson/Purchaser"](../table/13.md)
- No. Series: TableRelation [Table 308 "No. Series"](../table/308.md)
- Global Dimension 1 Code: TableRelation [Table 349 "Dimension Value"](../table/349.md)
- Global Dimension 2 Code: TableRelation [Table 349 "Dimension Value"](../table/349.md)
- Contact Company Filter: TableRelation [Table 5050 "Contact"](../table/5050.md)
- Contact Filter: TableRelation [Table 5050 "Contact"](../table/5050.md)
- Comment: CalcFormula [Table 5061 "Rlshp. Mgt. Comment Line"](../table/5061.md)
- Contacts Responded: CalcFormula [Table 5065 "Interaction Log Entry"](../table/5065.md)
- Cost (LCY): CalcFormula [Table 5065 "Interaction Log Entry"](../table/5065.md)
- Duration (Min.): CalcFormula [Table 5065 "Interaction Log Entry"](../table/5065.md)
- Target Contacts Contacted: CalcFormula [Table 5065 "Interaction Log Entry"](../table/5065.md)
- Status Code: TableRelation [Table 5073 "Campaign Status"](../table/5073.md)
- Task Entry Exists: CalcFormula [Table 5080 "To-do"](../table/5080.md)
- Team Filter: TableRelation [Table 5083 "Team"](../table/5083.md)
- Sales Cycle Filter: TableRelation [Table 5090 "Sales Cycle"](../table/5090.md)
- Sales Cycle Stage Filter: TableRelation [Table 5091 "Sales Cycle Stage"](../table/5091.md)
- Calcd. Current Value (LCY): CalcFormula [Table 5093 "Opportunity Entry"](../table/5093.md)
- Estimated Value (LCY): CalcFormula [Table 5093 "Opportunity Entry"](../table/5093.md)
- No. of Opportunities: CalcFormula [Table 5093 "Opportunity Entry"](../table/5093.md)
- Opportunity Entry Exists: CalcFormula [Table 5093 "Opportunity Entry"](../table/5093.md)
- Close Opportunity Filter: TableRelation [Table 5094 "Close Opportunity Code"](../table/5094.md)
- Activated: CalcFormula [Table 7030 "Campaign Target Group"](../table/7030.md)

## Referenced by

39 fields in 36 objects relate to this table (TableRelation or CalcFormula).

- [Table 5076 "Segment Header"](../table/5076.md): Campaign Description, Campaign No.
- [Table 5080 "To-do"](../table/5080.md): Campaign Description, Campaign No.
- [Table 5092 "Opportunity"](../table/5092.md): Campaign Description, Campaign No.
- [Table 110 "Sales Shipment Header"](../table/110.md): Campaign No.
- [Table 112 "Sales Invoice Header"](../table/112.md): Campaign No.
- [Table 114 "Sales Cr.Memo Header"](../table/114.md): Campaign No.
- [Table 120 "Purch. Rcpt. Header"](../table/120.md): Campaign No.
- [Table 122 "Purch. Inv. Header"](../table/122.md): Campaign No.
- [Table 124 "Purch. Cr. Memo Hdr."](../table/124.md): Campaign No.
- [Table 13 "Salesperson/Purchaser"](../table/13.md): Campaign Filter
- [Table 181 "Posted Gen. Journal Line"](../table/181.md): Campaign No.
- [Table 36 "Sales Header"](../table/36.md): Campaign No.
- [Table 38 "Purchase Header"](../table/38.md): Campaign No.
- [Table 5050 "Contact"](../table/5050.md): Campaign Filter
- [Table 5061 "Rlshp. Mgt. Comment Line"](../table/5061.md): No.
- [Table 5064 "Interaction Template"](../table/5064.md): Campaign No.
- [Table 5065 "Interaction Log Entry"](../table/5065.md): Campaign No.
- [Table 5072 "Campaign Entry"](../table/5072.md): Campaign No.
- [Table 5077 "Segment Line"](../table/5077.md): Campaign No.
- [Table 5083 "Team"](../table/5083.md): Campaign Filter
- [Table 5093 "Opportunity Entry"](../table/5093.md): Campaign No.
- [Table 5102 "RM Matrix Management"](../table/5102.md): Campaign Filter
- [Table 5107 "Sales Header Archive"](../table/5107.md): Campaign No.
- [Table 5109 "Purchase Header Archive"](../table/5109.md): Campaign No.
- [Table 6650 "Return Shipment Header"](../table/6650.md): Campaign No.
- [Table 6660 "Return Receipt Header"](../table/6660.md): Campaign No.
- [Table 7000 "Price List Header"](../table/7000.md): Assign-to No.
- [Table 7001 "Price List Line"](../table/7001.md): Assign-to No.
- [Table 7002 "Sales Price"](../table/7002.md): Sales Code
- [Table 7004 "Sales Line Discount"](../table/7004.md): Sales Code
- [Table 7022 "Price Worksheet Line"](../table/7022.md): Assign-to No.
- [Table 7023 "Sales Price Worksheet"](../table/7023.md): Sales Code
- [Table 7030 "Campaign Target Group"](../table/7030.md): Campaign No.
- [Table 751 "Standard General Journal Line"](../table/751.md): Campaign No.
- [Table 81 "Gen. Journal Line"](../table/81.md): Campaign No.
- [Table 9063 "Relationship Mgmt. Cue"](../table/9063.md): Active Campaigns

## Pages and codeunits on this table

- [Page 5086 "Campaign Card"](../page/5086.md) (source table)
- [Page 5087 "Campaign List"](../page/5087.md) (source table)
- [Page 5088 "Campaign Statistics"](../page/5088.md) (source table)

## 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 408 "DimensionManagement"](../codeunit/408.md) (5 calls: `OnDelete → DeleteDefaultDim`, `OnInsert → UpdateDefaultDim`, `OnRename → RenameDefaultDim`, …)
- [Page 456 "No. Series"](../page/456.md) (2 calls: `AssistEdit → (object)`, `OnInsert → (object)`)
- [Codeunit 7030 "Campaign Target Group Mgt"](../codeunit/7030.md) (1 call: `OnDelete → DeactivateCampaign`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC27-28

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: "table", object_name: "Campaign")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
