Dynamics crm 更新消息(CrmService)Dynamics 4.0
我想更新诸如cs_hv_additionnalspeciality、cs_hv_smscope等字段,但函数srv.Updatede;更新所有表单记录,我的意思是它会触发一个我不希望发生的工作流。 这是我的密码:Dynamics crm 更新消息(CrmService)Dynamics 4.0,dynamics-crm,dynamics-crm-4,dynamics-crm-2013,Dynamics Crm,Dynamics Crm 4,Dynamics Crm 2013,我想更新诸如cs_hv_additionnalspeciality、cs_hv_smscope等字段,但函数srv.Updatede;更新所有表单记录,我的意思是它会触发一个我不希望发生的工作流。 这是我的密码: // Retrieve the DynamicEntity that goes with target RetrieveRequest retrieve = new RetrieveRequest(); retrieve.Target = target
// Retrieve the DynamicEntity that goes with target
RetrieveRequest retrieve = new RetrieveRequest();
retrieve.Target = target;
retrieve.ColumnSet = new AllColumns();
retrieve.ReturnDynamicEntities = true;
// Create a response reference and execute the retrieve request.
RetrieveResponse response1 = (RetrieveResponse)srv.Execute(retrieve);
DynamicEntity de = (DynamicEntity)response1.BusinessEntity;
if (opp.Properties.Contains("cs_hv_additionnalparticularities"))
de["cs_hv_additionnalparticularities"] = opp["cs_hv_additionnalparticularities"];
if (opp.Properties.Contains("cs_hv_smscope"))
de["cs_hv_smscope"] = opp["cs_hv_smscope"];
if (opp.Properties.Contains("cs_hv_ugscope"))
de["cs_hv_ugscope"] = opp["cs_hv_ugscope"];
if (opp.Properties.Contains("cs_hv_acdc"))
de["cs_hv_acdc"] = opp["cs_hv_acdc"];
if (opp.Properties.Contains("cs_hv_smmv"))
de["cs_hv_smmv"] = opp["cs_hv_smmv"];
if (opp.Properties.Contains("cs_hv_smhv"))
de["cs_hv_smhv"] = opp["cs_hv_smhv"];
if (opp.Properties.Contains("cs_hv_ughv"))
de["cs_hv_ughv"] = opp["cs_hv_ughv"];
if (opp.Properties.Contains("cs_hvid"))
de["cs_hvid"] = opp["cs_hvid"];
de["cs_generercable"] = new CrmBoolean(true);
srv.Update(de);
我不想使用这个函数srv.Updatede;更新字段。
谁能给我一个更新函数代码来完成这项工作吗???如果你不想更新其他列,只需检索特定列属性ColumnSet,而不是新的AllColumns 您只能使用update方法更新记录,请确保您的工作流仅对请求的字段触发,而不对其他字段触发