Dynamics crm 2011 如何创建PostImage实体的新对象?
在这方面,作者提到了以下几点: 此外,我们正在阅读后图像和更新后图像,因为它是。这也造成了一个问题请创建实体的新对象,然后仅设置要更新的字段。然后更新记录Dynamics crm 2011 如何创建PostImage实体的新对象?,dynamics-crm-2011,dynamics-crm,Dynamics Crm 2011,Dynamics Crm,在这方面,作者提到了以下几点: 此外,我们正在阅读后图像和更新后图像,因为它是。这也造成了一个问题请创建实体的新对象,然后仅设置要更新的字段。然后更新记录 如何创建PostImage实体的新对象 后映像、前映像和目标都转换为实体 e、 g 上面这篇文章的作者建议,为了避免他的问题,你不应该直接编辑和更新context.PostEntityImage[“PostImageKey”],而是将你想要更新的属性映射到一个新的实体,就像这样 //context post image Entity Enti
如何创建PostImage实体的新对象 后映像、前映像和目标都转换为实体 e、 g 上面这篇文章的作者建议,为了避免他的问题,你不应该直接编辑和更新context.PostEntityImage[“PostImageKey”],而是将你想要更新的属性映射到一个新的实体,就像这样
//context post image Entity
Entity postMessageImage = (Entity)context.PostEntityImages["PostImage"];
//new Entity
Entity myEntity = new Entity("new_entityname");
//map and update
myEntity["attriubteName"] = postMessageImage["attributeName"];
myEntity["attriubteId"] = postMessageImage["attributeId"];
service.Update(myEntity);
我们通常声明一个post映像:
postMessageImage=(Entity)context.PostEntityImages[“PostImage”]代码>这会创建新的post实体对象吗?谢谢您的帮助。
//context post image Entity
Entity postMessageImage = (Entity)context.PostEntityImages["PostImage"];
//new Entity
Entity myEntity = new Entity("new_entityname");
//map and update
myEntity["attriubteName"] = postMessageImage["attributeName"];
myEntity["attriubteId"] = postMessageImage["attributeId"];
service.Update(myEntity);