Saturday, October 31, 2009

ISV Utilities for Comparing Customizations and Transferring Configuration Data

Inna Agranov


Microsoft Corporation


February 2009


Summary


Learn how to build and use two new powerful tools developed for Microsoft Dynamics CRM. The Customization Comparison Utility lets you compare the customization files between two Microsoft Dynamics CRM systems and the Configuration Data Utility lets you transfer custom configuration data from one Microsoft Dynamics CRM system to another.


Download the Visual Studio 2008 and Visual C# code samples for this article:



The Readme.doc files that are included with the sample code contain information about how to set up and build the sample applications. The user guides contain detailed information about how to use the sample applications and view the results. You can find the Readme.doc files and user guides in the project folder for each utility.


Applies To


Microsoft Dynamics CRM 4.0


Microsoft Visual Studio 2008


Introduction


Microsoft Dynamics CRM is a highly customizable system. Not only you can modify different sections of the product, you can also create new components to address business needs. The Microsoft Dynamics CRM platform offers a robust set of tools, APIs, and documentation that helps you build custom business applications. As the applications built on the Microsoft Dynamics CRM platform become more and more complex, a need for specialized support tools grows. In this article you will learn about two very useful tools that help you analyze the impact of customizations on the system and maintain consistent configuration data across multiple Microsoft Dynamics CRM systems.


Evaluating the Impact of Customizations with the Customization Comparison Utility


To evaluate the impact of customizations, it is helpful to compare customization files between the source and the target systems before you import customizations. The Customization Comparison Utility helps you accomplish this task.


Analyzing Customizations

Often you have to export custom components from one Microsoft Dynamics CRM environment and import them into another, for example, from development into test or production. However, before you import customizations, it is very helpful to assess the impact of customizations on the target system. The system where you import customizations may have been changed since the last installation. You have to consider the extent of the changes and how they may affect the new installation. While some of the changes, such as renaming of the attributes or adding new attributes, are minor, other modifications, such as deletion of entities or changes in the forms may have a significant effect on the system.


Analyzing and understanding the system customizations may result in more successful deployment of a new version of the application. This analysis minimizes the risk of overwriting important customization data in the target system. For example, if only several attribute names have changed, you may be able to do a plain import using the import/export functionality built into Microsoft Dynamics CRM. However, if some key components were deleted, such as entity forms, you may have to merge the customizations with the changes in the target system. Comparing customization files between the two systems helps you determine which approach will result in more successful deployment. This is also very useful when you are diagnosing the problems between two systems. By comparing the customization files, you can often identify possible causes of the existing problems.


Using the Customization Comparison Utility

The Customization Comparison utility lets you easily compare two Microsoft Dynamics CRM customization.xml files. Unlike other XML comparison tools, this utility can read and understand Microsoft Dynamics CRM schema. The results of comparison show the differences in entities, attributes, forms, views, workflows, security roles, entity maps, and relationships. You can use this tool before you import customizations into a system to evaluate the effect they will have on the system.


Use the tool to compare XML customizations files between the source and the target systems. If you use a zipped customization file, make sure that it contains only one customization XML file. The following illustration shows the results of comparison between two customization files. The compared items include entities, roles, workflows, entity maps, and relationships. You can drill down into each item to see more details. From the entities, you can view the changes in attributes, forms, and system views. You can easily see the changes in source and target. It shows the items that are present in the source file and not present in the target file and the items that are present in the target file, but not in the source file.


Dd442453.a7338331-120b-4f29-ab17-1c94b85e014b(en-us,MSDN.10).gif


In addition to reviewing the results of the comparison in the grid, the tool includes a report that you can easily export to Microsoft Office Excel for additional analysis.


For more information about how to use the tool, see the Customization Comparison user's guide included in the download package for this utility.


Transferring Configuration Data with the Configuration Data Utility


When you work with multiple environments, such as development, test, and production, or multiple Microsoft Dynamics CRM organizations, keeping consistent configuration data across all systems can be very important. The Configuration Data Utility helps you achieve this. It lets you export custom configuration data from a source Microsoft Dynamics CRM system and import it to a target Microsoft Dynamics CRM system.


Storing Configuration Data in Custom Entities

In Microsoft Dynamics CRM you often use custom entities to store business information. However, you could also use custom entities to store system configuration data. For example, if an application integrates Microsoft Dynamics CRM with a third-party system, you could create a configuration entity with attributes such as pollingtime, url, and retries to store the configuration data needed for the integration. This is very convenient because the data stored in the configuration entity can be used by the system administrators to configure a new application or update an existing application. To keep the configuration data up to date, you may have to frequently upload the new data, or have an automated task to do it.


Using the Configuration Data Utility gives you a simple and efficient way to transfer custom configuration data from one system to another. One of the main benefits of this utility is that you can import configuration data from multiple custom entities at the same time. While it only imports and exports data for custom entities, the tool can handle useful scenarios, such as importing records that reference other records that are also being imported.


Dd442453.Important(en-us,MSDN.10).gifImportant


For the tool to work correctly, the schema for the source entities and the target entities must be identical.


Dd442453.note(en-us,MSDN.10).gifNote


In more complex cases, use the Microsoft Dynamics CRM data export and import tools or Data Migration Manager to transfer data for custom and system entities.


For more information about these tools, see Microsoft Dynamics CRM online Help.


Using the Configuration Data Utility

Use the Configuration Data Utility to export the source system configuration data and import it into a target system. The tool provides a convenient interface that lets you select the custom entities that contain the configuration data in the source system, save the data into a data file, and then import the records from the data file into a target system.


To run the tool, you must be a system administrator with appropriate privileges to create, read, and update entity instances.


The following illustration shows the entities in the source system that are selected for export.


Dd442453.0b8f0a81-1a17-4d77-9419-1cdc12427223(en-us,MSDN.10).gif


For import, specify the target server where you import the configuration data and the data file that you created during export, as shown in following illustrations.


Dd442453.9436a94c-f84f-4151-8d85-edc09ecaa422(en-us,MSDN.10).gif


Dd442453.5841695f-63ff-4ebb-a3b4-143657a9f759(en-us,MSDN.10).gif


The tool offers a command line version that you can run from a command prompt.


For more information about how to use the tool, see the Configuration Data Utility user's guide included in the download package for this utility.


Additional Information


Download the Microsoft Dynamics CRM 4.0 Software Development Kit (SDK) from the Microsoft Download Center.


