CrmServiceClient.CloseOpportunity Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 = default);
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 = Nothing) As Guid
Parameters
- opportunityId
- Guid
ID of the opportunity to close
- fieldList
- Dictionary<String,CrmDataTypeWrapper>
List of fields for the Opportunity Close Entity
- opportunityStatusCode
- Int32
Status code of Opportunity, Should be either 1 or 2, defaults to 1 ( won )
- batchId
- 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