Important Points To remember In MSCRM

Xrm.Page.getControl(“WebResource_DescriptionHTML“).getObject().contentWindow.document.getElementById(“divId1“) or (“bodyId“).

Context– Change data captured

PostImage will give all fields value


A plugin is run in the response to an execution pipeline event for which it is registered. The execution starts from Execute method and we pass an IServiceProvider object as a parameter , which contains a number of useful objects.

  • IpluginExecutionContext,
  • IOraganisationServiceFactory
  • ITracingService

The IPluginExecutionContext holds contextual information passed into a plugin.

This information is different for each type of plugin because it contains things like

  • primaryentityid
  • parentContextInputParameters (e.g. which holds the Target)

Defines the contextual information passed to a plug-in at run-time.

Contains information that describes the run-time environment that the plug-in is executing in, information related to the execution pipeline, and entity business information.
IpluginExecutionContext : is a runtime environment that executes plugin Due to this we r able to get all CRM Context and all input methods and we r able to retrieve them.
Access the Plugin Execution Context IPluginExecutionContext contains information that describes the run-time environment that the plug-in executes, information related to the execution pipeline, and entity business information.

The context is contained in the System.IServiceProvider parameter that is passed at run time to a plug-in through its Execute method.

// Obtain the execution context from the service provider.

IPluginExecutionContext context =


When a system event is fired that a plug-in is registered for, the system creates and populates the context and passes it to a plug-in through the previously mentioned classes and methods.

The execution context is passed to each registered plug-in in the pipeline when they are executed.
Note:Context contains the recently changed data.

To access the Microsoft Dynamics CRM organization service, it is required that plug-in code create an instance of the service through the ServiceProvider.GetService method.

// Obtain the organization service reference.

IOrganizationServiceFactory serviceFactory  =


IOrganizationService service =


It is not decided by DEV team whether we will go for managed or Unmanaged solution it depends on agreement b/n the customer and the comapnyif we dont want to share our source code then we should use Managed solutionthere is R&D team who is providing Managed solution they dont want to share source code bcoz it is being used by many teams.In our application there are Onsite and off-shore team and I am a part of Off-shore team and On-site team implemented some business logic and developed a managed solution in order to not to share with off-shore team.example: Third party vendor like Power Objects who are providing us managed solution bcoz they dont want to share the source code.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s