SetStateSalesOrder Message (CrmService)
![]() |
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
| Works for all deployment types | Works online and offline |
Sets the state of a sales order (order).
The relevant classes are specified in the following table.
| Type | Class |
| Request | SetStateSalesOrderRequest |
| Response | SetStateSalesOrderResponse |
| Entity | salesorder |
Remarks
To use this message, pass an instance of the SetStateSalesOrderRequest class as the request parameter in the Execute method.
The possible states are defined in the SalesOrderState enumeration. To perform this action, the caller must have access rights on the entity instance specified in the request class. For a list of required privileges, see SetState Privileges.
This message updates the salesorder entity properties statuscode and statecode.
You cannot use this message to set the state of an order to Invoiced. You must use the ConvertSalesOrderToInvoice message.
Example
For an example of how to use this message, see SetStateAccount.
See Also
Concepts
Reference
.gif)