我已经在实体中创建了一个实体和属性,但我想修改创建的属性,我该如何在 Microsoft Dynamic crm4.0 中执行此操作

发布于 2024-10-06 06:03:15 字数 72 浏览 2 评论 0原文

我想修改已在实体中创建的属性,但它不允许我进行此类修改是否可以在 Microsoft Dynamic CRM 4.0 中执行此操作

i want to modify the attribut already created in an entity but it is not allowing me to do such type of modification is it possible to do that in microsoft dynamic crm 4.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

霓裳挽歌倾城醉 2024-10-13 06:03:15

问题有点模糊,是要更新属性的值还是属性类型?以下是 SDK 文档中的更新示例。要记住的重要一点是设置主键。

// Set up the CRM Service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0; 
token.OrganizationName = "AdventureWorksCycle";

CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create the contact object.
contact contact = new contact();

// The contactid is a key that references the ID of the contact to be updated. !Important.
contact.contactid = new Key();
// The contactid.Value is the GUID of the record to be changed.
contact.contactid.Value = new Guid("4D507FFE-ED25-447B-80DE-00AE3EB18B84");

// Set the contact object properties to be updated.
contact.address1_line1 = "34 Market St.";

// Update the contact.
service.Update(contact);

The question is a bit vague, do you want to update the value of the attribute or the attributes type? Here is an update example from the SDK documentation. The important thing to remember is setting the primary key.

// Set up the CRM Service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0; 
token.OrganizationName = "AdventureWorksCycle";

CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create the contact object.
contact contact = new contact();

// The contactid is a key that references the ID of the contact to be updated. !Important.
contact.contactid = new Key();
// The contactid.Value is the GUID of the record to be changed.
contact.contactid.Value = new Guid("4D507FFE-ED25-447B-80DE-00AE3EB18B84");

// Set the contact object properties to be updated.
contact.address1_line1 = "34 Market St.";

// Update the contact.
service.Update(contact);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文