开发者

i have created a entity and attributes in an entity but i want to modify the created attribute how can i do that in microsoft dynamic crm4.0

i want to modify the attribut already created in an entity but it is not allowing me to do such type开发者_如何学Go of modification is it possible to do that in microsoft dynamic crm 4.0


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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