Showing posts with label Customization. Show all posts
Showing posts with label Customization. Show all posts

Wednesday, February 26, 2014

Integration Guide: Microsoft Dynamics CRM Online and Office 365

Thanks to Jim Holtzman for sharing and making it available on the Download center

Some of what this paper covers:

  • Add an Office 365 trial subscription to Microsoft Dynamics CRM Online
  • Set up CRM Online to use Exchange Online
  • Set up CRM Online to use SharePoint Online
  • Set up CRM Online to use Lync Online
  • Set up CRM Online to  use Yammer

MSDN CRM Blog - Integration Guide: Microsoft Dynamics CRM Online and Office 365

Available from the Download Center:

http://download.microsoft.com/download/D/4/F/D4F5A3C3-E3CB-48C9-85DE-4ED0B7FFBD60/CRMO365Integration.pdf

Monday, July 4, 2011

Microsoft Dynamics CRM 4.0 Whitepapers

Here is a list of some beautiful whitepapers for CRM developers, it always worked as a good reference to me. so thought of sharing it with others too.

you can use them for a reference point or for knowledge building or to understand the product better.

Whitepaper Download

This white paper, details the security model leveraged by Microsoft Dynamics CRM 4.0, including information on the authentication mechanisms that, depending on the deployment model, support Microsoft Dynamics CRM. In addition, the document provides details about how access to Microsoft Dynamics CRM 4.0 system resources by users and external systems can be controlled and restricted.

The Microsoft Dynamics CRM Security Model

This white paper,provides selected aspects of the conceptual application of the security model in Microsoft Dynamics CRM. While Microsoft Dynamics CRM does not provide for true field-level security, there are a number of options available for using supported custom logic to control of access to data at a more granular level than provided out of the box. This document discusses some of the key options and constraints available for implementing this type of solution.

Field-level Security in Microsoft Dynamics CRM: Options and Constraints

Many data centers include firewalls between the end-users and the servers and other integrated systems that support an implementation of Microsoft Dynamics CRM 4.0. This document provides guidance on the connectivity requirements between Microsoft Dynamics CRM 4.0 and other systems to assist readers with proper firewall configuration in customer environments.

Connectivity and Firewall Port Requirements in On-Premise Deployments

Both the online and offline versions of the CRM Outlook Client support synchronizing CRM contacts and CRM activities to Outlook folders, or Outlook synchronization. This document describes the client synchronization process for Microsoft Dynamics CRM 4.0.

Outlook Synchronization in Microsoft Dynamics CRM 4.0

Using multiple instances of Dynamics CRM may be preferable in a number of scenarios. This release includes two documents, a white paper and a build guide, focused on sharing data across multiple CRM organizations. The white paper provides an overview of the levels of integration available for sharing data across multiple Dynamics CRM organizations, together with details about the techniques that are used for integration at the Application and Data levels, which include Web Services, Web Services-based solutions, Filtered Views, and SQL Server Replication.

Sharing Data across Microsoft Dynamics CRM Deploymentsc

Microsoft Dynamics CRM supports a wide range of business applications with the essentials required for building, delivering, and maintaining these applications in a multi-tenant SaaS environment. In this white paper we explore how, with Microsoft Dynamics CRM, an ISV can quickly build, deploy, and manage line-of-business applications.

Developing ISV Applications using Microsoft Dynamics CRM 4.0

This white paper provides techniques, considerations, and best practices for optimizing and maintaining the performance of Microsoft Dynamics CRM 4.0 implementations.

Optimizing and Maintaining Microsoft Dynamics CRM 4.0

These Microsoft Office Visio diagrams show the logical database structure for Microsoft CRM 4.0.

These diagrams were generated using the Metadata Diagram sample code included in the Microsoft Dynamics CRM 4.0 SDK download.

Microsoft Dynamics CRM 4.0 Logical Database Diagrams

Wednesday, April 27, 2011

Pre and Post Entity Images

Very Often I found during code reviews the most common mistakes new programmers commit during plugin development in CRM is usage of images at wrong places. so I thought of writing the same here, may be it helps someone.

first we should understand what are Pre and Post entity images:

