---
id: object/table/5093
type: object
title: Table 5093 "Opportunity Entry"
summary: Table 5093 "Opportunity Entry" in Base Application (Microsoft.CRM.Opportunity). 25 fields, 24 public procedures, 26 events. Present since at least BC23, still in BC30, changed in BC24-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: c40bf67bba625964579c3ba32f36c2d0fbf0e404437ff489a7361bde68c2e3d0
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/CRM/Opportunity/OpportunityEntry.Table.al
    title: src/Layers/W1/BaseApp/CRM/Opportunity/OpportunityEntry.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9024
object_type: table
object_id: 5093
name: Opportunity Entry
namespace: Microsoft.CRM.Opportunity
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 25
  procedures: 56
  events: 26
  subscribers: 0
relations:
  out: 11
  referenced_by: 37
  pages: 4
  extended_by: 0
  event_subscribers: 0
  calls: 3
  called_by: 0
  implements: 0
---

# Table 5093 "Opportunity Entry"

> Table 5093 "Opportunity Entry" in Base Application (Microsoft.CRM.Opportunity). 25 fields, 24 public procedures, 26 events. Present since at least BC23, still in BC30, changed in BC24-28.

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

## Properties

| Property | Value |
|---|---|
| Caption | Opportunity Entry |
| 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 | Entry No. | Integer | — |  |
| 2 | Opportunity No. | Code[20] | Specifies the number of the opportunity to which this entry applies. | TableRelation [Table 5092 "Opportunity"](../table/5092.md) |
| 3 | Sales Cycle Code | Code[10] | Specifies the code of the sales cycle to which the opportunity is linked. | TableRelation [Table 5090 "Sales Cycle"](../table/5090.md) (Sales Cycle) |
| 4 | Sales Cycle Stage | Integer | Specifies the sales cycle stage currently of the opportunity. | TableRelation [Table 5091 "Sales Cycle Stage"](../table/5091.md) ("Sales Cycle Stage".Stage where("Sales Cycle Code" = field("Sales Cycle Code"))) |
| 5 | Contact No. | Code[20] | — | TableRelation [Table 5050 "Contact"](../table/5050.md) |
| 6 | Contact Company No. | Code[20] | — | TableRelation [Table 5050 "Contact"](../table/5050.md) (Contact where(Type = const(Company))) |
| 7 | Salesperson Code | Code[20] | — | TableRelation [Table 13 "Salesperson/Purchaser"](../table/13.md) (Salesperson/Purchaser) |
| 8 | Campaign No. | Code[20] | — | TableRelation [Table 5071 "Campaign"](../table/5071.md) |
| 9 | Date of Change | Date | Specifies the date this opportunity entry was last changed. |  |
| 10 | Active | Boolean | Specifies that the opportunity entry is active. |  |
| 11 | Date Closed | Date | Specifies the date that the opportunity was closed. |  |
| 12 | Days Open | Decimal | Specifies the number of days that the opportunity entry was open. |  |
| 13 | Action Taken | Enum "Opportunity Action Taken" | Specifies the action that was taken when the entry was last updated. There are six options: | enum [Enum 5091 "Opportunity Action Taken"](../enum/5091.md) |
| 14 | Estimated Value (LCY) | Decimal | Specifies the estimated value of the opportunity entry. <small>via [Page 5129 "Update Opportunity"](../page/5129.md)</small> |  |
| 15 | Calcd. Current Value (LCY) | Decimal | Specifies the calculated current value of the opportunity entry. <small>via [Page 5128 "Close Opportunity"](../page/5128.md)</small> |  |
| 16 | Completed % | Decimal | Specifies the percentage of the sales cycle that has been completed for this opportunity entry. |  |
| 17 | Chances of Success % | Decimal | Specifies the chances of success of the opportunity entry. |  |
| 18 | Probability % | Decimal | Specifies the probability of the opportunity resulting in a sale. |  |
| 19 | Close Opportunity Code | Code[10] | Specifies the code for closing the opportunity. | TableRelation [Table 5094 "Close Opportunity Code"](../table/5094.md) (if ("Action Taken" = const(Won)) "Close Opportunity Code" where(Type = const(Won)) else if ("Action Taken" = const(Lost)) "Close Opportunity Code" where(Type = const(Lost))) |
| 20 | Previous Sales Cycle Stage | Integer | Specifies the sales cycle stage of the opportunity before this entry. | TableRelation [Table 5091 "Sales Cycle Stage"](../table/5091.md) ("Sales Cycle Stage".Stage where("Sales Cycle Code" = field("Sales Cycle Code"))) |
| 21 | Estimated Close Date | Date | Specifies the estimated date when the opportunity entry will be closed. |  |
| 9501 | Wizard Step | Option | — | OptionCaption: ,1,2,3,4,5,6; not editable |
| 9502 | Cancel Old To Do | Boolean | Specifies a task is to be cancelled from the opportunity. |  |
| 9503 | Action Type | Option | Specifies options that you can take when you reenter an opportunity to update it in the Update Opportunity window. Certain options are not available, depending on what stage you are in for your opportunity. For example, if you are in stage 1, you cannot select the Previous option. | OptionCaption: ,First,Next,Previous,Skip,Update,Jump |
| 9504 | Sales Cycle Stage Description | Text[100] | Specifies a description of the sales cycle that is related to the task. The description is copied from the sales cycle card. |  |

