Share via


QualifyLeadRequest Class

Definition

Contains the data that is needed to qualify a lead and create account, contact, and opportunity records that are linked to the originating lead record.

public ref class QualifyLeadRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class QualifyLeadRequest : Microsoft.Xrm.Sdk.OrganizationRequest
[<System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")>]
type QualifyLeadRequest = class
    inherit OrganizationRequest
Public NotInheritable Class QualifyLeadRequest
Inherits OrganizationRequest
Inheritance
QualifyLeadRequest
Attributes

Examples

The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface instance. For the complete sample, see the link later in this topic.

Remarks

This message requires Dynamics 365 Sales.

For the Web API use the QualifyLead action.

Usage

Pass an instance of this class to the Execute(OrganizationRequest) method, which returns an instance of the QualifyLeadResponse class.

Privileges and Access Rights

To perform this action, the caller must have privileges on the Lead, Account, Contact, Opportunity, TransactionCurrency, and Campaign entities. The caller must also have access rights on the specified records in the following properties: LeadId, OpportunityCurrencyId, OpportunityCustomerId, and SourceCampaignId. For a complete list of required privileges, see QualifyLead message privileges.

Notes for Callers

If SharePoint integration is enabled, the document location records for the lead are copied for the newly created account, contact, and opportunity.

If you set the CreateAccount property and the CreateContact property to true, the created account becomes a parent (Contact.Parentcustomerid) of the contact and the contact becomes a primary contact (Account.PrimaryContactId) for the account.

Constructors

QualifyLeadRequest()

Initializes a new instance of the QualifyLeadRequest class.

Properties

CreateAccount

Gets or sets a value that indicates whether to create an account from the originating lead. Required.

CreateContact

Gets or sets a value that indicates whether to create a contact from the originating lead. Required.

CreateOpportunity

Gets or sets a value that indicates whether to create an opportunity from the originating lead. Required.

ExtensionData

Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)
Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
LeadId

Gets or sets the ID of the lead that is qualified. Required.

OpportunityCurrencyId

Gets or sets the currency to use for this opportunity. Required.

OpportunityCustomerId

Gets or set the account or contact that is associated with the opportunity. Required.

Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
ProcessInstanceId

Gets or sets the ID of a business process flow instance running for the Lead record that should be set for the Opportunity record (created on qualifying the Lead record). Optional.

RequestId

Gets or sets the ID of the request. Optional.

(Inherited from OrganizationRequest)
RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
SourceCampaignId

Gets or sets the source campaign that is associated with the opportunity. Required.

Status

Gets or sets the status of the lead. Required.

Applies to

See also