Tag: dynamics crm 2015

CRM 2015 SDK:反序列化程序不知道映射到此名称的任何类型

我目前正在使用CRM 2015 SDK。 我只是尝试使用此SDK更新C#中的值。 但由于某些原因,我试图弄明白,当我保存context时会出现问题。 有代码: foreach (KeyValuePair account in dicAccount) { //Calcul of url/login/date/key/customer values string generatedUrl = Utilities.GenerateURL(url, login, date, key, customer); account.Value.new_Link = generatedUrl; if (!context.IsAttached(account.Value)) { context.Attach(account.Value); } context.UpdateObject(account.Value); } SaveChangesResultCollection results = context.SaveChanges(SaveChangesOptions.ContinueOnError); if (results != null) { foreach (SaveChangesResult result in results) { Type type = result.Request.GetType(); bool hasError […]

如何使用CrmServiceClient设置null属性值

我正在努力使用CrmServiceClient将属性值更新为null。 我的代码适用于非null值,但失败并出现exception: 你调用的对象是空的。 2 Field, AttributeCollection PropertyList) at Microsoft.Xrm.Tooling.Connector.CrmServiceClient.UpdateEntity(String entityName, String keyFieldName, Guid id, Dictionary 2 fieldList,String applyToSolution,Boolean 2 Field, AttributeCollection PropertyList) at Microsoft.Xrm.Tooling.Connector.CrmServiceClient.UpdateEntity(String entityName, String keyFieldName, Guid id, Dictionary中的Microsoft.Xrm.Tooling.Connector.CrmServiceClient.AddValueToPropertyList(KeyValuePair 2 Field, AttributeCollection PropertyList) at Microsoft.Xrm.Tooling.Connector.CrmServiceClient.UpdateEntity(String entityName, String keyFieldName, Guid id, Dictionary enabledDuplicateDetection,Guid batchId) 每当我尝试设置一个空值。 到目前为止,我尝试了以下内容: // create Crm service client object CrmServiceClient svc = […]

在服务器端更新字段后,防止触发OnChange函数

当我将OnChange函数注册到字段时,如果在服务器端的插件上更新字段,则会触发它(On Dynamics Crm 2015) 是否可以阻止此行为(以受支持的方式)? 示例代码: 1.客户方: Xrm.Page.getAttribute(“org_myfield”).addOnChange(function () { alert(“org_myfield was changed”) }); 2.服务器端: internal void OnPreUpdateRequest(org_myentity target, org_myentity preImage) { target.org_myfield = “some value”; } 3.结果 (保存记录和插件完成运行后): “org_myfield was changed” 必需结果:不应触发警报。