Table Opportunity
Properties
| Name | Value |
|---|---|
| Caption | Opportunity |
| DataCaptionFields | 1,2 |
| DataClassification | CustomerContent |
| DrillDownPageID | Page Microsoft.CRM.Opportunity."Opportunity List" |
| LookupPageID | Page Microsoft.CRM.Opportunity."Opportunity List" |
Fields
| Name | Type | Description |
|---|---|---|
| "No." | Code[20] | Specifies the number of the involved entry or record, according to the specified number series. |
| Description | Text[100] | Specifies the description of the opportunity. |
| "Salesperson Code" | Code[20] | Specifies the code of the salesperson that is responsible for the opportunity. |
| "Campaign No." | Code[20] | Specifies the number of the campaign to which this opportunity is linked. |
| "Contact No." | Code[20] | Specifies the number of the contact that this opportunity is linked to. |
| "Contact Company No." | Code[20] | Specifies the number of the company that is linked to this opportunity. |
| "Sales Cycle Code" | Code[10] | Specifies the code of the sales cycle that the opportunity is linked to. |
| "Sales Document No." | Code[20] | Specifies the number of the sales document that has been created for this opportunity. |
| "Creation Date" | Date | Specifies the date that the opportunity was created. |
| Status | Enum Microsoft.CRM.Opportunity."Opportunity Status" | Specifies the status of the opportunity. There are four options: |
| Priority | Enum Microsoft.CRM.Opportunity."Opportunity Priority" | Specifies the priority of the opportunity. There are three options: |
| Closed | Boolean | Specifies that the opportunity is closed. |
| "Date Closed" | Date | Specifies the date the opportunity was closed. |
| "No. Series" | Code[20] | |
| Comment | Boolean | |
| "Current Sales Cycle Stage" | Integer | Specifies the current sales cycle stage of the opportunity. |
| "Estimated Value (LCY)" | Decimal | |
| "Probability %" | Decimal | Specifies the probability of the opportunity resulting in a sale. |
| "Calcd. Current Value (LCY)" | Decimal | |
| "Chances of Success %" | Decimal | Specifies the chances of success of the opportunity. |
| "Completed %" | Decimal | Specifies the percentage of the sales cycle that has been completed for this opportunity. |
| "Contact Name" | 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. |
| "Contact Company Name" | 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. |
| "Salesperson Name" | Text[50] | |
| "Campaign Description" | 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. |
| "Segment No." | Code[20] | Specifies the number of the segment (if any) that is linked to the opportunity. |
| "Estimated Closing Date" | Date | Specifies the estimated closing date of the opportunity. |
| "Sales Document Type" | Enum Microsoft.CRM.Opportunity."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. |
| "No. of Interactions" | Integer | Specifies the number of interactions linked to this opportunity. |
| "Coupled to CRM" | Boolean | |
| "Coupled to Dataverse" | Boolean | Specifies that the opportunity is coupled to an opportunity in Dynamics 365 Sales. |
| "Wizard Step" | Option | |
| "Activate First Stage" | 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. |
| "Segment Description" | Text[100] | Specifies a description of the segment that is related to the opportunity. The description is copied from the segment card. |
| "Wizard Estimated Value (LCY)" | Decimal | |
| "Wizard Chances of Success %" | Decimal | Specifies the value in the wizard for the opportunity. You can specify a percentage completion estimate in this field. |
| "Wizard Estimated Closing Date" | Date | Specifies a closing date for the opportunity from the wizard. |
| "Wizard Contact Name" | Text[100] | Specifies the contact who is involved in this opportunity. |
| "Wizard Campaign Description" | Text[100] | Specifies the campaign that the opportunity is related to. The description is copied from the campaign card. |
| SystemId | Guid | |
| SystemCreatedAt | DateTime | |
| SystemCreatedBy | Guid | |
| SystemModifiedAt | DateTime | |
| SystemModifiedBy | Guid | |
| SystemCreatedByUserName | Text[50] | |
| SystemCreatedByFullName | Text[80] | |
| SystemModifiedByUserName | Text[50] | |
| SystemModifiedByFullName | Text[80] | |
| SystemRowVersion | BigInteger |
Methods
CreateFromInteractionLogEntry
procedure CreateFromInteractionLogEntry(InteractionLogEntry: Record "Interaction Log Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| InteractionLogEntry | Table Microsoft.CRM.Interaction."Interaction Log Entry" |
CreateFromSegmentLine
procedure CreateFromSegmentLine(SegmentLine: Record "Segment Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SegmentLine | Table Microsoft.CRM.Segment."Segment Line" |
CreateOppFromOpp
procedure CreateOppFromOpp(var Opportunity: Record Opportunity)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity |
UpdateOpportunity
procedure UpdateOpportunity()
CloseOpportunity
procedure CloseOpportunity()
CreateQuote
procedure CreateQuote()
ShowQuote
procedure ShowQuote()
CheckStatus
procedure CheckStatus()
FinishWizard
procedure FinishWizard()
SetComments
procedure SetComments(var RMCommentLine: Record "Rlshp. Mgt. Comment Line")
Parameters
| Name | Type | Description |
|---|---|---|
| RMCommentLine | Table Microsoft.CRM.Comment."Rlshp. Mgt. Comment Line" |
ShowSalesQuoteWithCheck
procedure ShowSalesQuoteWithCheck()
SetSegmentFromFilter
procedure SetSegmentFromFilter()
SetContactFromFilter
procedure SetContactFromFilter()
StartActivateFirstStage
procedure StartActivateFirstStage()
SetDefaultSalesCycle
procedure SetDefaultSalesCycle()
SetCampaignFromFilter
procedure SetCampaignFromFilter()
Events
OnAfterFinishWizard
[IntegrationEvent(False,False)]
local procedure OnAfterFinishWizard(var Opportunity: Record Opportunity)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity |
OnAfterInsertOpportunity
[IntegrationEvent(True,False)]
local procedure OnAfterInsertOpportunity(var Opportunity: Record Opportunity)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity |
OnAfterStartActivateFirstStage
[IntegrationEvent(True,False)]
local procedure OnAfterStartActivateFirstStage(SalesCycleStage: Record "Sales Cycle Stage"; var OpportunityEntry: Record "Opportunity Entry"; var Opportunity: Record Opportunity)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesCycleStage | Table Microsoft.CRM.Opportunity."Sales Cycle Stage" | |
| OpportunityEntry | Table Microsoft.CRM.Opportunity."Opportunity Entry" | |
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity |
OnBeforeGetNewCustomerTemplateCode
[IntegrationEvent(True,False)]
local procedure OnBeforeGetNewCustomerTemplateCode(Cont: Record Contact; var CustTemplateCode: Code[20]; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Cont | Table Microsoft.CRM.Contact.Contact | |
| CustTemplateCode | Code[20] | |
| IsHandled | Boolean |
OnBeforeCheckStatus
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckStatus(var Opportunity: Record Opportunity; var OppEntry: Record "Opportunity Entry"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| OppEntry | Table Microsoft.CRM.Opportunity."Opportunity Entry" | |
| IsHandled | Boolean |
OnBeforeCheckCampaign
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckCampaign(var Opportunity: Record Opportunity; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| IsHandled | Boolean |
OnBeforeFinishWizard
[IntegrationEvent(False,False)]
local procedure OnBeforeFinishWizard(var Opportunity: Record Opportunity; var OpportunityEntry: Record "Opportunity Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| OpportunityEntry | Table Microsoft.CRM.Opportunity."Opportunity Entry" |
OnBeforeProcessFirstStage
[IntegrationEvent(False,False)]
local procedure OnBeforeProcessFirstStage(var Opportunity: Record Opportunity; var OpportunityEntry2: Record "Opportunity Entry"; ActivateFirstStage: Boolean; CalledForSegment: Boolean; SalesPersonCode: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| OpportunityEntry2 | Table Microsoft.CRM.Opportunity."Opportunity Entry" | |
| ActivateFirstStage | Boolean | |
| CalledForSegment | Boolean | |
| SalesPersonCode | Code[20] |
OnBeforeRunPageForRec
[IntegrationEvent(False,False)]
local procedure OnBeforeRunPageForRec(var Opportunity: Record Opportunity; var PageID: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| PageID | Integer |
OnCreateOppFromOppOnAfterInit
[IntegrationEvent(True,False)]
local procedure OnCreateOppFromOppOnAfterInit(var Opportunity: Record Opportunity; var DoSetDefaultSalesCycle: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| DoSetDefaultSalesCycle | Boolean |
OnCreateQuoteOnAfterSalesHeaderInsert
[IntegrationEvent(False,False)]
local procedure OnCreateQuoteOnAfterSalesHeaderInsert(var SalesHeader: Record "Sales Header"; var Opportunity: Record Opportunity)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeader | Table Microsoft.Sales.Document."Sales Header" | |
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity |
OnCreateQuoteOnBeforeSalesHeaderInsert
[IntegrationEvent(False,False)]
local procedure OnCreateQuoteOnBeforeSalesHeaderInsert(var SalesHeader: Record "Sales Header"; var Opportunity: Record Opportunity)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeader | Table Microsoft.Sales.Document."Sales Header" | |
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity |
OnCreateQuoteOnBeforePageRun
[IntegrationEvent(False,False)]
local procedure OnCreateQuoteOnBeforePageRun(var SalesHeader: Record "Sales Header"; var Opportunity: Record Opportunity)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeader | Table Microsoft.Sales.Document."Sales Header" | |
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity |
OnFinishWizardOnBeforeInsertOpportunity
[IntegrationEvent(False,False)]
local procedure OnFinishWizardOnBeforeInsertOpportunity(var Opportunity: Record Opportunity; var OppEntry: Record "Opportunity Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| OppEntry | Table Microsoft.CRM.Opportunity."Opportunity Entry" |
OnLookupCampaignsOnAfterSetFilters
[IntegrationEvent(False,False)]
local procedure OnLookupCampaignsOnAfterSetFilters(var Opportunity: Record Opportunity; var Campaign: Record Campaign)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| Campaign | Table Microsoft.CRM.Campaign.Campaign |
OnCreateFromCreateFromInteractionLogEntryOnBeforeInsert
[IntegrationEvent(False,False)]
local procedure OnCreateFromCreateFromInteractionLogEntryOnBeforeInsert(var Opportunity: Record Opportunity; InteractionLogEntry: Record "Interaction Log Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| InteractionLogEntry | Table Microsoft.CRM.Interaction."Interaction Log Entry" |
OnCreateFromSegmentLineOnBeforeInsert
[IntegrationEvent(False,False)]
local procedure OnCreateFromSegmentLineOnBeforeInsert(var Opportunity: Record Opportunity; SegmentLine: Record "Segment Line")
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| SegmentLine | Table Microsoft.CRM.Segment."Segment Line" |
OnBeforeRunQuotePage
[IntegrationEvent(False,False)]
local procedure OnBeforeRunQuotePage(var SalesHeader: Record "Sales Header"; Modal: Boolean; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeader | Table Microsoft.Sales.Document."Sales Header" | |
| Modal | Boolean | |
| IsHandled | Boolean |
OnCreateOppFromOppOnBeforeSetFilterSalesPersonCode
[IntegrationEvent(False,False)]
local procedure OnCreateOppFromOppOnBeforeSetFilterSalesPersonCode(var Opportunity: Record Opportunity; var IsHandled: Boolean; var FromOpportunity: Record Opportunity)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| IsHandled | Boolean | |
| FromOpportunity | Table Microsoft.CRM.Opportunity.Opportunity |
OnAfterProcessFirstStage
[IntegrationEvent(False,False)]
local procedure OnAfterProcessFirstStage(var OpportunityEntry: Record "Opportunity Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| OpportunityEntry | Table Microsoft.CRM.Opportunity."Opportunity Entry" |
OnBeforeValidateContactNo
[IntegrationEvent(False,False)]
local procedure OnBeforeValidateContactNo(var Opportunity: Record Opportunity; CurrentFieldNo: Integer; var IsHandled: Boolean; xOpportunity: Record Opportunity)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| CurrentFieldNo | Integer | |
| IsHandled | Boolean | |
| xOpportunity | Table Microsoft.CRM.Opportunity.Opportunity |
OnStartWizardBeforeInsert
[IntegrationEvent(False,False)]
local procedure OnStartWizardBeforeInsert(var Opportunity: Record Opportunity)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity |
OnStartActivateFirstStageOnBeforeSalesCycleStageFind
[IntegrationEvent(False,False)]
local procedure OnStartActivateFirstStageOnBeforeSalesCycleStageFind(var Opportunity: Record Opportunity; var SalesCycleStage: Record "Sales Cycle Stage")
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity | |
| SalesCycleStage | Table Microsoft.CRM.Opportunity."Sales Cycle Stage" |
OnBeforeUpdateOpportunity
[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateOpportunity(var Opportunity: Record Opportunity)
Parameters
| Name | Type | Description |
|---|---|---|
| Opportunity | Table Microsoft.CRM.Opportunity.Opportunity |