내 코드 샘플입니다 연락처를 만들고 업데이트 ... 사용자 정의 필드 MSCRM 여기에 4
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ProjectName.CrmSdk;
//The CrmSdk ref is to the webservice url.
//ServerName and OrgName are setup in code but not included.
//standard CRM service setup
CrmSdk.CrmAuthenticationToken token = new CrmSdk.CrmAuthenticationToken();
token.AuthenticationType = 0; //AD on premise
token.OrganizationName = orgName.ToString();
CrmService service = new CrmService();
service.Url = "http://" + serverName.ToString() + "/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
contact c = new contact();
c.firstname = "joe";
c.lastname = "Smack";
// I can not find or access this custom field when I go to create a contact.
c.new_customField = "Red Car";
이제 문제는, 내가 연락처 개체에 추가 한 사용자 정의 필드에 액세스 할 수 간단
. 내가 C#에서 연락처를 만들려고하고 모든 기본 필드는 사용자 정의 것들을 만들었습니다.고맙습니다.
서비스 참조를 지속적으로 업데이트하지 않으려면 DynamicEntity 개체를 사용하고 그런 식으로 업데이트 할 수 있습니다. – Matt
실제로 .. 단점은 단지 강력한 타이핑을 잃어 버리는 것입니다. 그러나 위쪽은 훨씬 더 많은 유연성과 일반적인 DynamicEntity에서 작동하는 특정 기능을 추상화하는 기능입니다. – PjL