CRM 註冊PlugIn 與 WorkFlow - 工具準備

CRM 註冊PlugIn 與 WorkFlow - 工具準備

在CRM SDK中已有附註冊PlugIn和 WorkFlow的工具,CRM SDK

下載SDK

解開壓縮後在\tools\pluginregistration 這裡有完整soucecode

不過這完全沒有編譯過= ="。

打開專案檔pluginregistrationtool.csproj,如果直接編譯就會看到一堆錯誤訊息 <囧>

image

話說檔案裡面夾雜了一個Readme = =…這裡有寫:

Installation Instructions

  1. Double-click the PluginRegistrationTool.sln file to open the solution in Visual Studio 2008.
  2. In Solution Explorer, right-click References and select Add Web Reference.
  3. Add a Web reference to the Visual Studio project named CrmSdk that refers to your Microsoft Dynamics CRM 4.0 server’s CrmService Web service. An example URL is http://localhost/mscrmservices/2007/CrmServiceWsdl.aspx.
  4. Add a Web reference named CrmSdk.Discovery that refers to your Microsoft Dynamics CRM 4.0 server’s CrmDiscoveryService Web service. An example is http://localhost/mscrmservices/2007/AD/CrmDiscoveryService.asmx.
  5. Add a Web reference named MetadataServiceSdk that refers to your Microsoft Dynamics CRM 4.0 server’s MetadataService Web service. An example is http://localhost/mscrmservices/2007/MetadataService.asmx.
  6. Compile the project by clicking Build Solution in the Build menu.

依照說明加入WebService參考

image

 

如果是遠端Server記得把localhost換成SERVER位置,參考名稱也記得依照上面的說明更換掉

對應3:

image

 

對應4:

 

image

 

對應5:

image

 

參考都加入完成後,終於可以編譯成功拉~

image

 

 

 

 

接著關掉VisualStudio 直接到Debug目錄開啟執行檔

image

 

接著下一篇要介紹如何註冊~

話說編譯過後的程式到哪都可以用了,不用再更改WebService參考= =