For more information about custom entities, see Entity Customization.

Buy vs Build

Jonas Deibe - Dynamics CRM, C#, JS wrote this


Buy versus build judge yourself! I would think xRM as a way of accelerate application development.

 

Costs

Benefits

Buy (xRM)

Locked to vendor

Locked to vender schedules

Customizations to fill GAPs (if any)

Licenses

 

 

Configuration more than development

Faster go to market

Use vender enhancements

“Standard”

Shop GAP’s as modules or vertical solutions

Build (.Net or any other langauges)

Expensive

Longer delivery cycles

Harder to rapidly change

Innovation

Tailor application bit by bit

Re-use existing infrastructure

Better control over developer process

 

Checkout the introduction to xRM for some inspiration http://www.youtube.com/watch?v=Yru5CkANOKA
Published Monday, August 31, 2009 8:19 AM by Jonas Deibe

The Microsoft Dynamics CRM Developer Toolkit

For CRM developers, aligning the engineering delivery and process quality of their CRM projects can substantially increase overall productivity. In addition, by documenting, communicating, and following a consistent process for implementing CRM in Enterprise scenarios, developers can scale projects more quickly and efficiently by adding and ramping up consultants regardless of their previous experience with any specific project.
To provide developers with the ability to create and manage on-premise CRM solutions in an integrated Visual Studio environment, the Microsoft Dynamics CRM Engineering for Enterprise (CRM E2) team initiated and sponsored the development of the Microsoft Dynamics CRM Developer Toolkit. The Toolkit has been designed to make it easier for developers to customize, extend, and maintain an on-premise CRM solution, all from within an integrated Visual Studio environment. Key benefits for developers include the ability to:

  • 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

Important: CRM DevToolkit Installers v1.1 (released on 04/16/09) addresses the following minor issues, which were discovered in the initial release of the CRM Solution Framework:
  • The code-generated RetrieveDynamicEntity did not work on any derived classes because it did not know which entity to reference.
  • A static field returned the same ID for any (and every) instance of any entity type (i.e. creating 5 phone calls and retrieving the ID of the record and resulted in the same ID).

 

Check it out here

CRM, Performance Point and MOSS (CRM+PPS+MOSS)

Jonas Deibe - Dynamics CRM, C#, JS




Extending CRM with BI capacity has been on the radar for a while and with the new BI accelerators this will be an easy customization. The same applies to CRM and MOSS integrations. Since I have spent some time in this very interesting area I tough why not share some parts (screen captures). My goals was to build an application with Sales support (CRM) extend it with document management/collaboration (WSS/MOSS) and analyses, drilldown reporting plus dashboards (PPS)


The end application would be fully integrated and user navigation will be from the CRM client. Since its all installed on-premise authentication is single sign on (SSO). One very important goal is to let the end user not to know what underlying product she is using, it just doesn't matter as long it works and supports the end-users business/processes.


The first step to do is to install the software. I use two servers and a client in my lab.


• Installation domain controller and Exchange (Server1)


• Installation SQL Server, AS for OLAP's, Reporting Service (default port 80), CRM server (port 5555), MOSS Server (random port NOT default web 80), Performance Point Server (Monitoring), Visual studio (Server2)


• Installation of Client with Office package, Visual Studio (Client)


The installation process might take some time so don't expect to install it all on an afternoon.


Details on how-to configure each product is not in scope of the blogs post (might be a later post)


The end result is a very powerfull application; below you see some screen shoots


Dashboard - Click to enlarge


CRM Webclient, Sharepoint site and PPS webparts rendering Dashboards from OLAP cube


Sharepoint Document Library


Sharepoint Document Library. Context menu about to open workflows on current document.





Drill down to product from opportunities, all depending how the cube has been designed


PerformancePoint Monitoring SDK


http://msdn.microsoft.com/en-us/library/bb848116.aspx


Working with Online Analytical Processing (OLAP)


http://msdn.microsoft.com/en-us/library/ms175367.aspx


MOSS Developer center


http://msdn.microsoft.com/en-us/office/aa905503.aspx


CRM 4.0 sdk


http://msdn.microsoft.com/en-us/library/aa477293.aspx


Published Tuesday, October 21, 2008 10:00 PM by Jonas Deibe

It’s baaa-aaack! For a Limited Time – The Big Easy 3.0!!

Great news for Microsoft CRM partners and customers; from November 1st, 2009 through January 2nd, 2010 you can take advantage of one of our most popular promotions ever.  Applicable to Open, Open Value and Open Value Subscription license types, both Corporate and Government customers are provided with partner subsidy funds to help with the implementation of their Microsoft solution.  The following product groups are included:

The Big Easy Offer 3.0 Product Groups:BEO3_logo_o

  • Developer and Designer Tools
  • Dynamics CRM
  • Exchange Server
  • Forefront
  • Office Communications Server
  • Office System
  • Project and Visio
  • SharePoint Server
  • SQL Server
  • System Center
  • Windows Server System
  • Windows Server Solutions

Get more details here: https://partner.microsoft.com/US/bigeasyoffer   A Windows Live ID linked to your partner organization is required.

Microsoft Dynamics CRM Adapter for Microsoft Dynamics GP Released!!

East Region Microsoft CRM

After months of hard work, a very successful Partner TAP (Technology Adoption Program) as well as a Customer BETA program, this adapter has released and is generally available for US installs of Dynamics GP 10.0 and CRM 4.0.

This is an entirely new adapter redesigned from the ground up to utilize web services and eConnect and provides “…an out of the box, lightly extensible data integration tool.”  The adapter will be offered to registered Microsoft Dynamics GP Partners at no charge, though it must be ordered through the standard Microsoft Dynamics GP ordering process so we can keep track of who is using the adapter and will therefore want any updates and additional information.

Here are the main points:

Easy to Implement

· Wizard driven installation

· System Preparation Tool

· Lightweight footprint that utilizes web services and eConnect

-Web Service to web service integration

Easy to Use

· Eight out-of-the-box CRM to ERP Mappings

Easy to Customize

· Wizard driven custom mapping

Additional Information Regarding the Adapter:

For Partners and Microsoft Team Members (Information will be updated as it is available):

https://mbs.microsoft.com/partnersource/partneressentials/partnerreadiness/resourcing/MDCRMGPAdapter.htm

For Existing Customers (Information will be updated as it is available):