## Keys

- Key1: Entry No. (clustered)
- Key2: Opportunity No.
- Key3: Contact Company No., Contact No., Active
- Key4: Campaign No., Active
- Key5: Active, Sales Cycle Code, Sales Cycle Stage, Estimated Close Date
- Key6: Active, Opportunity No.
- Key7: Active, Salesperson Code, Date of Change
- Key8: Close Opportunity Code

## Events published

- `OnAfterInitOpportunityEntry(Opportunity: Record Opportunity; var OpportunityEntry: Record "Opportunity Entry")` (integration)
- `OnAfterInsertEntry(var OpportunityEntry: Record "Opportunity Entry")` (integration)
- `OnAfterValidateStage(var OpportunityEntry: Record "Opportunity Entry")` (integration)
- `OnBeforeCheckStatus(var OpportunityEntry: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckStatus2(var OpportunityEntry: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnBeforeCloseOppFromOpp(var Opportunity: Record Opportunity; var OpportunityEntry: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnBeforeCreateStageList(var OpportunityEntry: Record "Opportunity Entry"; var OpportunityEntryRec: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnBeforeGetSalesDocValue(SalesHeader: Record "Sales Header"; var Result: Decimal; var IsHandled: Boolean)` (integration)
- `OnBeforeStartWizard(var OpportunityEntry: Record "Opportunity Entry"; var CloseOpportunityPageId: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeTestCust(OpportunityEntry: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateEstimates(var OpportunityEntry: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateOppFromOpp(var Opportunity: Record Opportunity; var OpportunityEntry: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnBeforeValidateSalesCycleStage(var OpportunityEntry: Record "Opportunity Entry")` (integration)
- `OnCloseOppFromOppOnBeforeStartWizard(Opportunity: Record Opportunity; var OpportunityEntry: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnCreateTaskOnBeforeInsertTask(var OpportunityEntry: Record "Opportunity Entry"; var Task: Record "To-do")` (integration)
- `OnFinishWizardOnAfterInsertEntry(OpportunityEntry: Record "Opportunity Entry")` (integration)
- `OnFinishWizard2OnAfterInsertEntry(OpportunityEntry: Record "Opportunity Entry")` (integration)
- `OnUpdateEstimatesOnBeforeModifyOpportunityEntry(var OpportunityEntry: Record "Opportunity Entry"; SalesHeader: Record "Sales Header")` (integration)
- `OnUpdateOppFromOppOnBeforeStartWizard2(Opportunity: Record Opportunity; var OpportunityEntry: Record "Opportunity Entry")` (integration)
- `OnBeforeTestQuote(OpportunityEntry: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckEstimatedValues(var OpportunityEntry: Record "Opportunity Entry"; xOpportunityEntry: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnStartWizard2OnBeforeRunModalPage(var OpportunityEntry: Record "Opportunity Entry"; xOpportunityEntry: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnFinishWizard2OnBeforeValidateSalesCycleStageDescription(var OpportunityEntry: Record "Opportunity Entry"; var IsHandled: Boolean)` (integration)
- `OnFinishWizardOnAfterUpdateEstimates(var OpportunityEntry: Record "Opportunity Entry")` (integration)
- `OnOnInsertOnBeforeModifyOpportunity(var OpportunityEntry: Record "Opportunity Entry"; var Opportunity: Record Opportunity; var ShouldModifyOpportunity: Boolean)` (integration)
- `OnInsertEntryOnBeforeInsert(var OpportunityEntryToInsert: Record "Opportunity Entry"; var OpportunityEntryInserted: Record "Opportunity Entry")` (integration)

## Procedures

