Microsoft dynamic 批量更新
Posted longdb
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Microsoft dynamic 批量更新相关的知识,希望对你有一定的参考价值。
//批量处理 ExecuteMultipleRequest multipleRequest = new ExecuteMultipleRequest() { Settings = new ExecuteMultipleSettings() { ContinueOnError = false, ReturnResponses = false }, Requests = new OrganizationRequestCollection() }; //更新库存金额 for (int j = 0; j < ecIn.Entities.Count; j++) { ep_DyesChemicalsInventory Inventory = ecIn.Entities[j].ToEntity<ep_DyesChemicalsInventory>(); if (Inventory.GetAttributeValue<decimal>(inqty) <= 0 || Inventory.GetAttributeValue<Money>(inamount).Value <= 0) { continue; } Inventory.ep_Amount = new Money(Inventory.GetAttributeValue<decimal>(inqty) * price); updateRequest = new UpdateRequest { Target = Inventory }; multipleRequest.Requests.Add(updateRequest); //service.Update(objectentity); } if (multipleRequest.Requests.Count > 0) { service.Execute(multipleRequest);//批量更新 multipleRequest.Requests.Clear(); }
以上是关于Microsoft dynamic 批量更新的主要内容,如果未能解决你的问题,请参考以下文章
在Microsoft Dynamic 365/2016环境使用LinqPad查询数据(不使用linqpad Microsoft Dynamic 365 Driver)
可能是Salesforce与Microsoft Dynamics 365的最全面的比较
[Java - 调用WebService]{http://schemas.microsoft.com/ws/2005/05/addressing/none}ActionNotSupported(代码片
使用dynamic引发的异常:无法对 null 引用执行运行时绑定
从 Microsoft Dynamics CRM 4.0 server迁移到 Microsoft Dynamics CRM 2013 Server