web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / xRMCenter / Key Notes of MS CRM Plugin ...

Key Notes of MS CRM Plugin Technology for beginners

nghieppham Profile Picture nghieppham 4,755

Microsoft Dynamic CRM support many technologies for extending Microsoft Dynamic xRM. Plugin is the most option used by developers. Actually plugin is just a class library was written by .Net and built in .Net. You can see all the document of Plugin technologies at link. This article just give overview and key note for plugin technology.

In fact, it has not any special change from 2011 version, there are just some major changing for supporting for developer such as:

  • Plugin code participated in database transaction
  • Sandbox allows running plugins in all deployments.

CRM Event Pipeline

You can read all information about it at this link. These points are important notes which you should know about Event Pipeline.

  • Each message creates a pipeline made up of various stages.
  • Plugin can be registered on different stages in the pipeline.
  • Event pipeline call to crm web service to execute messages.
  • Plugin is just a .Net class which implanted IPlugin interface of Microsoft.Xrm.Sdk library.
  • Plugin can be storage in database, GAC, disk.

Pre/Post Event Image

What is images?

  • Image is the snapshot of Entity stage at the runtime of plugin.
  • All attributes can be specified in registration.
  • Available via properties at runtime
    • Pre: Iplugin Execution Context Pre Entity Images.
    • Post: Iplugin Execution Context Post Entity Images.

Message support for Image

PrePost

Plugin life cycle

Plugin-Life

Plugin life cycle

  • CRM stages support plugin inside the database transaction
    • Stage 20 Pre-Operation
    • Stage 40 Post-Operation
  • Uncaught exceptions force a rollback
  • IExecution Context is in transaction

What is CRM sandbox?

Sandbox infrastructure

  • Sandbox is built on separated services (Sandbox Host Services)
    • One sandbox host per machine.
    • Round-robin load balanced across machines
  • New worker process for each organization.
  • Monitor the worker processes for CPU/Memory/Hanld usgae.
  • Gather statistics and reports back to CRM Organization database.

Sandbox can and cannot

  • Designed to allow isolated execution.
  • Support for CRM On-line and multi-tenant.
  • Robust tracking and code termination based on resource governor.
  • Sandbox plugin cannot access the resources: file system, registry, and database.
  • Sandbox plugin cannot use reflection to access internal member of assemblies
  • Sandbox plugin can access Web resource by using HTTP & HTTPs protocol
  • Sandbox plugin does not support for localhost
  • IP address cannot be used, must use friendly name of domain

 Improvement from CRM 2011 version

  • Able to join in database transaction
  • Create traces returns with exceptions
  • Plugin assemblies can have 2 isolation modes
    • None
    • Sandbox

Supported for custom entity?

  • Custom entities support the same base messages.
  • Custom Actions can be used to define new messages for plugin registration.
  • Plugin 2011, 2013 support for .Net 4.0
  • Plugin 2015, 2016 support for minimum .Net 4.5.2

These are features that CRM developer should remember.

Hope it will be useful for someone.

 

 



This was originally posted here.

Comments

*This post is locked for comments