PreEntityImages and PostEntityImages contain snapshots of the primary entity's attributes before and after the core platform operation. Microsoft Dynamics CRM populates the pre-entity and post-entity images based on the security privileges of the impersonated system user. You can specify to have the platform populate these properties when you register your plug-in. The entity alias value you specify during plug-in registration is used as the key into the image collection.

before using the images we should know when they are available. For example, only synchronous post-event and asynchronous registered plug-ins have PostEntityImages populated. In addition, the create operation does not support a pre-image and a delete operation does not support a post-image.

Hope it is helpful.

Happy Coding. Smile

Saturday, April 16, 2011

Microsoft Dynamics CRM 2011 – Visual Studio Plugin / Workflow Activity Templates

Just downloaded and checked the great artwork of pogo69. really helpful and saved a lot of time as you don’t have to write everything from scratch now.

checkout the awesome Visual Studio 2010 templates for Plugin and Workflow activity development for CRM 2011 created by him.

Capture

 

check these out at his blog:
http://pogo69.wordpress.com/2011/04/15/crm-2011-visual-studio-plugin-templates

Friday, April 8, 2011

List of changes in plugin development in CRM 4.0 and CRM 2011

There are not much changes in terms of plugins. there are few changes like instead of using DynamicEntity class we have to use the Entity class. the five major changes are :

1. The IPlugin now resides in Microsoft.Xrm.Sdk namespace instead of Microsoft.Crm.Sdk

public class ClassName : Microsoft.Crm.Sdk.IPlugin
public class ClassName : Microsoft.Xrm.Sdk.IPlugin

2. The Execute method signature of the IPlugin interface has changed, it now expects an IServiceProvider instead of the IPluginExecutionContext.

public void Execute(IPluginExecutionContext context)
public void Execute(IServiceProvider serviceProvider)



3. To get a reference to the IPluginExecutionContext you now need to call the GetService method of the IServiceProvider interface.




public void Execute(IPluginExecutionContext context)
Microsoft.Xrm.Sdk.IPluginExecutionContext context =(Microsoft.Xrm.Sdk.IPluginExecutionContext)
serviceProvider.GetService(typeof(Microsoft.Xrm.Sdk.IPluginExecutionContext));



4. ICrmService has been changed to IOrganizationService.




ICrmService sdk = context.CreateCrmService(true);
IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService sdk = factory.CreateOrganizationService(context.UserId);



5. DynamicEntity has been changed to Entity.




  • Properties property of DynamicEntity no longer exists


  • Getting and Setting values no longer use *Property classes,



eg: no more KeyProperty, StringProperty…etc, simply do int value = (int)entity[“schema_name”];



if (context.InputParameters.Properties.Contains("Target") &&
context.InputParameters.Properties["Target"] is DynamicEntity)
if (context.InputParameters.Contains("Target") &&
context.InputParameters["Target"] is Entity)


hats off to the original contribution by Gayan Perera


Happy Coding Smile

List of changes : Type mapping between CRM 4.0 and CRM 2011

In Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online, the programming model has been changed to use native .NET types whenever possible. A beautiful post from Resultondemand explains it all, with all credit to their great job the excerpts of the post is :

Type Mapping Between Versions
The following table shows the mapping between the defined type for an entity attribute, the type that is used in a record, and the type that was used in Microsoft DynamicsCRM4.0.

Attribute Type Microsoft Dynamics CRM 2011 Type Microsoft DynamicsCRM4.0 Type
AttributeTypeCode.Boolean bool or System.Boolean CrmBoolean
AttributeType.CalendarRules EntityCollection DynamicEntity[] or calendarrule[]
AttributeType.Customer EntityReference Customer
AttributeType.DateTime System.DateTime CrmDateTime
AttributeType.Decimal decimal or System.Decimal CrmDecimal
AttributeType.Double double or System.Double CrmFloat
AttributeType.Integer int or System.Integer CrmNumber
AttributeType.
Internal
System.Object
Not used in records.
Not used in records.
AttributeType.Lookup EntityReference Lookup
AttributeType.Memo string or System.String System.String
AttributeType.Money Money CrmMoney
AttributeType.Owner EntityReference Owner
AttributeType.PartyList EntityCollection or ActivityParty[] activityparty[] or DynamicEntity []
AttributeType.Picklist OptionSetValue Picklist
AttributeType.PrimaryKey System.Guid Key
AttributeType.String System.String System.String
AttributeType.State OptionSetValue or enumeration generated for the entity state EntityNameStateInfo
AttributeType.Status OptionSetValue orint Status
AttributeType.Uniqueidentifier System.Guid UniqueIdentifier
AttributeType.Virtual System.Object
Not used in records.
Not used in records.
Other Type Changes
Old Type New Type
CrmAttributeType Class (MetadataService) Microsoft.Xrm.Sdk.Metadata.AttributeTypeCode
Moniker Class (CrmService) Microsoft.Xrm.Sdk.EntityReference
SecurityPrincipal Class (CrmService) Microsoft.Xrm.Sdk.EntityReference
Happy Coding Smile

List of changes in JavaScript usage in CRM 4.0 and CRM 2011

When working with CRM2011 Java script you will found many difference about syntax/methods between CRM2011 and CRM4.0 Please check some of the comparisons as listed. Please click on the Image below to enlarge view. hats off to the original post contributor.

1

Happy Coding Smile

List of changes in Custom Workflow Assembly in CRM 4.0 and CRM 2011

here is a a quick list of changes you need to remember while creating workflow assemblies in CRM 4.0 or CRM 2011, as found here.

1. References

CRM 4.0

using System.Workflow.Activities;

using System.Workflow.ComponentModel;

using System.Workflow.ComponentModel.Compiler;

using Microsoft.Crm.Sdk;

using Microsoft.Crm.Sdk.Query;

using Microsoft.Crm.SdkTypeProxy;

using Microsoft.Crm.Workflow;

CRM 2011

using System.Activities;

using Microsoft.Crm.Sdk.Messages;

using Microsoft.Xrm.Sdk;

using Microsoft.Xrm.Sdk.Workflow;

2. Base Class

Base class definition has been changed from  SequenceActivity to CodeActivity.

CRM 4.0: In CRM 4.0 we have to specify both Workflow name and Workflowactivitygroupname in the code as written in the following code.

[CrmWorkflowActivity("My Custom Workflow", "CRM Workflow")]

public class MyCustomWF: SequenceActivity

CRM 2011: In CRM 2011 that is done in different way.

public class MyCustomWF: CodeActivity

Both Workflow name and Workflowactivitygroupname can be specified at the time of registering the assembly

3. Execute Method

The overridden Execute method remains the same except parameter and return type.

CRM 4.0

protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)

CRM 2011

protected override void Execute(CodeActivityContext executionContext)

4. Create service

CRM 4.0

IContextService contextService = (IContextService)executionContext.GetService(typeof(IContextService));

IWorkflowContext context = contextService.Context;

ICrmService crmService = context.CreateCrmService();

CRM 2011

IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();

IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();

IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

5. INPUT Parameters

CRM 4.0

Declaration: how to initialize the input parameter

         // specified dependency property

         public static DependencyProperty CaseIDProperty = DependencyProperty.Register("CaseID", typeof(Lookup), typeof(TotalTaskRetrieval));

        // Specified Input property

        [CrmInput("Enter Case ")]

        // Set the reference Target for Property created

        [CrmReferenceTarget("incident")]

        // Property Defined for caseId

        public Lookup CaseID

        {

            get

            {

                return (Lookup)base.GetValue(CaseIDProperty);

            }

            set

            {

                base.SetValue(CaseIDProperty, value);

            }

        }

Use: Access the input parameter declared above as,

Guid caseid=CaseID.Value

CRM 2011

Declaration: how to initialize the input parameter

       [Input("Enter Case ")]

       [ReferenceTarget("incident ")]

       [Default("3B036E3E-94F9-DE11-B508-00155DBA2902", " incident ")]

       public InArgument<EntityReference> CaseID { get; set; }

Use: Access the input parameter declared above as,

Guid caseid = CaseID.Get<EntityReference>(executionContext).Id

6. OUTPUT  Parameters

CRM 4.0

  [CrmOutput("outputSum")]

        public CrmMoney Sum

        {

            get

            {

                return (CrmMoney)base.GetValue(SumProperty);

            }                                                                                               

            set

            {

                base.SetValue(SumProperty , value);

            }

        }

CRM 2011

[Output("outputSum")]

[Default("23.3")]

public OutArgument<Money> Sum { get; set; }

happy Coding Smile

Wednesday, January 5, 2011

Don't upgrade to Rollup12 if you use push email

 

