Table 5092 "Opportunity"
Base Application · Microsoft.CRM.Opportunity
Across versions
- BC23present
- BC2410 fields changed, 2 events changed
- BC252 events added, 1 events removed
- BC263 events added, 2 events removed
- BC277 fields changed
- BC2831 fields changed
- BC29-30unchanged
Neighbourhood 38 connected objects and pages
Base Application · Microsoft.CRM.Opportunity · BC23-30 · source at ea08af5e · facts from BC29
Learn documents this table through its pages: Page 30070 “APIV2 - Opportunities” (5 Learn pages).
Properties
| Property | Value |
|---|---|
| Caption | Opportunity |
| 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. Δ BC28 | Code[20] | Specifies the number of the involved entry or record, according to the specified number series. | |
| 2 | Description Δ BC28 | Text[100] | Specifies the description of the opportunity. | |
| 3 | Salesperson Code Δ BC28 | Code[20] | Specifies the code of the salesperson that is responsible for the opportunity. | TableRelation Table 13 “Salesperson/Purchaser” (“Salesperson/Purchaser” where(Blocked = const(false))) |
| 4 | Campaign No. Δ BC28 | Code[20] | Specifies the number of the campaign to which this opportunity is linked. | TableRelation Table 5071 “Campaign” |
| 5 | Contact No. Δ BC28 | Code[20] | Specifies the number of the contact that this opportunity is linked to. | TableRelation Table 5050 “Contact” |
| 6 | Contact Company No. Δ BC28 | Code[20] | Specifies the number of the company that is linked to this opportunity. | TableRelation Table 5050 “Contact” (Contact where(Type = const(Company))) |
| 7 | Sales Cycle Code Δ BC28 | Code[10] | Specifies the code of the sales cycle that the opportunity is linked to. | TableRelation Table 5090 “Sales Cycle” (Sales Cycle) |
| 8 | Sales Document No. Δ BC28 | Code[20] | Specifies the number of the sales document that has been created for this opportunity. | TableRelation Table 36 “Sales Header” (if (“Sales Document Type” = const(Quote)) “Sales Header”.“No.” where(“Document Type” = const(Quote), “Sell-to Contact No.” = field(“Contact No.”)) else if (“Sales Document Type” = const(Order)) “Sales Header”.“No.” where(“Document Type” = const(Order), “Sell-to Contact No.” = field(“Contact No.”)) e…) |
| 9 | Creation Date Δ BC28 | Date | Specifies the date that the opportunity was created. | |
| 10 | Status Δ BC28 | Enum “Opportunity Status” | Specifies the status of the opportunity. There are four options: | enum Enum 5092 “Opportunity Status”; not editable |
| 11 | Priority Δ BC28 | Enum “Opportunity Priority” | Specifies the priority of the opportunity. There are three options: | enum Enum 5093 “Opportunity Priority” |
| 12 | Closed Δ BC28 | Boolean | Specifies that the opportunity is closed. | not editable |
| 13 | Date Closed Δ BC28 | Date | Specifies the date the opportunity was closed. | not editable |
| 15 | No. Series | Code[20] | — | TableRelation Table 308 “No. Series” (No. Series); not editable |
| 16 | Comment | Boolean | — | FlowField: exist(“Rlshp. Mgt. Comment Line” where(“Table Name” = const(Opportunity), “No.” = field(“No.”))); not editable |
| 17 | Current Sales Cycle Stage Δ BC24 Δ BC28 | Integer | Specifies the current sales cycle stage of the opportunity. | FlowField: lookup(“Opportunity Entry”.“Sales Cycle Stage” where(“Opportunity No.” = field(“No.”), Active = const(true))); not editable |
| 18 | Estimated Value (LCY) Δ BC27 | Decimal | Specifies the estimated value of the opportunity. via Page 5127 “Opportunity Statistics” | FlowField: sum(“Opportunity Entry”.“Estimated Value (LCY)” where(“Opportunity No.” = field(“No.”), Active = const(true))); not editable |
| 19 | Probability % Δ BC24 Δ BC27 Δ BC28 | Decimal | Specifies the probability of the opportunity resulting in a sale. | FlowField: lookup(“Opportunity Entry”.“Probability %” where(“Opportunity No.” = field(“No.”), Active = const(true))); not editable |
| 20 | Calcd. Current Value (LCY) Δ BC27 | Decimal | Specifies the current calculated value of the opportunity. via Page 5127 “Opportunity Statistics” | FlowField: sum(“Opportunity Entry”.“Calcd. Current Value (LCY)” where(“Opportunity No.” = field(“No.”), Active = const(true))); not editable |
| 21 | Chances of Success % Δ BC24 Δ BC27 Δ BC28 | Decimal | Specifies the chances of success of the opportunity. | FlowField: lookup(“Opportunity Entry”.“Chances of Success %” where(“Opportunity No.” = field(“No.”), Active = const(true))); not editable |
| 22 | Completed % Δ BC24 Δ BC27 Δ BC28 | Decimal | Specifies the percentage of the sales cycle that has been completed for this opportunity. | FlowField: lookup(“Opportunity Entry”.“Completed %” where(“Opportunity No.” = field(“No.”), Active = const(true))); not editable |
| 23 | Contact Name Δ BC24 Δ BC28 | Text[100] | Specifies the name of the contact to which this opportunity is linked. The program automatically fills in this field when you have entered a number in the No. field. | FlowField: lookup(Contact.Name where(“No.” = field(“Contact No.”))); not editable |
| 24 | Contact Company Name Δ BC24 Δ BC28 | Text[100] | Specifies the name of the company of the contact person to which this opportunity is linked. The program automatically fills in this field when you have entered a number in the Contact Company No. field. | FlowField: lookup(Contact.Name where(“No.” = field(“Contact Company No.”))); not editable |
| 25 | Salesperson Name Δ BC24 | Text[50] | — | FlowField: lookup(“Salesperson/Purchaser”.Name where(Code = field(“Salesperson Code”))); not editable |
| 26 | Campaign Description Δ BC24 Δ BC28 | Text[100] | Specifies the description of the campaign to which the opportunity is linked. The program automatically fills in this field when you have entered a number in the Campaign No. field. | FlowField: lookup(Campaign.Description where(“No.” = field(“Campaign No.”))); not editable |
| 27 | Segment No. Δ BC28 | Code[20] | Specifies the number of the segment (if any) that is linked to the opportunity. | TableRelation Table 5076 “Segment Header” (Segment Header) |
| 28 | Estimated Closing Date Δ BC24 Δ BC28 | Date | Specifies the estimated closing date of the opportunity. | FlowField: lookup(“Opportunity Entry”.“Estimated Close Date” where(“Opportunity No.” = field(“No.”), Active = const(true))); not editable |
| 29 | Sales Document Type Δ BC28 | Enum “Opportunity Document Type” | Specifies the type of the sales document (Quote, Order, Posted Invoice). The combination of Sales Document No. and Sales Document Type specifies which sales document is assigned to the opportunity. | enum Enum 5096 “Opportunity Document Type” |
| 30 | No. of Interactions Δ BC24 Δ BC28 | Integer | Specifies the number of interactions linked to this opportunity. | FlowField: count(“Interaction Log Entry” where(“Opportunity No.” = field(filter(“No.”)), Canceled = const(false), Postponed = const(false))); not editable |
| 720 | Coupled to CRM Δ BC26 | Boolean | Coupled to Dynamics 365 Sales caption | obsolete Removed 26.0; #if not CLEANSCHEMA26; not editable |
| 721 | Coupled to Dataverse Δ BC28 | Boolean | Specifies that the opportunity is coupled to an opportunity in Dynamics 365 Sales. | FlowField: exist(“CRM Integration Record” where(“Integration ID” = field(SystemId), “Table ID” = const(Database::Opportunity))); not editable |
| 9501 | Wizard Step | Option | — | OptionCaption: ,1,2,3,4,5,6; not editable |
| 9502 | Activate First Stage Δ BC28 | Boolean | Specifies if the opportunity is to be activated. If you select the check box, then you can fill out the remainder of the fields on this page. In the Opportunity Card window, the status is set to In Progress. | |
| 9503 | Segment Description Δ BC28 | Text[100] | Specifies a description of the segment that is related to the opportunity. The description is copied from the segment card. | |
| 9504 | Wizard Estimated Value (LCY) Δ BC27 | Decimal | Specifies the value in the wizard for the opportunity. You can specify an estimated value of the opportunity in local currency in this field. via Page 5126 “Create Opportunity” | |
| 9505 | Wizard Chances of Success % Δ BC27 Δ BC28 | Decimal | Specifies the value in the wizard for the opportunity. You can specify a percentage completion estimate in this field. | |
| 9506 | Wizard Estimated Closing Date Δ BC28 | Date | Specifies a closing date for the opportunity from the wizard. | |
| 9507 | Wizard Contact Name Δ BC28 | Text[100] | Specifies the contact who is involved in this opportunity. | |
| 9508 | Wizard Campaign Description Δ BC28 | Text[100] | Specifies the campaign that the opportunity is related to. The description is copied from the campaign card. |
Keys
- Key1: No. (clustered)
- Key2: Contact Company No., Contact No., Closed
- Key3: Salesperson Code, Closed
- Key4: Campaign No., Closed
- Key5: Segment No., Closed
- Key6: Sales Document Type, Sales Document No.
- Key7: Description
- Key8: SystemModifiedAt
Events published
OnAfterFinishWizard(var Opportunity: Record Opportunity)(integration)OnAfterInsertOpportunity(var Opportunity: Record Opportunity)(integration)OnAfterStartActivateFirstStage(SalesCycleStage: Record "Sales Cycle Stage"; var OpportunityEntry: Record "Opportunity Entry"; var Opportunity: Record Opportunity)(integration)- subscribers: Codeunit 38506 “Opportunities External Events” OnAfterStartActivateFirstStage
OnBeforeGetNewCustomerTemplateCode(Cont: Record Contact; var CustTemplateCode: Code[20]; var IsHandled: Boolean)(integration)OnBeforeCheckStatus(var Opportunity: Record Opportunity; var OppEntry: Record "Opportunity Entry"; var IsHandled: Boolean)(integration)OnBeforeCheckCampaign(var Opportunity: Record Opportunity; var IsHandled: Boolean)(integration)OnBeforeFinishWizard(var Opportunity: Record Opportunity; var OpportunityEntry: Record "Opportunity Entry")(integration)OnBeforeProcessFirstStage(var Opportunity: Record Opportunity; var OpportunityEntry2: Record "Opportunity Entry"; ActivateFirstStage: Boolean; CalledForSegment: Boolean; SalesPersonCode: Code[20])(integration)OnBeforeRunPageForRec(var Opportunity: Record Opportunity; var PageID: Integer)(integration)OnCreateOppFromOppOnAfterInit(var Opportunity: Record Opportunity; var DoSetDefaultSalesCycle: Boolean)+ BC26 − BC26 (integration)OnCreateQuoteOnAfterSalesHeaderInsert(var SalesHeader: Record "Sales Header"; var Opportunity: Record Opportunity)Δ BC24 (integration)OnCreateQuoteOnBeforeSalesHeaderInsert(var SalesHeader: Record "Sales Header"; var Opportunity: Record Opportunity)Δ BC24 (integration)OnCreateQuoteOnBeforePageRun(var SalesHeader: Record "Sales Header"; var Opportunity: Record Opportunity)(integration)- subscribers: Codeunit 38506 “Opportunities External Events” OnCreateQuote
OnFinishWizardOnBeforeInsertOpportunity(var Opportunity: Record Opportunity; var OppEntry: Record "Opportunity Entry")(integration)OnLookupCampaignsOnAfterSetFilters(var Opportunity: Record Opportunity; var Campaign: Record Campaign)(integration)OnCreateFromCreateFromInteractionLogEntryOnBeforeInsert(var Opportunity: Record Opportunity; InteractionLogEntry: Record "Interaction Log Entry")(integration)OnCreateFromSegmentLineOnBeforeInsert(var Opportunity: Record Opportunity; SegmentLine: Record "Segment Line")(integration)OnBeforeRunQuotePage(var SalesHeader: Record "Sales Header"; Modal: Boolean; var IsHandled: Boolean)(integration)OnCreateOppFromOppOnBeforeSetFilterSalesPersonCode(var Opportunity: Record Opportunity; var IsHandled: Boolean; var FromOpportunity: Record Opportunity)+ BC26 − BC26 (integration)OnAfterProcessFirstStage(var OpportunityEntry: Record "Opportunity Entry")(integration)OnBeforeValidateContactNo(var Opportunity: Record Opportunity; CurrentFieldNo: Integer; var IsHandled: Boolean; xOpportunity: Record Opportunity)+ BC24 + BC25 − BC25 (integration)OnStartWizardBeforeInsert(var Opportunity: Record Opportunity)+ BC24 (integration)OnStartActivateFirstStageOnBeforeSalesCycleStageFind(var Opportunity: Record Opportunity; var SalesCycleStage: Record "Sales Cycle Stage")+ BC25 (integration)OnBeforeUpdateOpportunity(var Opportunity: Record Opportunity)+ BC26 (integration)
Trigger event subscribers
- OnAfterDeleteEvent: Codeunit 1173 “Document Attachment Mgmt” DeleteAttachedDocumentsOnAfterDeleteOpportunity
- OnAfterRenameEvent: Codeunit 1173 “Document Attachment Mgmt” MoveAttachedDocumentsOnAfterRenameOpportunity
Procedures
CreateFromInteractionLogEntry(InteractionLogEntry: Record "Interaction Log Entry")CreateFromSegmentLine(SegmentLine: Record "Segment Line")CreateOppFromOpp(var Opportunity: Record Opportunity)UpdateOpportunity()CloseOpportunity()CreateQuote()ShowQuote()CheckStatus()FinishWizard()SetComments(var RMCommentLine: Record "Rlshp. Mgt. Comment Line")ShowSalesQuoteWithCheck()SetSegmentFromFilter()SetContactFromFilter()StartActivateFirstStage()SetDefaultSalesCycle()SetCampaignFromFilter()
Plus 19 local procedures.
Triggers
OnDelete, OnInsert
Relations
- drill-down page Page 5123 “Opportunity List”
- lookup page Page 5123 “Opportunity List”
- Salesperson Name: CalcFormula Table 13 “Salesperson/Purchaser”
- Salesperson Code: TableRelation Table 13 “Salesperson/Purchaser”
- No. Series: TableRelation Table 308 “No. Series”
- Sales Document No.: TableRelation Table 36 “Sales Header” (conditional)
- Contact Company Name: CalcFormula Table 5050 “Contact”
- Contact Name: CalcFormula Table 5050 “Contact”
- Contact Company No.: TableRelation Table 5050 “Contact”
- Contact No.: TableRelation Table 5050 “Contact”
- Comment: CalcFormula Table 5061 “Rlshp. Mgt. Comment Line”
- No. of Interactions: CalcFormula Table 5065 “Interaction Log Entry”
- Campaign Description: CalcFormula Table 5071 “Campaign”
- Campaign No.: TableRelation Table 5071 “Campaign”
- Segment No.: TableRelation Table 5076 “Segment Header”
- Sales Cycle Code: TableRelation Table 5090 “Sales Cycle”
- Calcd. Current Value (LCY): CalcFormula Table 5093 “Opportunity Entry”
- Chances of Success %: CalcFormula Table 5093 “Opportunity Entry”
- Completed %: CalcFormula Table 5093 “Opportunity Entry”
- Current Sales Cycle Stage: CalcFormula Table 5093 “Opportunity Entry”
- Estimated Closing Date: CalcFormula Table 5093 “Opportunity Entry”
- Estimated Value (LCY): CalcFormula Table 5093 “Opportunity Entry”
- Probability %: CalcFormula Table 5093 “Opportunity Entry”
- Coupled to Dataverse: CalcFormula Table 5331 “CRM Integration Record”
Referenced by
11 fields in 9 objects relate to this table (TableRelation or CalcFormula).
- Table 5080 “To-do”: Opportunity Description, Opportunity No.
- Table 9063 “Relationship Mgmt. Cue”: Closed Opportunities, Open Opportunities
- Table 110 “Sales Shipment Header”: Opportunity No.
- Table 112 “Sales Invoice Header”: Opportunity No.
- Table 114 “Sales Cr.Memo Header”: Opportunity No.
- Table 5065 “Interaction Log Entry”: Opportunity No.
- Table 5077 “Segment Line”: Opportunity No.
- Table 5093 “Opportunity Entry”: Opportunity No.
- Table 6660 “Return Receipt Header”: Opportunity No.
Pages and codeunits on this table
- Page 30070 “APIV2 - Opportunities” (source table)
- Page 5123 “Opportunity List” (source table)
- Page 5124 “Opportunity Card” (source table)
- Page 5126 “Create Opportunity” (source table)
- Page 5127 “Opportunity Statistics” (source table)
- Page 5132 “Active Opportunity List” (source table)
- Page 5174 “Opportunity Statistics FactBox” (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 1381 “Customer Templ. Mgt.” (1 call:
GetNewCustomerTemplateCode → SelectCustomerTemplate) - Codeunit 27 “Confirm Management” (1 call:
StartActivateFirstStage → GetResponse) - Page 41 “Sales Quote” (1 call:
RunQuotePage → (object)) - Page 456 “No. Series” (1 call:
OnInsert → (object))
Deprecations
- field Coupled to CRM: Removed 26.0 (#if not CLEANSCHEMA26), “Replaced by flow field Coupled to Dataverse”
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"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.