如何以编程方式导出CRM自定义

时间:2009-12-10 09:26:41

标签: dynamics-crm

我们如何以编程方式导出所有实体的自定义。

或动态获取实体表单的元数据

1 个答案:

答案 0 :(得分:1)

Here's a sample from the 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 request.
ExportAllXmlRequest request = new ExportAllXmlRequest();

// Execute the request.
ExportAllXmlResponse response = (ExportAllXmlResponse)service.Execute(request);