from Michael Dawson’s linkedin group post we got the info and got the solution too in our environment , so decided to share if someone too facing this issue. thanks Michael for sharing :-)

“We recently upgraded and have been hit with quite a major issue, when an appointment is synchronized from CRM to your Outlook Calendar, Exchange freaks out when trying to send it to your Smartphone device. You get inundated with the following message:
Synchronization with your SmartPhone failed for 1 items.
The following items couldn't be sent to your mobile phone. They haven't been deleted. You should be able to access them using either Outlook or Outlook Web App.
Item Folder: Calendar
Item Type: IPM.Appointment
Item Created: 21/09/2010 16:23:34
Item Subject: 1723 MDTEST
We have called Microsoft Product Support and this is a known issue that is being researched hopefully for inclusion in Rollup13. I have been advised to uninstall Rollup12 if I want to resolve the issue and go back to Rollup11.”

Monday, December 14, 2009

How to Increase the Tab limit in CRM Forms

just browsing the net and i found this beautiful post regarding tab limits in CRM forms , originally posted here

Hats off to the original contributor.

hope its useful for the readers.

By default the max number of tabs allowed in CRM Form is 8.

The max tab limit is defined in JavaScript of formeditor.aspx. This page can be found at the following location “\Microsoft Dynamics CRM\CRMWeb\Tools\FormEditor”.
You can change the count specified in the _iMaxTabs to increase the count as shown in the below screenshot.

 

2

Note: This is an unsupported change and it could be overwritten if you install Rollups for CRM.

Thursday, November 26, 2009

Managing the Solution Lifecycle for xRM Applications

The recording of session by Andrew Bybee delivered at PDC-09 is now available. A must watch video. take a look at it here :

http://microsoftpdc.com/Sessions/PR31?type=wmv

Developing xRM Solutions Using Windows Azure

The recording of session by Andrew Bybee delivered at PDC-09 is now available. A must watch video. take a look at it here :

http://microsoftpdc.com/Sessions/P09-07?type=wmv

Tuesday, November 10, 2009

CRM 4.0 delete Organization

some time back I created an organization in our CRM server for a client but after some time we were told to remove the organization. I searched everywhere in the deployment manager but found no option to do the same. The only option I got there was to disable the organization. I scratched my head try almost all the links but of no use, so finally I disabled the organization. few days back i discussed the same with one of my friend Naren about the same he also did the full research in the deployment manager and YESSSSS he found the way. All we need to do is to first disable the organization and then we got the option to re enable it or delete it. the only thing now we need to remember is that this delete operation does not delete the org_MSCRM database , you have to delete the same manually.

Thanks Naren for the help.

I hope someone else too will get benefitted from this post. enjoy…

Thursday, September 10, 2009

CRM developer toolkit v1.0

A new toolkit to make customizations to CRM 4.0 has been released. Download bits from http://code.msdn.microsoft.com/E2DevTkt

View All CRM Entities - Displays a listing of CRM entities that are dynamically available from the CRM Explorer within Visual Studio 2008
Create and Update CRM Entities - Allows for creating new entities and updating existing entities from within the CRM Explorer experience
Create a Wrapper Class - Provides the ability to auto-generate wrapper classes for entities, which exposes the CRM entities and their corresponding attributes as classes and properties respectively to enable development of code to interact with the entities
Generate Plug-in Code - Enumerates the available Plug-ins for an entity and generates the code necessary to jumpstart the plug-in development process
Integrate the Build and Deploy Process - Simplifies the process of building and deploying a CRM solution
Deploy Across Multiple Servers - Assists in deployment and maintenance of Windows installer packages across multiple environments
The E2 team would also like to encourage Toolkit users to submit comments, suggestions, or other general thoughts about extending Toolkit functionality to better support the efforts of developers in planning, developing, customizing, and maintaining on-premise deployments of Microsoft Dynamics CRM. To initiate or participate in Toolkit discussions, In Code Gallery, please see visit the Toolkit Discussions tab at http://code.msdn.microsoft.com/E2DevTkt/Thread/List.aspx

Tuesday, August 25, 2009

Changing Ownership of Accounts changes ownership of others too

