Dela via


Opportunity entity messages and methods

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

An opportunity represents a potential revenue-generating event, or sale to an account, that must be tracked through a sales process to completion. The schema name for this entity is Opportunity. To view the entity metadata for your organization, install the Metadata Browser solution described in Browse the metadata for your organization. You can also view the metadata for an uncustomized organization in the Excel file called EntityMetadata.xlsx included in the top-level folder of the SDK download.

The following table describes the messages for this entity, which you use with the IOrganizationService.Execute method.

Message

Description

AssignRequest

Assigns an opportunity to another user or team.

AssociateRequest

Creates a link between a record and one or more records that participate in a relationship. You can also use the IOrganizationService.Associate method. For more information, see Actions on entity records. For a list of default relationships for this entity, refer to the Opportunity entity metadata. You can find this information in the metadata for your organization. See the preceding metadata browser information.

CalculateActualValueOpportunityRequest

Calculates the value of an opportunity.

CreateRequest

Creates an opportunity. You can also call the IOrganizationService.Create method.

DeleteRequest

Deletes an opportunity. You can also call the IOrganizationService.Delete method.

DisassociateRequest

Removes a link between a record and one or more records that participate in a relationship. You can also use the IOrganizationService.Disassociate method. For more information, see Actions on entity records. For a list of default relationships for this entity, refer to the Opportunity entity metadata. You can find this information in the metadata for your organization. See the preceding metadata browser information.

GetQuantityDecimalRequest

Gets the quantity decimal value of a product for the entity specified in the target.

GrantAccessRequest

Shares an opportunity with another security principal (user or team).

InitializeFromRequest

Initializes a new record from an existing record provided that an attribute map is defined for the two entities. For more information, see Customize entity and attribute mappings.

IsValidStateTransitionRequest

Checks if the state transition is valid.

LoseOpportunityRequest

Sets the state of an opportunity. The possible states are defined in the Opportunity.Statecode attribute. If you’re using early bound types, use the OpportunityState enumeration..

ModifyAccessRequest

Changes the access rights for an opportunity previously shared with another security principal (user or team).

RemoveRelatedRequest

Deprecated. Removes the relationship between an opportunity and an account, contact, or competitor. Use DisassociateRequest or IOrganizationService.Disassociate instead.

RetrieveDuplicatesRequest

Detects and retrieves duplicate records for the specified record provided that duplicate detection is enabled and there are published duplicate detection rules for the entity. For more information, see Detect duplicate data.

RetrieveRequest

Retrieves an opportunity. You can also call the IOrganizationService.Retrieve method.

RetrieveMultipleRequest

Retrieves a collection of opportunities. You can also call the IOrganizationService.RetrieveMultiple method.

RetrievePrincipalAccessRequest

Retrieves the access rights the specified security principal (user or team) has to an opportunity.

RetrieveSharedPrincipalsAndAccessRequest

Retrieves the security principals (users or teams) that have access to an opportunity, together with their access rights to the opportunity.

RevokeAccessRequest

Removes all access rights to an opportunity for the specified security principal (user or team).

RollupRequest

Retrieves all the opportunities related to the specified record (account or contact).

SetRelatedRequest

Deprecated. Creates a relationship between an opportunity and an account, contact, or competitor. Use AssociateRequest or IOrganizationService.Associate instead.

SetStateRequest

Sets the state of an opportunity. If you are using early bound types, use the OpportunityState enumeration to set the possible states. For a list of the state values, refer to the Opportunity entity metadata. You can find this information in the metadata for your organization. See the preceding metadata browser information.

UpdateRequest

Updates an opportunity. You can also call the IOrganizationService.Update method.

WinOpportunityRequest

Changes the state of an opportunity to Won.

See Also

Opportunity entities
OpportunityProduct entity messages and methods
Privileges by entity

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright