询问者
MSCRM 如何发布自定义实体

问题
全部回复
-
可以参考以下的代码。
// 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 request. PublishAllXmlRequest request = new PublishAllXmlRequest(); // Execute the request. PublishAllXmlResponse response = (PublishAllXmlResponse)service.Execute(request); }
Darren Liu (MSFT) | 刘嘉鸿 | Blog: http://liudarren.spaces.live.com