When we reassign a CRM Record then by default, Dynamics CRM reassigns all child records too. This behavior has consequences you might not want, such as reassigning paid invoices and other closed transaction records too, or think about a scene where two different sales reps are working on two different opportunities, associated with the same account then if the ownership of account changes the CRM reassigns the ownership of these two Opportunities too to the new owner, not only that the reassignment is done irrespective of the status of the related child record. i.e even the closed sales too goes in account of the new owner.

In short Selecting a different value for the “Owner” field (reassigning of the record) would reassign the account to the newly selected CRM user. Along with a lot of other records, which is the potential problem when historical sales reports are needed.

for quite some time i was thinking about the issue and the possible solution. Today I got a surprise visitor in my outlook (the RSS feed from dynamicscrmtrickbag). much to my surprise Richard Knudson explained the same issue and the solution in his blog.

The solution was quite simple :

Have a look at all of the 1:N relationships the Account entity has with other
Dynamics CRM entities , change the Type of Behavior of the required relationship
from default “Parental” relationship to “Configurable Cascading” and change the
assignment behaviour by changing the "Assign" value to the desired behaviour
(Cascade Active or Cascade None or Cascade User-Owned).

I would recommand the reading of full article here.

Great piece of artwork Richard. Cheers.

Tuesday, July 21, 2009

Cannot Delete/Publish changes in a Custom/System Entity

Hi all,

for quite some time I was struggling with this issue :

Neither we were able to publish changes to a custom entity nor the system allowing us to delete it. while doing so we get the general popup error from that says "An error has occured." We were able to publish updates to all other entities. Also we could add or delete other custom entities.

Another thing that Custom entities have their own custom icons when you click on them and go into the Form or looking at an attribute. For these entities, there's just a red X. I didn't delete any files but still no icons were displayed while other custom entities that work display the icons just fine.


after enabling the trace we found this in trace log :

[NullReferenceException: Object reference not set to an instance of an object.] at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoaderAllLanguages.LoadMetadataLabel(Int32 entityType, String attributeName, ExecutionContext context) at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoader.LoadCellLabel(Guid cellObjectId, String cellObjectColumnName, Int32 objectType, String attributeName, ExecutionContext context) at Microsoft.Crm.ObjectModel.OrganizationUIService.InsertFormLabels(IBusinessEntity entity, ILabelLoader labelLoader, ExecutionContext context) at Microsoft.Crm.ObjectModel.OrganizationUIService.RetrieveMultipleWithAllLanguages(EntityExpression entityExpression, ExecutionContext context) at Microsoft.Crm.Metadata.OrganizationUIHelper.RetrieveInProductionHelper(Int32 objectTypeCode, ExecutionContext context) at Microsoft.Crm.Tools.ImportExportPublish.FormXmlHandler.ExportItem(XmlDocument importDocument) at Microsoft.Crm.Tools.ImportExportPublish.ExportHandler.Export(XmlDocument XDoc) at Microsoft.Crm.Tools.ImportExportPublish.ExportHandler.Export(XmlDocument XDoc) at Microsoft.Crm.Tools.ImportExportPublish.RootExportHandler.RunExport(String[] ExportEntities, String[] ExportRoles, String[] ExportWorkflows, ExportMask Mask) at Microsoft.Crm.Tools.ImportExportPublish.ExportXml.RunExport(String xmlArgs, XmlDocument& ExportDoc) at Microsoft.Crm.WebServices.ExportXmlService.ExportCompressed(String entities, String embeddedFileName, ExecutionContext context) [TargetInvocationException: Exception has been thrown by the target of an invocation.] at Microsoft.Crm.Application.Utility.Util.RaiseXMLError(Exception exception) at Microsoft.Crm.Dialogs.ExportCustomizationsPage.ConfigureForm() at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.] at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.cot_puritech__grid_cmds_dlg_exportcustomizations_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

After a long search i zeroed in to these posts:

http://social.microsoft.com/Forums/en-US/crm/thread/f6de6b65-29e7-4238-a042-c808ee65c026

and
http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/da7aaa95-aa1b-42b7-a56e-f895354e99e8


In the first post the solution provided by André M Mestre
"This is normally caused by a missing attribute or a missing label:
[NullReferenceException: Object reference not set to an instance of an object.] at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoaderAllLanguages.LoadMetadataLabel

