CrmServiceClient.CloseOpportunity(Guid, Dictionary<String,CrmDataTypeWrapper>, Int32, Guid) CrmServiceClient.CloseOpportunity(Guid, Dictionary<String,CrmDataTypeWrapper>, Int32, Guid) CrmServiceClient.CloseOpportunity(Guid, Dictionary<String,CrmDataTypeWrapper>, Int32, Guid) Method

Definition

This will close an opportunity as either Won or lost in CRM

public Guid CloseOpportunity (Guid opportunityId, System.Collections.Generic.Dictionary<string,Microsoft.Xrm.Tooling.Connector.CrmDataTypeWrapper> fieldList, int opportunityStatusCode = 3, Guid batchId = null);
member this.CloseOpportunity : Guid * System.Collections.Generic.Dictionary<string, Microsoft.Xrm.Tooling.Connector.CrmDataTypeWrapper> * int * Guid -> Guid
Public Function CloseOpportunity (opportunityId As Guid, fieldList As Dictionary(Of String, CrmDataTypeWrapper), Optional opportunityStatusCode As Integer = 3, Optional batchId As Guid = null) As Guid

Parameters

opportunityId
Guid Guid Guid

ID of the opportunity to close

fieldList
Dictionary<String,CrmDataTypeWrapper>

List of fields for the Opportunity Close Entity

opportunityStatusCode
Int32 Int32 Int32

Status code of Opportunity, Should be either 1 or 2, defaults to 1 ( won )

batchId
Guid Guid Guid

Optional: if set to a valid GUID, generated by the Create Batch Request Method, will assigned the request to the batch for later execution, on fail, runs the request immediately

Returns

Remarks

Applies to