https://mbs.microsoft.com/customersource/worldwide/us/productinformation/factsheets/MDCRMGPAdapter

The first Partner Readiness training class is tomorrow; register at the link below:

https://training.partner.microsoft.com/learning/app/management/LMS_ActDetails.aspx?UserMode=0&ActivityId=551516

New Update to the Dynamics CRM Statement of Direction now available!!

Hot off the presses we now have access to the freshest information on Dynamics CRM, Mobile Express, CRM Accelerators, the CRM Adapter for GP, xRM and the highly anticipated release of CRM “V.next.”

What an edge-of-your-seat thrill ride!  Sure to be a best-seller – OK, it’s free – but I couldn’t put it down!  Make sure to get your copy today at these fine outlets:

PartnerSource:

https://mbs.microsoft.com/partnersource/marketing/statementofdirection/MD_CRM_SOD.htm

CustomerSource:

https://mbs.microsoft.com/customersource/documentation/whitepapers/MSD_CRM4StatementOfDirection

Friday, October 30, 2009

Creating a Dashboard using MOSS, Excel Web Services, Excel 2007 and Microsoft CRM

Posted Tuesday, June 24th, 2008 by David Pritchett

Creating a dashboard using SharePoint, Excel Pivot Charts and Microsoft CRM data is nothing new. Perform a Google search and you will receive thousands of results. However, finding information on how to create a live dashboard using the latest components of MOSS 2007, Excel Web Services, Excel 2007 and Microsoft CRM data is a bit more difficult.

1) Using the old method available in SharePoint 2003 of inserting the Office Pivot Chart web part and connecting to your CRM data source to retrieve the data does not work in MOSS 2007. The Office Pivot Chart web part is not available in this version using MOSS 2007 and Excel 2007.

2) Setting up Excel Web Services authentication methods (Windows Authentication, Single Sign On, or none) to allow the automatic refresh of the data in the spreadsheets on your dashboard page can be a bit confusing. I will discuss this in more detail later in this post.

3) Certain items used in Excel spreadsheets are not supported in Excel Web Services.

4) There is not one document that explains it all from start to finish, with all of the pitfalls highlighted. That is what I am hoping to accomplish with this post. My initial hurdles in getting this to work were all centered on getting the data to refresh with live data every time the page is opened. I kept receiving a data retrieval error saying the connection was unavailable. This was mainly the combination of the following:

a. Data Authentication

b. Creating the Excel Report based on a Query table, instead of a Pivot Table and Chart

c. Publishing the Excel Chart as a Report instead of a dashboard

This post is written based on the assumption that you have knowledge of MOSS 2007, creating a dashboard page in SharePoint and that the environment has been configured to use Excel Web Services. If not, below are some links that go into detail about how to do this and some other helpful links:

1) Plan external data connections for Excel Services – This article contain full instructions on how to configure MOSS to use Excel Web Services. Note: All of the steps in this article should be completed before moving on to building your reports and your dashboard.

http://technet.microsoft.com/en-us/library/cc262899.aspx#section7

2) Using Analysis Services data in Excel Services – This article goes into depth on configuring your servers to use Kerberos Authentication. This is required if you are using Windows authentication as your method of authenticating your spreadsheets to the data source.

http://www.tonstegeman.com/Blog/Lists/Posts/Post.aspx?List=70640fe5%2D28d9%2D464f%2Db1c9%2D91e07c8f7e47&ID=43

3) Excel Services part 12: Unsupported features

http://blogs.msdn.com/excel/archive/2005/12/01/499206.aspx

Before moving on with the rest of this post, a word on authentication; when creating your Excel spreadsheet and connecting to your CRM database to retrieve data, you have to select a method of authentication. There are three options:

1) Windows Authentication

2) Single Sign On

3) None

All three have their caveats, but the third option of “None” is the easiest to configure and is the one I have chosen to use in this example. The other two options require a much deeper understanding of Kerberos authentication and this will not be addressed in this post. Read the section entitled “Authentication to external data” in the “Plan external data connections for Excel Services” article listed above for a complete explanation on the configuration of each.

As I noted above, you need to configure your MOSS environment prior to actually creating your spreadsheet and building your page. A synopsis of the steps is listed below and is explained in detail in the “Plan external data connections for Excel Services” article:

1) Enable MOSS to use Excel Web Services

2) Add a trusted file location

3) Enable external data access for a trusted file location

4) Configure the unattended account settings – This is required if your authentication method is “None.” In this step, you will want the unattended account to be a domain user that is also a user in CRM. In my case, I just used the administrator login used when we installed CRM.

5) Create a data connection library

6) Add a data connection library to trusted list

7) Set a registry key to surface a data connection library in the client – This step is not required, but if you would like the data connection library to show up as a location to select data connections from when building your spreadsheet and creating a connection, you will have to do this. Otherwise, you can still access the location by typing in the path to the URL when browsing for your data connections.

Once you have completed these steps, you are ready to create your worksheet and integrate it into your website.

1) Create a new connection within a new Excel spreadsheet.

· Open Microsoft Excel 2007.

· Go to the Data tab.

· Select “From Other Sources.”

· Select “From Data Connection Wizard.”

· Select Microsoft SQL Server. Click Next.

· Enter your server name. It is ok to use Windows Authentication here. Click Next.

· Select your CRM database and the view in which to use. In this example, I am going to create a simple graph using the Opportunity View. Click Next.