So to solve this you need to go directly to your database and check in the XML of the forms and views and the XML of the entity and then find out if all the attributes that you can see in there are still viewable in the CRM UI. If not you should correct the XML and then update the database.
The XML for the Form is in the OrganizationUIBase table and you can also check the XML for the views in the UserQueryBase and in the SavedQueryBase.

This is unsupported by Microsoft but is the only solution I know for this kind of issues.
Also please note that correcting the XML might be tricky sometimes."


with the help of the above mentioned solution I checked the Form XML in OrganizationUIBase table and figured out that there was an atribute in the Form XML that was actually deleted from the entity and after that i exported the entity from our staging server to the production server. I still dont know why the entity attribute was there in the form? and if the attribute was there in the form then why the system allowed me to delete the attribute ?

but anyways after recreating the attribute in the entity everything started working properly. it now allows me to publish the changes and even deleting the entity.

hope this will help someone else too.

Monday, June 15, 2009

Create Custom Workflow Activities for Microsoft Dynamics CRM 4.0

Sometimes there are situations when we need to add our own custom logic in workflow. The answer to it is custom workflow activity in Microsoft Dynamics CRM 4.0.

keeping that in mind I have decided to write a post for the same, but as usual before writing any new post I searched for the same on some of my favourite blogs and then I found a great article on the same on stunnware.

A must read post for all newbies. You can find it here.

happy coding :-)

Thursday, June 11, 2009

Invalid Argument error when importing customization

If you export an entity before it has been published, you will get an 'Invalid Argument' error when importing the entity if it has any relationships.

The reason for this is that the relationship attribute will have no display name, which results in the error. The simplest solution would be to go back to the original deployment, publish the entity, then export again. But, if that's not an option, you can fix the problem within the exported xml as follows:

The invalid relationship xml will look like the following:





The problem is that the displaynames element is blank. This can be changed to something like the following





The languagecode attribute will need to be set to the correct value for your deployment. Many other elements will have this value set in the customizations.xml file

Wednesday, June 10, 2009

"Not have enough privilege to complete Create operation for an Sdk entity" exception while registering a CRM 4.0 plug-in

when you try to deploy new plug-in assembly into CRM 4.0 and instead of successfully deploying you get the strange looking Soap Exception "Not have enough privilege to complete Create operation for an Sdk entity".

Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was unable to process request.
Detail:




0x80040256
Not have enough privilege to complete Create operation for an Sdk entity.
Platform




It looked pretty strange because your user might be having System Administrator role and in CRM it might be having all the rights.

Note: The Active Directory account used to deploy and register new assembly into CRM 4.0 database has to be added into Deployment Administrators group in CRM Deployment Manager.

Here are the steps to accomplish this:

1. Open CRM 4.0 Deployment Manager Console (Start -> All Programs -> Microsoft Dynamics CRM -> Deployment Manager).

2. Go to “Deployment Administrators” node and choose “New Deployment Administrator…” option.

3. Insert appropriate user and confirm selection by clicking “OK” button.

After completing this step, your users will be able to register and deploy the assembly successfully. So, remember about this when you try to deploy plug-ins with user that you added to CRM.
Happy Coding :-)

wish to change the code after plugin is deployed ?

After registering your plugin if you wish to change the code, you might get a build error when building the solution again in Visual Studio:
something like :
Unable to copy file "obj\debug\MyPlugin.dll" to "..\..\..\..\Program Files\Microsoft Dynamics CRM Server\Server\bin\assembly\MyPlugin.dll". the process can not access the file "..\..\..\..\Program Files\Microsoft Dynamics CRM Server\Server\bin\assembly\MyPlugin.dll". because it is being used by another process.
This occurs because Microsoft CRM has a lock on the DLL. In order to release the lock, you have to restart the service that has it locked.

For synchronous plug-ins, the CRM Application Pool within IIS can be recycled, or you can run IISReset.

For asynchronous plug-ins and custom workflow assemblies, you have to restart the Microsoft CRM Asynchronous Processing Service in the Services Control panel Applet.

To recycle the CRM Application Pool from the command line: Click Start, Run, type “cscript c:\windows\system32\iisapp.vbs /a CRMAppPool /r” and press enter.

To restart the Microsoft CRM Asynchronous Processing Service from the command line: Click Start, Run, type “net stop mscrmasyncservice” and press enter. Click start, Run, type “net start mscrmasyncservice” and press enter.