- `GetLastEntryNo(): Integer`
- `InsertEntry(var OpportunityEntryToInsert: Record "Opportunity Entry"; CancelOldTask: Boolean; CreateNewTask: Boolean)`
- `UpdateEstimates()`
- `CreateTask(CancelOldTask: Boolean; CreateNewTask: Boolean)`
- `GetSalesDocValue(SalesHeader: Record "Sales Header"): Decimal`
- `InitOpportunityEntry(Opportunity: Record Opportunity)`
- `CloseOppFromOpp(var Opportunity: Record Opportunity)`
- `CheckStatus()`
- `FinishWizard()`
- `UpdateOppFromOpp(var Opportunity: Record Opportunity)`
- `CheckStatus2()`
- `FinishWizard2()`
- `WizardActionTypeValidate2()`
- `WizardSalesCycleStageValidate2()`
- `CreateStageList()`
- `ValidateStage()`
- `NoOfSalesCyclesFirst(): Integer`
- `NoOfSalesCyclesNext(): Integer`
- `NoOfSalesCyclesPrev(): Integer`
- `NoOfSalesCyclesSkip(): Integer`
- `NoOfSalesCyclesUpdate(): Integer`
- `NoOfSalesCyclesJump(): Integer`
- `ValidateSalesCycleStage()`
- `LookupSalesCycleStage()`

Plus 6 local procedures.

## Triggers

OnInsert

## Relations

- drill-down page [Page 5130 "Opportunity Entries"](../page/5130.md)
- lookup page [Page 5130 "Opportunity Entries"](../page/5130.md)
- Salesperson Code: TableRelation [Table 13 "Salesperson/Purchaser"](../table/13.md)
- Contact Company No.: TableRelation [Table 5050 "Contact"](../table/5050.md)
- Contact No.: TableRelation [Table 5050 "Contact"](../table/5050.md)
- Campaign No.: TableRelation [Table 5071 "Campaign"](../table/5071.md)
- Sales Cycle Code: TableRelation [Table 5090 "Sales Cycle"](../table/5090.md)
- Previous Sales Cycle Stage: TableRelation [Table 5091 "Sales Cycle Stage"](../table/5091.md)
- Sales Cycle Stage: TableRelation [Table 5091 "Sales Cycle Stage"](../table/5091.md)
- Opportunity No.: TableRelation [Table 5092 "Opportunity"](../table/5092.md)
- Close Opportunity Code: TableRelation [Table 5094 "Close Opportunity Code"](../table/5094.md) (conditional)

## Referenced by

37 fields in 10 objects relate to this table (TableRelation or CalcFormula).

- [Table 5092 "Opportunity"](../table/5092.md): Calcd. Current Value (LCY), Chances of Success %, Completed %, Current Sales Cycle Stage, Estimated Closing Date, Estimated Value (LCY), Probability %
- [Table 13 "Salesperson/Purchaser"](../table/13.md): Avg. Estimated Value (LCY), Avg.Calcd. Current Value (LCY), Calcd. Current Value (LCY), Estimated Value (LCY), No. of Opportunities, Opportunity Entry Exists
- [Table 5102 "RM Matrix Management"](../table/5102.md): Avg. Estimated Value (LCY), Avg.Calcd. Current Value (LCY), Calcd. Current Value (LCY), Estimated Value (LCY), No. of Opportunities
- [Table 5050 "Contact"](../table/5050.md): Calcd. Current Value (LCY), Estimated Value (LCY), No. of Opportunities, Opportunity Entry Exists
- [Table 5071 "Campaign"](../table/5071.md): Calcd. Current Value (LCY), Estimated Value (LCY), No. of Opportunities, Opportunity Entry Exists
- [Table 5091 "Sales Cycle Stage"](../table/5091.md): Average No. of Days, Calcd. Current Value (LCY), Estimated Value (LCY), No. of Opportunities
- [Table 5090 "Sales Cycle"](../table/5090.md): Calcd. Current Value (LCY), Estimated Value (LCY), No. of Opportunities
- [Table 9063 "Relationship Mgmt. Cue"](../table/9063.md): Opportunities Due in 7 Days, Overdue Opportunities
- [Table 5080 "To-do"](../table/5080.md): Opportunity Entry No.
- [Table 5094 "Close Opportunity Code"](../table/5094.md): No. of Opportunities

## Pages and codeunits on this table

- [Page 5125 "Opportunity Subform"](../page/5125.md) (source table)
- [Page 5128 "Close Opportunity"](../page/5128.md) (source table)
- [Page 5129 "Update Opportunity"](../page/5129.md) (source table)
- [Page 5130 "Opportunity Entries"](../page/5130.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 703 "Find Record Management"](../codeunit/703.md) (1 call: `GetLastEntryNo → GetLastEntryIntFieldValue`)
- [Codeunit 80 "Sales-Post"](../codeunit/80.md) (1 call: `GetSalesDocValue → SumSalesLines`)
- [Page 5129 "Update Opportunity"](../page/5129.md) (1 call: `StartWizard2 → (object)`)

## Recent changes

- 2026-07-14 [#9024 [Master] - Chance of success % does not validate correctly when using the action type "Update" in Opportunity](../../changes/bcapps/9024.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-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: "Opportunity Entry")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
