-
Notifications
You must be signed in to change notification settings - Fork 14
Tutorial 1
PhuocLe edited this page Mar 6, 2018
·
25 revisions
- Add PL.DynamicsCrm.DevKit > 15. C# Shared Project to solution.
- PL.DynamicsCrm.DevKit created shared project name:
Wooow.Kool.Shared
- PL.DynamicsCrm.DevKit created shared project name:
- Add PL.DynamicsCrm.DevKit > 14. C# Plugin Project to solution.
- A popup form opened.
- Click button
><
(right of Project Name) to create a Dynamics 365 connection. After connected. Click OK to confirm used this connection.- PL.DynamicsCrm.DevKit loaded all entities and bind to dropdown project name.
- Select entity
Account
in the project name dropdown. - Select Crm Sdk Version
- PL.DynamicsCrm.DevKit get all
Microsoft.CrmSdk.CoreAssemblies
version from NuGet - Click right button
><
to make default select.
- PL.DynamicsCrm.DevKit get all
- Select .Net version
- 4.5.2 or 4.6.2
- Click right button
><
to make default select.
- Click OK
- PL.DynamicsCrm.DevKit created plugin project name:
Wooow.Kool.Plugin.Account
- Rebuild solution to restore NugGet packages and check solution rebuild all succeeded.
- Add PL.DynamicsCrm.DevKit > 08. C# Plugin Class to project
Wooow.Kool.Plugin.Account
- A popup form opened.
- Select saved connection or create new connection.
- PL.DynamicsCrm.DevKit load all messages plugin for entity
Account
and bind to dropdown Message.
- PL.DynamicsCrm.DevKit load all messages plugin for entity
- Select Message:
Create
- Stage:PreOperation
. (It automatic selectedSynchronous
execution and not allow you change) - Click OK
- PL.DynamicsCrm.DevKit created plugin class:
PreAccountCreateSynchronous
- Rebuild solution and received errors.
- Add PL.DynamicsCrm.DevKit > 20. C# PluginCore.cs to
Lib
folder ofWooow.Kool.Shared
project. - Back to
PreAccountCreateSynchronous
class and add missing using. - Rebuild solution without errors.
- Open Windows Explorer, go to current solution folder, then goto
packages\tools\PL.DynamicsCrm.DevKit.Cli.[version]
folder. Copy file:PL.DynamicsCrm.DevKit.Cli.json
to solution root folder. - Check solution root folder and you see 2 files:
PL.DynamicsCrm.DevKit.json
andPL.DynamicsCrm.DevKit.Cli.json
- Open file
PL.DynamicsCrm.DevKit.Cli.json
by Notepad and edit these information in section:plugins.profile = "DEBUG"
plugins.solution = "Kool"
plugins.includefiles = "Wooow.*.dll"
- Open command-line, go to
Wooow.Kool.Plugin.Account
folder, then rundeploy.bat
and waitingPL.DynamicsCrm.DevKit.Cli
deploy to Dynamics Crm. - Open
Plugin Registration Tool
and verify plugin deployed or not ! - Open Crm solution
Kool
and verify pluginWooow.Kool.Plugin.Account
added toPlug-in Assemblies
node and stepWooow.Kool.Plugin.Account.PreAccountCreateSynchronous
added toSdk Message Processing Steps
node. - Add PL.DynamicsCrm.DevKit > 21. C# Late Bound Class to
Entities
folder ofWooow.Kool.Shared
project.