· Select a file name for your data source that will be saved. We will need to modify the location so that the data connection is stored to the Data Connection Library on the SharePoint site. To do this, click Browse. If you do not have a link to your SharePoint Data Connection Library, you can find this by browsing to your SharePoint site using Internet Explorer and selecting the Data Connection Library link. Copy the location from the Address Bar in IE (All the way through the DataConnections only. Do not include the .aspx ending. Ex. – http://intranet/Department%20Sites/Sales%20%20Marketing/sales_dash/Data%20Connections/) and paste this before the file name you have selected.

· Select the “Always attempt to use this file to refresh data check box.”

clip_image002[4]

· Click on the Authentication Settings button.

· Select your authentication method. In my case, I select “None.” This will trigger the Excel Web Services to use the Unattended Account we set up earlier.

· Select OK on this dialog and then Finish on the previous dialog.

· When you are prompted with the Web File Properties dialog, select SharePointLibrary as your Connection Type and ReadWrite as your UDC Purpose.

· On the Import Data dialog, select PivotChart and PivotTable Report. Note: Selecting Table will not work. It is called a Query Table and is not an option that is supported in Excel Web Services.

clip_image004[4]

· Build your Pivot Chart. Here I am performing a simple summation of the Estimated Value of my opportunities in a particular category.

clip_image006[4]

· Click on any area within the Pivot Table, click Data from the top menu bar, then Connection Properties.

clip_image008[4]

· Under the usage tab, select all three of the Data Refresh options.

· Under the definition tab, select the “Always use the connection file” checkbox.

· Since we have changed the connection information, we will have to re-save it to the Data Connection Library on the SharePoint site. To do this, click on the Export Connection File button. If your location did not default to the Data Connection Library, browse to it as described in step (h). Click Save to update the Data Connection file.

· Click OK to close the Connection Properties dialog.

· We are now ready to publish the spreadsheet to the Reports Library on the SharePoint site. Click on the Office Button in the top left corner, select Publish, then select Excel Services.

clip_image010[4]

· Before saving the file, make sure you are publishing it to the Reports Library on the SharePoint. As in step (h), if you do not have a link to the Reports Library, you can find it by navigating to the Reports Library on your SharePoint site using Internet Explorer. Copy the address and paste it before the file name. (Ex. http://intranet/Department%20Sites/Sales%20%20Marketing/sales_dash/ReportsLibrary/)

· The next dialog will prompt you with choices of the items you would like to publish. In my case, I only want to display the chart, so from the Show tab, I select Items in the Workbook and Chart 1. You can choose to show any item in the spreadsheet that is support by Excel Web Services. Select OK.

clip_image012[4]

· The next dialog is important as well. Be sure to select Dashboard Page. If you select Report, whatever you intend to publish is only published as a snapshot and the data will not refresh when revisiting the web page containing your data and charts.

clip_image014[4]

· Your published report will be rendered in Internet Explorer. The next step will be to add the report from your Reports Library to your SharePoint Dashboard page.

clip_image016[4]

Assuming that your base dashboard page has already been built in SharePoint, I am jumping ahead a few steps to actually adding the new Excel Chart to the page.

· From your dashboard page, select Add a Web Part.

· From the dialog box, select the Excel Web Access part.

clip_image018[4]

· After the part is added click on the “Click here to open the tool pane” link.

· In the “Workbook Display” section of the Properties, select the ellipsis to browse your SharePoint Report Library. Select the Excel file that you uploaded earlier.

· Go through all of the Properties areas for the web part, adjusting what is displayed and what is not. Once you are done with the Properties, select OK to add your web part to the dashboard page.

clip_image020[4]

There you have it! To build more reports and data connections, simply follow the steps listed above and then add them to your dashboard page. In this example I used the CRM database as my data source, but in reality this will work for any external data source.

SiteMap Privilege Tag

Dynamic Methods Microsoft CRM Blog


At times there are users who need to read data from entities but those same users should never really see the full list of items of that entity in a place where they could take action against any of the items.
For example, an entity called "Locations" exists in CRM. Users will need to have the ability to view these Locations in order to enter a Location on a related object form, perhaps an Account. As an administrator you would like to have the list available to you so that you can add to or modify the list for the users. It could be placed in the Settings area and sometimes that is enough to keep people away from the list. But just to be safe you want to guarantee that users cannot do anything to the list.
This is where SiteMap Privilege tags come in. Within each SubArea tag a Privilege tag can be added. When a Privilege tag is applied, CRM will check on the main page load what privileges the user has to see if that user should be able to see the item. If the user does not have rights, then the item is not shown, if the user does have rights then the item is shown.
So, following our example from above the following could be inside the SiteMap:
<SubArea Id="new_location " Entity="new_location">
<Privilege Entity="new_location" Privilege="Write" />
</SubArea>
By setting the privilege to "Write" only those users that have the write privilege will be able to view the entity from the main CRM page. Multiple privileges may be used as well. Here are the possible values from the SDK:
All
AllowQuickCampaign
Append
AppendTo
Assign
Create
Delete
Read
Share
Write
Here's an example with multiple privileges:
<SubArea Id="new_location " Entity="new_location">
<Privilege Entity="new_location" Privilege="Read,Write,Share" />
</SubArea>
And finally, get creative. Just because the area is for an entity doesn't mean that the privilege has to be for the same entity. Perhaps the Location entity should only show up to users who have rights to write to the Knowledge Base. The following would be completely legit as well:
<SubArea Id="new_location " Entity="new_location">
<Privilege Entity="kbarticle" Privilege="Read,Write" />
</SubArea>
Now your main CRM page can be much more dynamic depending on who you are.
David Fronk
Dynamic Methods Inc.

CRM Usage Reporting Unleashed

Microsoft Dynamics CRM Team Blog

frequent request we come across is from companies who want to know which users are using CRM and when. The CRM platform provides the facility to gather detailed usage information by writing plug-ins, but a simpler and more general mechanism is to use the Internet Information Services (IIS) logging mechanism.

Click here to read more

SQL Server: The instance name must be the same as computer name

Saturday, 11 October 2008
Posted by David Jennaway at 10:11

This is something I’ve posted about on newsgroups, but one of my colleagues encountered it recently, and I think it deserves a blog entry.
The CRM Environment Diagnostics Wizard may throw the error ‘The instance name must be the same as computer name’. The most common cause of this is if the SQL Server has been renamed after SQL Server was installed. The reason is that, at installation time, SQL Server stores the computer name in a system table, sysservers. This information is not updated when the computer is renamed, and the error from the CRM Environment Diagnostics Wizard indicates that the entry in sysservers does not match the current computer name.
You can diagnose and resolve this by using some SQL system stored procedures. One of them lists the data in sysservers, the other 2 allow you to modify the data to reflect the current machine name.
To check if this is the issue, use SQL Management Studio (or Query Analyzer for SQL 2000) to execute the following query:
sp_helpserver
This will return output like the following:
Name,network_name,status,id,collation_name,connect_timeout,query_timeout
ORGNAME,ORIGNAME,rpc,rpc out,use remote collation,0,null,0,0
If the value in the name column does not match the current computer name, then you have to use the following SQL stored procedures to fix the problem. Note that sp_helpserver normally returns one record, but can return more records if you have configured linked servers. If this is the case, it is the row with id=0 that matters.
To change the information you have to first remove the incorrect record, then add the correct one, with the following queries:
sp_dropserver ‘ORIGNAME’ -- where ORIGNAME is the name returned by sp_helpserver
sp_addserver ‘CURRENTNAME’, ‘LOCAL’ – where CURRENTNAME is the current computer name
If you use named instances, refer to them in the form SERVERNAME\INSTANCENAME. It may then be necessary to restart SQL Server after these changes, but I'm not sure of this. It can't harm though if you can.
There is a KB article about this here. This descibes a similar solution, but be warned of a couple of minor issues with the solution - it fails to specify that quotes are required around the parameters to sp_dropserver and sp_addserver, and I have a feeling (though can't provide concrete evidence) that running sp_helpserver is more reliable than select @@servername.

Renaming Active Directory and Redeploy CRM

20:26 3/31/2009, noreply@blogger.com (Darren Liu), Darren's CRM Blog

I came across an issue today that the client would like to rename their AD because of some business decisions. They are wondering how to move CRM under the new domain.  Well to move CRM from old domain to the new domain, here are the steps that you can follow:

  1. Backup the [Organization]_MSCRM database.
  2. Backup the custom reports if you have any.
  3. Uninstall CRM 4.0 from the CRM server.
  4. Remove the MSCRM_Config database.
  5. Reinstall CRM 4.0 and choose to setup a new Organization option during the install.
  6. Restore the existing [Organization]_MSCRM database.
  7. Logon to the CRM server and launch CRM Deployment Manager.
  8. Import existing organization and then follow the wizard to remap the users in the new AD.
  9. Verify that you can logon back to the CRM environment.

That’s it! If you run into any this issue in the future, now you can follow the steps above to redeploy CRM.

Creating a Birthday Contact List

Microsoft Dynamics CRM Team Blog

Today we welcome our guest blogger CRM MVP Darren Liu from the Crowe Horwath company.

Have you ever been asked by someone to get a list of contacts having birthdays during a certain time period from CRM? If so what have you done to perform this task? Within the application, birthdays are tracked on Contact records as a single date (including year). This causes problems when searching for birthdays in a certain time period as the birth date is evaluated including the year. To illustrate, consider the following example:

· John Dole, 10/1/1980

· Adam Smith, 9/1/1970

· Mark Francis, 10/10/1960

Within CRM, searching for date is done by range. There is no easy way to identify from the above contacts all those having birthday in October as any range you choose will include the year. Wildcard functions on date fields are not a workable solution.

There are several solutions to this problem including JavaScript to parse birthday on the onChange event, a custom report or a plug-in. The desired functionality is to be able to search by birth month, birth day, and/or birth year, allowing the user to quickly identify all birthdays in a certain time period.

In this blog, I will show you how to use a pre plug-in to parse the birthday field into day, month and year. This way, the users will able to perform searches using Advanced Find. I have chosen the plug-in approach because it will help me parse the birthday field not only when the users update the birthday on the contact form but also when updating the birthday through the CRM web service for data imports and data integration.

Implement the pre plug-in

1. Create New Attributes

Create three new attribute on the Contact entity form in CRM. After creating the new attributes, publish the Contact customization.

Display Name

Schema Name

Type

Searchable

Values

Birth Month

new_birthmonth

Picklist

Yes

Jan = 1, Feb = 2, Mar = 3, Apr = 4, May = 5, Jun = 6, Jul = 7, Aug = 8, Sept = 9, Oct = 10, Nov = 11, Dec = 12

Birth Day

new_birthday

Int

Yes

Min Value = 1

Max Value = 31

Birth Year

new_birthyear

Int

Yes

Min Value = 1900

Max Value = 9999

clip_image002

2. Create pre plug-in using Visual Studio

Create a plug-in project name Crm.Plugin, copy and paste the following code to your Plug-in project.

using System;


using System.Collections.Generic;


using System.Text;


using Microsoft.Crm.Sdk;


using Microsoft.Crm.SdkTypeProxy;


 


namespace Crm.Plugin


{


  public class MonthDayYearContactPlugin : IPlugin


  {


    public void Execute(IPluginExecutionContext context)


    {


    DynamicEntity entity = null;


 


    if (context.InputParameters.Properties.Contains(ParameterName.Target) &&


        context.InputParameters.Properties[ParameterName.Target] is DynamicEntity)


    {


        entity = (DynamicEntity)context.InputParameters[ParameterName.Target];


        if (entity.Name != EntityName.contact.ToString()) { return; }


    }


    else


    {


        return;


    }


 


    try


    {


        if (entity.Properties.Contains("birthdate"))


        {


            CrmDateTime _birthdate = (CrmDateTime)entity["birthdate"];


            if (_birthdate.IsNull)


            {


                entity["new_birthday"] = CrmNumber.Null;


                entity["new_birthmonth"] = Picklist.Null;


                entity["new_birthyear"] = CrmNumber.Null;


            }


            else


            {


                DateTime birthdayValue = _birthdate.UserTime; 


                entity["new_birthday"] = new CrmNumber(birthdayValue.Day);


                entity["new_birthmonth"] = new Picklist(birthdayValue.Month);


                entity["new_birthyear"] = new CrmNumber(birthdayValue.Year);


            }


        }


    }


    catch (Exception ex)


    {


        throw new InvalidPluginExecutionException("An error occurred in the Month, Day, Year Plug-in for Contact.", ex);


    }


    }


  }


}


3. Register the plug-in The last step is to register the plug-in. To register the plug-in, you may use the Plug-in Registration tool from the MSDN Code Gallery. After the assembly is uploaded, you need to associate the following steps to the plug-in:



Message: Create


Primary Entity: contact


Filtering Attributes: birthdate


Eventing Pipeline Stage of Execution: Pre Stage


Execution Mode: Synchronous



Triggering Pipeline: Parent Pipeline



Message: Update


Primary Entity: contact


Filtering Attribute: birthdate


Eventing Pipeline Stage of Execution: Pre Stage


Execution Mode: Synchronous



Triggering Pipeline: Parent Pipeline



Message: Create


Primary Entity: contact


Filtering Attributes: birthdate


Eventing Pipeline Stage of Execution: Pre Stage


Execution Mode: Synchronous



Triggering Pipeline: Child Pipeline



Message: Update


Primary Entity: contact


Filtering Attribute: birthdate


Eventing Pipeline Stage of Execution: Pre Stage


Execution Mode: Synchronous



Triggering Pipeline: Child Pipeline



Summary



That’s all there is to it! The users will now be able to use Advanced Find to quickly identify their contacts birthday in a certain time period from now on. For the existing contacts previously stored in CRM, you will need to write a one-time SQL script to update the birthday fields in the MSCRM database in order for CRM to return the correct data back to the users. Hopefully this will help you on your next CRM project.



clip_image004



clip_image006



Cheers,



Darren Liu

CRM 4.0 Build Versions

Build Number Released Details
04.00.7333.2138 10/22/2009 Update Rollup 7
4.0.7333.1750 8/26/2009 Rollup Update 6
4.0.7333.1676 7/8/2009 Mobile Express +Rollup 5
4.0.7333.1644 7/2/2009 Rollup Update 5
4.0.7333.1551 5/7/2009 Rollup Update 4
4.0.7333.1408 3/12/2009 Update Rollup 3
4.0.7333.1316 2/8/2009 Rollup Update #2 (Re-Release)
4.0.7333.1312 1/15/2009 Rollup Update #2 (Original Release)
4.0.7333.1113 11/24/2008 Rollup Update #1
4.0.7333.3 12/19/2007 RTM
4.0.7333.2 Dec-07 RC2 (Internal)
4.0.7309.0 Nov-07 RC0 (Limited Release)
4.0.7219.10 Aug-07 Beta - CTP3
4.0.7044.22 May-07 Beta - CTP2
4.0.6319.16 October 2006 (?) Beta - CTP1

Improving Microsoft Dynamics CRM Performance and Securing Data with Microsoft SQL Server 2008

Microsoft SQL Server® 2008 contains a variety of features that, when implemented properly, can improve the performance of a Microsoft Dynamics® CRM 4.0 implementation and secure the data within that deployment. These Microsoft SQL Server 2008 features include: - Compression - Sparse Columns - Transparent Data Encryption - Backup Compression The MS CRM E2 team, working in conjunction with the Microsoft SQL Server team, recently completed a project that was designed to: 1. Evaluate the new scenarios that these Microsoft SQL Server 2008 features expose 2. Measure the performance impact of implementing these features, both singly and in selected combinations This paper provides an overview of these Microsoft SQL Server 2008 features, together with benchmark results and recommendations for implementation.

 

Click here

Create Activities using the Dynamic Entity Way

Friday, December 19, 2008 Darren's CRM Blog


I haven't touch CRM SDK for a while since I am working on another project not directly related to CRM. One of my old client required us to populate CRM with some more training data so they can use it for their training. So I have to modify the training processor that my teammates wrote to add activities to CRM. It appears to me that everything in the training processor have used Dynamic Entity for create, update, and delete.

To create an activities using dynamic entity is pretty straight forward, however I got stuck when I have to deal with the sender and recipient fields on a phone call, email, appointment and fax activity. Sender and Recipient field are ActivityParty type, I have done some research online and I was not able to find a way to associate the two fields to an activity using the dynamic approach. After going through the SDK and I was able to figure it out. I would like to share it since you might have to do the same in your next project.

Method 1: Not using Dynamic Entity

activityparty actParty = new activityparty();
actParty.partyid = new Lookup();
actParty.partyid.Value = new Guid("ENTER CONTACT GUID");
actParty.partyid.type = "contact";

activityparty actParty2 = new activityparty();
actParty2.partyid = new Lookup();
actParty2.partyid.Value = new Guid("ENTER USER GUID");
actParty2.partyid.type = "systemuser";

phonecall call = new phonecall();
call.from = new activityparty[] { actParty };
call.to = new activityparty[] { actParty2 };
call.description = "Test";

crmService.Create(call);


Method 2: Using Dynamic Entity



Property subject = new StringProperty();
((StringProperty)subject).Name = "subject";
((StringProperty)subject).Value = "Test";

Property description = new StringProperty();
((StringProperty)description).Name = "description";
((StringProperty)description).Value = "Test";

// Create From:
Property party1 = new LookupProperty();
((LookupProperty)party1).Name = "partyid";
((LookupProperty)party1).Value = new Lookup();
((LookupProperty)party1).Value.type = "contact";
((LookupProperty)party1).Value.Value = new Guid("ENTER CONTACT GUID");

DynamicEntity actParty1 = new DynamicEntity();
actParty1.Name = "activityparty";
actParty1.Properties = new Property[] { party1 };

DynamicEntityArrayProperty from = new DynamicEntityArrayProperty();
((DynamicEntityArrayProperty)from).Name = "from";
((DynamicEntityArrayProperty)from).Value = new DynamicEntity[] { actParty1 };

// Create To:
Property party2 = new LookupProperty();
((LookupProperty)party2).Name = "partyid";
((LookupProperty)party2).Value = new Lookup();
((LookupProperty)party2).Value.type = "systemuser";
((LookupProperty)party2).Value.Value = new Guid("ENTER USER GUID");

DynamicEntity actParty2 = new DynamicEntity();
actParty2.Name = "activityparty";
actParty2.Properties = new Property[] { party2 };

DynamicEntityArrayProperty to = new DynamicEntityArrayProperty();
((DynamicEntityArrayProperty)to).Name = "to";
((DynamicEntityArrayProperty)to).Value = new DynamicEntity[] { actParty2 };

 

// Create Phone Call Activity:
DynamicEntity activity = new DynamicEntity();
activity.Name = EntityName.phonecall.ToString();
activity.Properties = new Property[]{subject, description, from, to};

TargetCreateDynamic target = new TargetCreateDynamic();
target.Entity = activity;

CreateRequest request = new CreateRequest();
request.Target = target;

CreateResponse response = (CreateResponse)crmService.Execute(request);



That's it! Hope this will help you in your next project! :)

CRM 4.0 List Web Part Available!

CRM 4.0 List Web Part is available to download today. The list web part supports Multi-tenancy, IFD, 64bit and many more new enhancements comparing to the previous release.

System Requirement:

  • Windows Server 2003 or Windows Server 2008
  • Microsoft Dynamics® CRM 4.0
  • Microsoft Windows® SharePoint® Services 3.0 SP1
  • Microsoft® Office SharePoint® Server (MOSS) 2007 SP1
  • Microsoft® Internet Explorer 6 with SP1 or later versions

To download the list web part, click on the link below.

http://www.microsoft.com/downloads/details.aspx?FamilyID=3b6eb884-ec15-4288-a2a3-d0b47e057458&DisplayLang=en

Close Opportunity via SDK

Posted by Darren Liu at 11:19 AM

To close a CRM opportunity is different comparing to other CRM entities. If you want to close an opportunity, you need to use the WinOpportunityRequest and LostOpportunityRequest in the CRM SDK instead of the SetState requests. The code snippet below simply shows you how to set an opportunity to Win status via the CRM SDK.

opportunityclose close = new opportunityclose();
close.opportunityid = new Lookup();
close.opportunityid.Value = targetOppId;

WinOpportunityRequest request = new WinOpportunityRequest();
request.OpportunityClose = close;
// Update the status code according to your environment
request.Status = 1;

crmService.Execute(request);

Example Of Deactivating An Entity

by Danny Varghese 03.06.09

One of the least published example of CRM code is deactivating an entity, probably because it's not used as often as creating, updating or retrieving entities. Below is an example I've used on several occasions to deactivate an entity:

   1:  



   2: public void DeactivateEntity(Guid entityId)



   3: {



   4: //variable initialization



   5: SetStateDynamicEntityRequest deactivateReq = new 



   6: SetStateDynamicEntityRequest();



   7: //deactivate the cloned assignment



   8: deactivateReq = new SetStateDynamicEntityRequest();



   9: deactivateReq.State = "Inactive";



  10: deactivateReq.Status = 2;



  11: deactivateReq.Entity = new Moniker();



  12: deactivateReq.Entity.Name = <entity name>



  13: deactivateReq.Entity.Id = entityId;



  14: //execute the deactivation request



  15: service.Execute(deactivateReq);



  16: }


Debugging CRM Plug-ins, Stored Procedures & Custom Workflow Activities

by Danny Varghese 02.24.09

Whether it's developing CRM plug-ins, custom workflow activities, or writing stored procedures against the CRM database, the most useful tool I've used is the Microsoft Visual Studio Debugger. The debugger allows developers to step through the code for the above mentioned scenarios and has saved me hours!

Microsoft has phenomenal documentation on how to setup remote debugging:

http://msdn.microsoft.com/en-us/library/bt727f1t.aspx

The biggest issues I've had trying to setup the debugger has always been with permissions. I would recommend paying especially close attention to this section. The next biggest issue I had was trying to attach the debugger to a running process: http://msdn.microsoft.com/en-us/library/c6wf8e4z.aspx

Once you've setup Visual Studio debugger, you can attach the following processes for the following CRM components:

  1. For plug-ins, attach the debugger to the w3wp.exe process.
  2. For custom workflow activities, attach the debugger to MSCRMAsyncService.exe
  3. For stored procedures, attach the debugger to sqlserver.exe

Once the debugger has been attached, you must set a breakpoint in the code (either the .NET or T-SQL code). After the breakpoint is set, to test, do the following:

  1. For plug-ins, login to CRM and execute actions that will trigger the plug-in, such as create/update/assign a record.
  2. For custom workflow activities, login to CRM and perform actions that will trigger the workflow. With this, being that it's an asynchronous service, you'll have to wait until that service runs, and then Visual Studio will let you step through the code.
  3. For the stored procedure, just execute the stored procedure in Visual Studio and it will go right to the breakpoint.

I hope this post will help CRM developers save time and effort. I use the debugger every time I develop now to test and it's saved me tremendous amount of maintenance time and effort after the code has been deployed. Happy debugging!

CRM 4.0 Plug-in Registration Tool Walkthrough

by Danny Varghese 02.21.09

The CRM 4.0 Plug-in registration tool is Microsoft's tool to register any plug-in developed for CRM 4.0 and callouts that were developed for CRM 3.0, but need to be upgraded to 4.0. In this article, I'd like to take a step by step walkthrough of the tool including any interesting facts or issues I've run into during this process. Those will highlighted in the "NOTE" section.

To download the tool, please visit: http://code.msdn.microsoft.com/crmplugin for the latest version. The tool also comes packaged when you download the CRM 4.0 SDK, which you can do from: http://www.microsoft.com/DOWNLOADS/details.aspx?familyid=82E632A7-FAF9-41E0-8EC1-A2662AAE9DFB&displaylang=en.

Building The Plug-in Registration Tool

Either way, the download will contain Visual Studio project files that will need to be built. Mitch Kett in his blog has outlined how to do this: http://www.crowehorwath.com/cs/blogs/crm/archive/2008/03/19/incorporating-custom-entities-into-a-plugin-revised.aspx.

**NOTE: The CRM SDK provides great information on what each service provides for the user:

The CRM Web service provides strongly typed access to all entities in Microsoft Dynamics CRM, including custom entities and attributes. This Web service also allows execution of all supported operations, including those with built-in business logic as well as specialized operations. It provides a valid Web Services Description Language (WSDL) that is dynamically generated on the server to include the latest customizations and provides a single endpoint for your code.

The Discovery Web service is a mechanism to find the correct CrmService endpoint for your organization or to obtain a CRM ticket for Internet-facing deployment (IFD) or for Microsoft Dynamics CRM Online.

The Metadata Web service provides methods to read and write the metadata for an organization. This includes the definitions for entities, attributes, and relationships.**

**NOTE: If you don't place the assembly files mentioned in step (8) of Mitch's instructions, when you go to run the plug-in registration tool, you might get an error: "...Could Not Find Dependency…"**

Using The Plug-in Registration Tool

  1. You can launch the tool by either running the executable built from the project mentioned in the steps above, or if you've configured Visual Studio with a shortcut, you can launch it from that menu.

  1. Once the screen is loaded, click on Create New Connection. Enter a simple label for the connection, the server in which CRM is installed on, port, domain and user name.

**NOTE: There are security restrictions on the user that can register plug-ins. According to the SDK, the user account registering the plug-ins must exist in the Deployment Administrators group or must be a System Administrator. If the user is not part of at least one of those groups, you will get an error along the lines of "…Not have enough privilege to complete Create operation for an SDK entity…"**

**NOTE: If you don't enter a username and password, it will use the windows default credentials you used to login.**

  1. Click on Connect. Once connected, you will see a new screen with various menu options. Let's dive deeper into each of these options.

  1. Register
    1. Register New Assembly - you can register a new assembly that contains the plug-in execution code.
    2. Register New Step - allows you to configure the event that triggers the execution of the code. For example, this is where you can configure to fire a specific code after/before a record is created, updated, etc. This is equivalent to specifying a "PostUpdate," "PostCreate," in an xml configuration file for CRM 3.0 callouts.
    3. Register New Image - you can register an xml image of an entity. This can be used to find out what the values of a record is before and/or after the record is created, updated, etc. You can also specify which attributes of that record you want to pass into the execution context.
  1. Import/Export
    1. Export Solution Xml - allows a user to export an xml file that contains the assembly names, steps and/or images registered previously. This allows for configuration of the plug-ins to be setup once and then migrated to other environments.
    2. Import Solution Xml - allows user to import the xml file mentioned above in (3bi).

NOTE: According to a document walking through the registration tool published by Ajith Gande the "Import Export has some limitations and design assumptions

  • If a plug-in is impersonated on user MyDomain\crmUser and imported in an organization with different domain, it tries to map the user bases on the domain user name (crmuser)
  • Plug-in assembly DLL’s are not exported in the Xml. When Import is in progress, you need to copy the assemblies to the same location as the .xml file
  • Import overwrites the assemblies, plug-in, steps, images in the target organization if any other entity exists with same Guid, else it creates them
  • It is recommended to import assemblies, plug-in, and a step all at once to avoid a lot of overwrites. So delete any existing assemblies with same name on target org. But the tool supports updating or adding a step to the existing plug-in using the import."

This was referenced from:

http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=crmplugin&DownloadId=320**

  1. View
    1. Display By Assembly - this is the default view, showing all registered plug-ins by assembly name.
    2. Display By Entity - shows all registered plug-ins filtered by the entities they're registered for.
    3. Display By Message - organizes the plug-ins registered by messages or events such as Create, Update, etc.
  1. Unregister, Refresh & Search (all self-explanatory)
  1. Click on Register --> Register New Assembly --> Complete the steps below and press Register Selected Plugins --> Click on Close

  1. Step 1- Allows you to browse to a location and select the assembly you want to upload.
  2. Step 2 - This is not shown on the screenshot, but you now have to click Load Assembly
  3. Step 3 - Select where the assembly should be stored for execution
    1. Database - Storing the files on the database allows users to update the assembly file through this wizard as many times as they want without having to perform an "iisreset," as you had to in CRM 3.0. Advantage #2 is now the server\bin\assembly folder will not become cluttered if you have numerous plug-ins. Finally, this makes migration from different environments much easier because there are less files to move.

**NOTE: If you want to debug the assembly files, you will need to place the symbols file (.pdb) in <crm installation directory>\Server\bin\assembly folder. **

  1. Disk - This option allows you to store the assembly file as you did in CRM 3.0 under the <crm installation directory>\Server\bin\assembly directory. For debugging purposes, the symbols file (.pdb) must also be in this directory. If you store files here, an "iisreset" will be needed anytime any changes are made to the assembly.
  2. GAC - (Global Assembly Cache), for more information on this, please see my other post: http://www.crowehorwath.com/cs/blogs/crm/archive/2008/03/05/gac-it-developing-portable-code-for-microsoft-crm.aspx
  1. Once you've registered your plug-in, click on Register --> fill in the steps outline below --> Register New Step

  1. Message - In CRM 3.0, you had to configure the callout.xml file to specify if the plug-in was to be triggered via and update, create, assign, etc. Now you can configure this at this step.
  2. Primary Entity - The entity that will trigger the plug-in
  3. Secondary Entity - You should enter this only when the plug-in should be triggered for an event requiring two entities like the "SetRelated" message.
  4. Filtering Attributes - This allows you to filter which attributes of the entity will allow the triggering of the plug-in. For example if on the account you want the plug-in to fire only when the name gets updated, but not the account type, then you in your filter you can remove the account type. By default, all attributes are selected.
  5. Plugin - Select the assembly, and class you wish to associate to this step.
  6. Run In Users Context - By default it's set to calling user, which means the plug-in will be fired with the current users credentials. This is to control security so a user w/o the proper permissions won't have a plug-in fire to create/update/etc. any records. You can specify other users to run the context in. The list will pre-populate with all account names from the CRM installation.
  7. Execution order - Sometimes asynchronous operations on dependant on others asynchronous operations to complete. The execution order allows you to specify when this plug-in is supposed to fire.
  8. Event Sate - Specifies if the plug-in should be fired before or after an event. In CRM 3.0, this is similar to configuring a "PostUpdate," "PostCreate," "PreUpdate," etc.
  9. Execution Mode - A new feature which allows the plug-in to execute asynchronously or synchronously.
  10. Step Deployment - If you want the plug-in to be deployed (not registered) on the server and/or offline (Outlook client).
  11. Triggering Pipeline - For example, if you have an account with activities and you re-assign that account. If the plug-in was registered an activity, then it does not get fired because the activity is getting updated as part of another operation. To trigger the plug-in in that case you have to set the pipeline to "Child Pipeline"

**NOTE: According to the SDK, If you want your plug-in to run regardless of whether a Web service call or an (internal) platform call initiated the pipeline, register your plug-in in a child pipeline. However, do not use the IPluginExecutionContext.CreateCrmService or IPluginExecutionContext.CreateMetatdataService methods if you are writing code for a plug-in in that is used in a child pipeline. In a child pipeline, you must instantiate the CrmService or MetadataService manually.**

  1. Unsecure Configuration - if you don't want to hardcode any values and the plug-in needs certain configuration values (that may change based on deployment environments) you can specify the values here. For example, the CRM server url.
  2. Secure Configuration - same concept as above, but you could place more secure configurations like user credentials.
  1. (Optional) Click on Register New Image. I say this step is optional because you may not need this step at all times. This is equivalent to the pre and post image entity xml's in CRM 3.0. You can register an xml image of what the entity attributes were before and after an event. For example, if you've registered a post-update event on an account and you want to check what the value of a field was before the update, you could register a pre-update image. Furthermore, on this image, you can select which attributes you want the xml to contain. This allows users to help performance (all be it, just a tiny bit) but cutting down unnecessary fields.

**NOTE: You can not register a pre-create image since there were no attributes for a specific record because it hasn't been created yet. You will get an error if you try this.**

This concludes my in-depth look at the plug-in registration tool. All the notes I've added have been experiences I've had registering plug-ins. I hope this was informative and helps save you some time developing! Happy coding