在 Dynamics CRM 中使用 c# 更新状态是否有任何通用方法

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

我想在 C# 中使用单一通用方式更新状态。

目前我知道 SetStateRequest 但它没有将其状态更改为任何状态。 例如如果我想将状态更改为已完成订单或已取消订单,则需要 FulfillSalesOrderRequest 和 CancelSalesOrderRequest。对于报价的状态和其他,同样不同 class。

所以我想要一些通用的更改方法status.If有什么解决方案请给我建议。

如果您使用的是 CRM 2015 Update 1 或更高版本,SetStateRequest 已被弃用,取而代之的是普通的 UpdateRequest,如 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.

话虽如此,FulfillSalesOrderRequest(以及相应的报价请求)尚未弃用,因此您今后仍需要使用它们。您要查找的通用请求不存在