问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/39443614/is-there-any-common-way-for-updating-status-using-c-sharp-in-dynamics-crm