11.06.2010, 19:05 | #1 |
Участник
|
dynamics-community.at: Connect NAV/CRM Part III – Create a CRM Plug-in
Источник: http://feedproxy.google.com/~r/dynam...44OY/post.aspx
============== First of all, sorry for the long delay in going on writing part III. Posts like this are consuming “a little bit time” and its not so easy to write it down in few minutes. I want that it is possible for you to follow my steps and you are really able to reproduce it. Our last step was creating a web service and deploy it to the development environment. Now we are going on creating a plug-in in visual studio for CRM Requirements: · Microsoft Visual Studio C# (Minimum Express edition) · Microsoft CRM SDK · Administrator User Before we start I will introduce you in my concept. Working with CRM SDK offers different capabilities. I decided to working with Dynamic Entities because in my opinion it is more flexible. Anyway I am not the Microsoft CRM SDK specialist, so please if you want to have a discussion about this look into the web for Dynamics CRM MVP’s ;) · 1. Start Visual Studio C# · 2. Create a new project and select ClassLibrary · 3. Add the following references using Microsoft.Crm.Sdk; using Microsoft.Crm.SdkTypeProxy; using Microsoft.Crm.Sdk.Query; using System.Web.Services.Protocols; · 4. Plug-ins must implement the Microsoft.Crm.Sdk.IPlugin interface as shown here namespace CreateAccountNAV_BlogVersion { public class AccountInfoHandler : IPlugin { public void Execute(IPluginExecutionContext context) { // Do something here. } } } · 5. Around this interface we will now build the base statements about the current entity. Insert the code snippet between the execute method // Is there an existing entity if (context.InputParameters.Properties.Contains("Target") && context.InputParameters.Properties["Target"] is DynamicEntity) { // Get the current entity DynamicEntity entity = (DynamicEntity)context.InputParameters.Properties["Target"]; // is it the account entity if (entity.Name == EntityName.account.ToString()) { } …. HOW TO- Connect NAV and CRM using webservices Part II HOW TO- Connect NAV and CRM using webservices Part I Источник: http://feedproxy.google.com/~r/dynam...44OY/post.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|