Wednesday, 4 January 2012

CRM 2011 Solution package using Visual Studio 2011


 
Now latest version of MS CRM 2011 include “Developer Toolkit” . Developer toolkit
include in SDK at “SDK\Tools\DeveloperToolkit”. Double click the
“CrmDeveloperTools_Installer.msi” to install the toolkit. Using this toolkit we 
can create and deploy custom workflow activity ,
Plugin and javascript in VS2010
 
In this Article I am going to explain how this toolkit works
 
1. After installing toolkit , open VS2010 and in left templates pane you can see
 Template with name “Dynamics CRM”. Click on Template now you see, In middle pane have
five option and in this project I am using first one .
 

 
2. As you select and click on OK button . Dialog box to connect CRM Server will appear
 
In this dialog box enter CRM Server name, Port number and protocol and click on connect
button. After this “Authentication Details” section will enable and fill your username,password and domain and click “Log On” Button
 
After this Organization and Solution Name picklist will enable and you can select your organization
name and select solution for development and as you click ok , all Type of solutions
come in “Solution Explorer” window and new Silverlight application dialog will display
 
 
Now you will see two explorer windows
 
1) CRM Explorer
 
2) Solution Explorer
 
Now with the help of SDK, I am explaining all features of both explorer windows
 
CRM Explorer :
 
Item Organization Name
Command Action Refresh
Description Refreshes the whole tree


 
Item Entities
Command Action Click on Entity Expand button
Description When you will click on entity expand button . you will see list of all entities

Command Action Refresh
Description Refreshes Entities
Command Action Generate Wrapper
Description Executes CRMSVCUTIL.exe to generate the strongly typed proxy classes. If you only have one plug-in project, this class is automatically added to this project; otherwise , the Generate Entity Wrappers dialog box lets you select which project to create the classes in.

Steps I need to generate strongly typed proxy classes using developer tool

Right Click on Entities node and from context menu select “Generate Wrapper” option



















Now "Generate Entity Wrapper" Dialog box will appear and you need to select project and after that click on “Generate” button











Now processing dialog box will appear and it will take few second or minute depend on your system configuration











As this dialog box will disappear you will see “Entities.cs” class under “Plugins” project



 
Command Action Create Plug-in for specific entity
Description Steps to Create Plug-in

Right Click on specific entity node and from context menu select “Create Plugin” option


Now “Create Plug-in” dialog box will appear .
















Select Message and fill unsecure/secure configuration message and click on “OK” button
















After clicking “OK” button , new plugin class will appear under “Plugin” Project solution and write your plugin logic in this class
























Plugin also appear in “CRM Explorer” under “Plug-in Assemblies”
















After adding plug-in, Now you need to signing your both workflow and plugin project with a strong name key file















Rebuild all Solutions




















Now time to deploy “CrmPackage” Solution






















As you deploy , plugin will registered and you can see plugin and workflow dll in “Crm Explorer” with different style















You can Add/Edit/Delete plugin and its step



















Now I am explaining how “CrmPackage” Solution store all information need to deploy

All information store in “RegisterFile.crmregister” under “CrmPackage” Solution

When Project start RegisterFile.crmregister file status






After Creating Step in plugin RegisterFile.crmregister file status










After deploying Step in plugin RegisterFile.crmregister file status



 
Command Action Double click on specific entity
Description Now no need to go back in CRM web client for customization . double click on entity name and entity customization form will display in VS 2010


Item Option Sets
Command Action Refresh
Description Refreshes option sets













Expand “Option Sets” node show all option sets


 
Command Action Double click on specific options set
Description Opens the option set definition


 
Item Web Resources
Command Action Refresh
Description Refreshes Web resources


 
Command Action Add to packaging project
Description Adds web resources of all types from the organization to the project



















“Add to packaging project” will add new folder with name “WebResources” in “CrmPackage” Solution with all webresources present in CRM Solution
















You can add new webresources also from VS2010



 
Item Process
Command Action Refresh
Description Refreshes Processes

On expanding process node will show “Dialogs” and “Workflows” nodes


 
Command Action Refresh specific dialog
Description Refreshes dialogs
 
Command Action Double click on specific dialog
Description Opens the dialog definition
 
Command Action Add/Edit/Delete specific dialog
Description We can add, edit, delete dialog from solution














As you click on “Add Workflow” , Create Process dialog box will appear










Fill process name and select entity from Entity dropdown










As you click on create button new process will display under workflow node and its information will also appear for further steps as you see in CRM webclient


 
Item Security Roles
Command Action Refresh
Description Refresh Security roles


 
Command Action Double click on specific security role
Description Opens the security role definition
 
Item Field Security Profiles
Command Action Refresh
Description Refreshes field security profiles

 
Command Action Double click on specific Security Profile
Description Opens the field security profile definition
 
Solution Explorer

 
Project CrmPackage
Role The manifest project that contains all assets to be deployed to Microsoft Dynamics CRM, combined with their deployment settings
 
Project Plugins
Role The Plugins project contains a base class named “Plugin” and classes generated through the create plugin option of the CRM Explorer will derive from this class.
 
Project SilverlightApplication
Role This project is used for develop new Silverlight web resource.
 
Project SilverlightApplication.Web
Role A companion web project that host the above Silverlight project, and can be used to test the Silverlight project.
 
Project Workflow
Role The Workflow project provides support for implementing custom workflow activities to be used for your on-premises Microsoft Dynamics CRM instance.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.