Search code examples
dynamics-crmdynamics-crm-2013dynamics-crm-onlinedynamics-crm-2015

Is there any Common Way for updating status using c# in Dynamics CRM


I want to update the status using single common way in c#.

For now I know about SetStateRequest but it did not change its status to any of status. e.g. If i want to change status to fulfilled for order or canceled for order then it requires FulfillSalesOrderRequest and CancelSalesOrderRequest .Like wise different different class for quote's status and others.

So I want some common way for change status.If is there any solution please suggest me.


Solution

  • If you are on CRM 2015 Update 1 or later, SetStateRequest has been deprecated in favor of a normal UpdateRequest, as seen on MSDN:

    Before Microsoft Dynamics CRM Online 2015 Update 1, specialized messages were required to update certain entity attribute values. Now, UpdateRequest can now be used to set these attributes. The following table identifies the specialized deprecated message requests and the related message attributes that can be updated using UpdateRequest.

    With that being said, FulfillSalesOrderRequest (and the corresponding Requests for quotes) have not been deprecated, so you still need to use them going forward. The common reqeust you are looking for does thus not exist.