Opportunity Entity Capabilities

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Each opportunity must be associated with at least one account or contact. Salespeople can track the following information in an opportunity: contact information, state and status information, salesperson, assignment of revenue credit, probability of closure, and projected closure dates. Opportunities can be linked with competitor information and analyzed to find effective selling strategies.

The following entities can be associated with an opportunity to provide a complete set of information about the sales engagement: activities, notes and attachments, competitors, quotes, orders, and sales literature.

The following illustration shows the entity relationships for this area. For more information, see Key to Entity Diagrams.

Opportunity entity model

The class for this entity is opportunity. For opportunities, you can use the messages listed in the following table with the Execute method.

Message Description
Assign Use this message to assign an opportunity to another user.

The information that is needed to assign the entity instance is specified in the TargetOwnedOpportunity class.

CalculateActualValueOpportunity Use this message to calculate the value of an opportunity.
Create Use this message to create an opportunity.

The information that is needed to create the entity instance is specified in the TargetCreateOpportunity class.

You can also call the Create method.

Delete Use this message to delete an opportunity.

The entity instance to delete is specified in the TargetDeleteOpportunity class.

You can also call the Delete method.

GrantAccess Use this message to share an opportunity with another security principal (user or team).

The information that is needed to grant access to the entity instance is specified in the TargetOwnedOpportunity class.

LoseOpportunity Use this message to change the state of an opportunity to Lost.

The possible states are defined in the OpportunityState enumeration.

ModifyAccess Use this message to change the access rights for an opportunity previously shared with another security principal (user or team).

The information that is needed to modify access to the entity instance is specified in the TargetOwnedOpportunity class.

RemoveRelated Use this message to remove the relationship between an opportunity and an account, contact or competitor.

The information that is needed to remove the relationship the two instances is specified in the TargetRelatedOpportunityToAccount class, the TargetRelatedOpportunityToContact class or the TargetRelatedOpportunityToCompetitor class.

Retrieve Use this message to retrieve an opportunity.

The entity instance to retrieve is specified in the TargetRetrieveOpportunity class.

You can also call the Retrieve method.

RetrieveMultiple Use this message to retrieve a collection of opportunities.

The query expression that describes the entity instances to retrieve is specified in the Query property of this request.

You can also call the RetrieveMultiple method.

RetrievePrincipalAccess Use this message to retrieve the access the specified security principal (user or team) has to an opportunity.

The entity instance to retrieve is specified in the TargetOwnedOpportunity class.

RetrieveSharedPrincipalsAndAccess Use this message to retrieve all the security principals (users or teams) that have access to an opportunity, together with their access rights to the opportunity.

The entity instance to retrieve is specified in the TargetOwnedOpportunity class.

RevokeAccess Use this message to remove all access to an opportunity for the specified security principal (user or team).

The information that is needed to revoke access to the entity instance is specified in the TargetOwnedOpportunity class.

SetRelated Use this message to create a relationship between an opportunity and an account, contact, or competitor.

The information that is needed to remove the relationship the two instances is specified in the TargetRelatedOpportunityToAccount class, the TargetRelatedOpportunityToContact class or the TargetRelatedOpportunityToCompetitor class.

SetStateDynamicEntity Use this message to set the state of an opportunity using a DynamicEntity instance.

The possible states are defined in the OpportunityState enumeration.

SetStateOpportunity Use this message to set the state of an opportunity.

The possible states are defined in the OpportunityState enumeration.

Update Use this message to update an opportunity.

The entity instance to update is specified in the TargetUpdateOpportunity class.

You can also use the Update method.

WinOpportunity Use this message to change the state of an opportunity to Won.

See Also

Concepts

Other Resources

© 2010 Microsoft Corporation. All rights reserved.