Saturday, May 31, 2008

Microsoft Dynamics CRM SDK version 4.0.5!

Check out the latest SDK update, version 4.0.5! If you’ve been waiting for sample code in VB .NET, then download the SDK. We’ve converted over 100 samples to VB .NET.

Here’s a list of changes:

  • Added 64-bit versions of the DLLs needed for plug-in and custom workflow activity development.
  • New sample code for accessing the CRM Web services from JScript including:
    • How to use the GenerateAuthenticationHeader function to simplify your JScript code.
    • Samples showing how to call each CrmService Web service method using JScript.
    • How to retrieve data from related records
  • New walkthrough that shows how you can use a Web Debugging proxy to capture SOAP packets for Microsoft Dynamics CRM Web service calls from a console application.
  • New sample showing how to add a new Web page to the navigation pane.
  • New info in the Report Writers Guide:
    • Linking related reports
    • Managing reports in offline mode
    • Formatting values in reports
    • Categorizing and displaying reports in different languages
  • New message for Microsoft Dynamics CRM Online: RetrieveOrganizationResources. This message retrieves statistics about the resources used for an organization.
  • New custom workflow activity samples:
    • Return a calculated value
    • Create a task in a custom workflow activity
    • Return the next birthday for an account or contact
  • New sample code for these messages:
  • New topic on how to export customized entity and attribute text for translation.
  • New topic and sample code that contains information about using the Microsoft Dynamics CRM for Outlook SDK.
  • Plug-ins:
    • Added information and sample code showing how to instantiate the Web services in code executing within a child pipeline.
    • Updated upgrade information for Microsoft Dynamics CRM 3.0 callouts.

Availability:

The download will be posted mid-day today. The dev center online version should be live within a week.

 

Amy Langlois

Microsoft Dynamics CRM Developer Center

Friday, May 30, 2008

Email router doesn't start (Microsoft.Crm.Tools.EmailAgent.SystemState.xml is empty)

We ran into this issue in our production environment. Thanks to Jonas' blog, we were able to fix it.

Published Thursday, March 13, 2008 11:31 PM by Jonas Deibe
-------------------------------------------

Suddenly my email router stopped working in my VPC. A look in the event viewer showed


#16192 - The E-mail Router service could not run the service main background thread. The E-mail Router service cannot continue and will now shut down. System.Configuration.ConfigurationErrorsException: The E-mail router service cannot access system state file Microsoft.Crm.Tools.EmailAgent.SystemState.xml. The file may be missing or may not be accessible. The E-mail Router service cannot continue and will now shut down. ---> System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(String filename)
   at Microsoft.Crm.Tools.Email.Providers.ConfigFileReader..ctor(String filePath, ServiceLogger serviceLogger)
   at Microsoft.Crm.Tools.Email.Providers.SystemState.Initialize(ServiceLogger serviceLogger)
   at Microsoft.Crm.Tools.Email.Providers.SystemState..ctor(ServiceLogger serviceLogger)
   at Microsoft.Crm.Tools.Email.Agent.ServiceCore.InitializeSystemConfiguration()
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Tools.Email.Agent.ServiceCore.InitializeSystemConfiguration()
   at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteService()


The file Microsoft.Crm.Tools.EmailAgent.SystemState.xml has been corrupted? Don’t know why or how it happened but I simple renamed my damaged file from the C:\Program Files\Microsoft CRM Email\Service folder (it's hidden) and started my Email router service. A new Microsoft.Crm.Tools.EmailAgent.SystemState.xml file is generated and populated with my <State> settings information.



Published Thursday, March 13, 2008 11:31 PM by Jonas Deibe

Wednesday, May 28, 2008

Now I am the master - Tips for running CRM 4.0 with as a service account

posted at: 2:40 PM by Aaron Elder
-----------------------------------------

Many companies prefer to run applications as a service account instead of as a built-in account like NETWORK SERVICE.  While each approach has its own distinct benefits, this article provides some additional steps, tips and things to verify if you want to do the installation as a service account.

First, be aware that when you as setup to install CRM as a service account, the Environment Diagnostic Wizard will give you the following warning:

"Verify Domain User account SPN for the Microsoft Dynamics CRM ASP.NET Application Pool account."

EDW - Service Account Error 

This is safe to ignore as the steps below will take care of the issue this warning is concerned with.  Asking for Help on this item points you to this article which while useful, isn't very straight forward.  I have provided additional steps and things to verify in the procedure below.

Note that these steps are not always required.  You will know these steps are needed if after installing as a service account you get the following error from Microsoft CRM.

Error:
Caller does not have enough privilege to set the CallerOriginToken to the specified value.

 

Procedure:

  1. Using Windows Support Tools, setup the SPNs for the machine and service account (Important: needs to be done first)

    setspn –A HTTP/servername:5555 domain/serviceusername
    setspn –A HTTP/servername.company.com:5555 domain/serviceusername


    Note: Don’t forget the PORT
    Note: Don’t forget to do both the FQDN and the NetBios name
  2. Trust for Delegation enabled in AD for the Service Account AND CRM Machine

    Note: This option is only available after you add the SPN for the both the NetBios name and FQDN) in step #1
  3. Verify / add the service account to the CRM installation’s PrivUserGroup

    Note: This step must be done after installation. There is a known issue were setup will remove the user used for installation (the "setup user") and if this user is the same as the service account user, it will be missing.
  4. The service account needs to be added to the local machines IIS_WPG group
  5. Restart the CRM server.  Also depending on your domain's replication settings, some of these changes may take a few minutes to propagate.


Cheers,

This posting is provided "AS IS" with no warranties, and confers no rights.




posted at: 2:40 PM
by
Aaron Elder

Tuesday, May 27, 2008

Resizing A Virtual PC Hard Drive

Saturday, May 24, 2008 9:42 PM by Simon Hutson
----------------------------------------------------

Holy Diver...


The other day I was working on one of my Virtual PC demo images, when I noticed I was running out of disk space. When I originally created the Virtual Hard Drive (.VHD) I just accepted the default size of 16GB without thinking, but more and more often I find I need to install other products such as SharePoint Server, BizTalk Server, PerformancePoint Server, which inevitably require extra disk space.


After a little "liveling" (what is the live.com equivalent of "googling"?) I found a great utility called VHD Resizer, which does exactly what its name suggests. Once I resized the drive to 32GB, I started up the image but found that my C: drive was still limited to 16GB. Using the Windows Disk Management tool, showed that disk had indeed been resized, leaving me with my original 16GB partition plus 16GB of unallocated space.


I tried to extend the partition using the DISKPART.EXE command line utility, but I quickly found out that you can't extend a boot partition. However, this morning I was chatting with Scott Vessey, a friend who works for a VMWare training partner Magirus, who shared a trick to get this to work.



  1. Use VHD Resizer to create a new .VHD file from the original Virtual Machine .VHD file

  2. Add the new .VHD as a second drive to the Virtual Machine

  3. Start the Virtual Machine, run the Disk Management tool and rescan the drives to enable Windows to see this as an NTFS partition.

    Disk Management 1 

  4. Start a command prompt and run "diskpart.exe". Select the correct volume and extend it.

    DiskPart

  5. Refresh the Disk Management tool and you should now see the re-sized partition.

    Disk Management 2 

  6. Shut down the Virtual Machine and re-configure it to use the newly re-sized .VHD file as the primary disk.

This posting is provided "AS IS" with no warranties, and confers no rights.

Display KB Articles Your Way

Sunday, May 25, 2008 11:43 PM by Simon Hutson
---------------------------------------------

Pseudo Silk Kimono...


I don't know if it bothers anyone else, but it really bugs me the way KB Articles are displayed in the case entity within CRM 4.0. The problem is there is that the KB Article is displayed by a custom control on the form which cannot be customised. Not only do KB Articles share a form tab with Notes, but you have to click a checkbox to display your selected article - I never understood this design "feature". But by far and away the worst problem is that you can't change the size of the KB Article viewer, so that even for the shortest article you can only see a few lines of text at a time.


Default Case Form Layout


After a little digging around the page using the Internet Explorer Developer Toolbar, I found out that the KB Article custom control was nothing more than a glorified IFrame, displaying the "/CS/articles/viewer/default.aspx" page and passing the Article Id as a parameter.


The easiest way to expand the KB Article window is to replace the custom control with a standard IFrame and a few lines of JScript. However, by default the section containing the control is locked preventing you from deleting it within the form designer. Luckily, you can modify this behaviour by exporting the case entity, modifying the XML file and re-importing.


The first step is to change the "locklevel" attribute on the "section" element from 1 to 0.


Locklevel Attribute


Next, delete the the JScript event code that passes the Article ID to the KB Article custom control.


JScript Event Code


Finally, delete the row that contains the custom control itself.


Custom Control


Once you have saved the change, re-imported and published them to CRM, you can go ahead and just use the standard customisation tools to create an IFrame and some custom script on the form OnLoad event and the kbarticleid OnChange event. After a couple of minutes work, I ended up with something much more useable than the out-of-the-box KB Article viewer.


New Case Form Layout


I've attached a copy of my customizations.xml file here for you to import into your own CRM system. However, bear in mind that if you have already modified the case entity, then you may lose your customizations.


This posting is provided "AS IS" with no warranties, and confers no rights.

Delete! Forcing Microsoft CRM 4.0 to clean up deleted records...

Aaron Elder Wrote this:
-----------------------

As you may or may not know, when a user deletes a record in Microsoft CRM via the UI or SDK, the record is not actually deleted right away.  What actually happens is that the entities DeletionStateCode field is updated from 0 to 2.  A process later comes along and cleans up the records that have been "marked for deletion" and it does so in the the proper order so that there are no referential integrity errors.  This is done because the DELETE operation in SQL is relatively expensive compared to an UPDATE.

In Microsoft CRM 1.x and 3.0, this asynchronous delete operation was handled via a windows service installed on CRM server named Microsoft CRM Deletion Service.  In Microsoft CRM 4.0, this procedure has been moved to use the new Asynchronous Operation entity and is handled the via the same system that handles Workflow triggers and all other asynchronous "jobs" within Microsoft CRM 4.0 such as Duplicate Detection process and asynchronous plug-in calls.  The time and frequency at which the deletion operation runs is controlled at the Deployment level and this can be tweaked using this tool; the default is to run every 24 hours.

Back to the story at hand...

During development, testing and data migrations, it may be useful to force Microsoft CRM to run this clean-up operation immediately.  In Microsoft CRM 3.0 this could be done by running the deletion service via the command prompt like so:

crmdeletionservice.exe -runonce

Unfortunately, now that this operation is part of the Asynchronous Service, this method no longer works.  Instead, I have developed the following SQL script and proceedure to get the same affect in Microsoft CRM 4.0.

  1. Run the SQL script against your MSCRM_CONFIG database
  2. -- ==========================================================
    -- Ascentium National CRM Practice -
    http://www.ascentium.com
    -- ==========================================================
    -- This script will force Microsoft CRM 4.0 to run the deletion service
    -- clean up job right away; cleaning out all records "marked for deletion".
    -- After running this script, RESTART the Microsoft CRM Async Service
    --
    -- ==========================================================
    -- DISCLAIMER:
    -- This script is provided "AS IS" with no warranties, and confers no rights.
    -- ==========================================================

    USE MSCRM_CONFIG

    UPDATE dbo.ScaleGroupOrganizationMaintenanceJobs SET
    NextRunTime = getdate() -- Now
    WHERE OperationType = 14
    -- Deletion Service

  3. Restart the Microsoft CRM Asynchronous Service

Enjoy,

This posting is provided "AS IS" with no warranties, and confers no rights.



posted at: 1:59 AM by Aaron Elder

Microsoft SQL Server 2005 Data Mining Add-ins for Microsoft Office 2007 with Microsoft Dynamics CRM

Found on MS CRM Team Blog, by Reuben Krippner

SQL Server 2005 Analysis Services (SSAS) provides tools for data mining with which you can identify rules and patterns in your data, so that you can determine why things happen and predict what will happen in the future—giving you powerful insight that will help your company make better business decisions.

You can use data mining to answer questions such as:

  • What will customers buy? What products sell together?
  • How can a company predict which customers are at risk for churning?
  • Where has the marketplace been, and where is it going?
  • How can a business best analyze its Web site usage patterns?
  • How can an organization determine the success of a marketing campaign?
  • How can businesses prevent poor quality data from entering the system?

In March 2008, Reuben Krippner presented two breakout sessions at Convergence US on Extensibility with Microsoft Dynamics CRM.

During these sessions I covered a number of live demonstrations of how you can extend and integrate Microsoft Dynamics CRM. One of the “big hit” demos involved the use of the SQL Data Mining Add-in for Microsoft Excel 2007 with Microsoft Dynamics CRM. I have packaged up this example as a hands-on-lab for you to try for yourself. It is very important to note that as part of your investment in Microsoft Dynamics CRM the underlying SQL Server 2005 platform provides you with very powerful Analysis Services. Everything that is used as part of this example is included with SQL Server 2005 Standard and Enterprise editions and the Excel add-in is completely free of charge – incredibly powerful and your only investment is time!

For loads of background materials on SQL Server Data Mining go to http://www.microsoft.com/sql/technologies/dm/default.mspx

A few explanatory notes first! As always, the samples are supplied as is with no support or warranty provided by Microsoft. Feel free to take this utilize as you see fit. Special thanks go to Philip Rawlinson from the Microsoft Dynamics CRM UK team who set out the concepts for me to borrow and extend! This utility will work identically with either Microsoft Dynamics CRM 3.0 or 4.0.


Steps to follow:

Step 1: Install the Data Mining add–in for Excel 2007 (check that this has installed correctly by starting Excel 2007 and you will see a new section in the ribbon called ‘Data Mining’.

clip_image002

Step 2: Start Excel 2007

Step 3: From the ribbon interface in Excel 2007, select Data à From Other Sources à From Microsoft Query

clip_image004

Step 4: We need to create a data source for Microsoft Dynamics CRM – this connection will point at the Microsoft Dynamics CRM filtered views (more on this later).

clip_image006

Step 5: Select <New Data Source> and click OK.

Step 6: Set the name of your data source to be Microsoft Dynamics CRM. Set the driver to be SQL Server and then click the ‘Connect...’ button.

clip_image008

Step 7: Pick a server from the list provided or enter ‘.’ if this is on the local SQL Server. Click Options >>.

clip_image010

Step 8: Select your CRM database from the Database drop-down list. It should have a name like organizationname_MSCRM. Click OK.

clip_image012

Step 8: Click OK.

clip_image014

Step 8: Click OK.

clip_image016

Step 9: Scroll down the Available tables and columns list and expand FilteredSalesOrder. Select the following columns from FilteredSalesOrder:

  • salesorderid
  • ordernumber

clip_image018

clip_image020

Step 10: Scroll down the Available tables and columns list and expand FilteredSalesOrder. Select the following columns from FilteredSalesOrder:

  • salesorderid
  • productidname

clip_image022

clip_image024

Step 11: Click Next>

Step 12: Click OK – we will manually build the join in the next step

clip_image026

Step 13: Drag and drop salesorderid from FilteredSalesOrder to salesorderid from FilterSalesOrderDetail – this creates the join between the two views so that the sales order relates to the individual products purchased as part of that sales order.

clip_image028

Step 14: Click the Return Data button to publish this data to our Excel worksheet.

clip_image029

Step 15: Click OK on the Import Data dialog box

clip_image031

Step 16: Delete the two salesorderid columns in our worksheet as we do not need them anymore. Right-click the column-heading and select Delete.

clip_image033

Step 17: Click the drop-down arrow on the ordernumber column heading and select Sort A to Z

clip_image035

Step 18: Select Data Mining from the Excel 2007 ribbon and then click Associate – The ‘Associate’ Algorithm is a mathematical formulae that is built to detect patterns in data and lends itself to analysis for cross sell initiatives.

clip_image036

Step 19: Click Next in the wizard

clip_image038

Step 20: Click Next in the wizard.

Step 21: In this next screen you can change the parameters of the Data Mining Model

To learn more about these parameters please refer to:

http://msdn2.microsoft.com/en-us/library/ms174768.aspx

Step 22: Change the Minimum Support value to 5 for your first run to ensure you get a result set back (this is the minimum count of similar transactions to include in the model), if this also fails perhaps lower this and also the probability. Again to learn more about these parameters use the link above.

clip_image040

Step 23: Click Next

Step 24: Check the box marked Enable Drill Through and click Finish.

Step 25: View the results – Here we are looking for a high ‘Importance’ and then a high ‘Probability’. In the example here we can see that a rule has been detected where there is high probability of selling a ‘Road Bottle Cage’ with a ‘Road 150 Red’. Again for more information on the parameters please go to the article link above. Click the Copy to Excel button to bring the results back to your Excel worksheet.

clip_image042

clip_image044

Step 26: Click on the Dependency Network tab to see the rule set depicted graphically in terms of the associations between products purchased.

clip_image046

Step 27: With this insight you could now set up a marketing campaign and target those individuals where they have bought one product but not another. The possibilities are endless and this just illustrates the use of one of the data mining algorithms at your disposal, e.g. this could be used in service organisations to find the most common combinations of service issues or where one issue directly causes another.


Have fun with these samples! The world of predictive analytics awaits and is free-of-charge!

Kind regards,
Reuben Krippner
Published Monday, April 28, 2008 7:58 AM

Thursday, May 22, 2008

CRM 4.0 E-mail Integration Overview

A few days ago, David West posted about the new e-mail features in CRM 4.0. For many of you, this list of new features is probably music to your ears, but if you’re a newcomer to CRM you might be a little overwhelmed. The e-mail integration story we have in CRM is both powerful and very flexible—enough to cover nearly any IT setup out there. This post is designed to give you an overview of our e-mail integration story and set the groundwork for future posts where we will dive deep into our e-mail feature set.

Let’s start by looking at the basic building blocks:

  • A Microsoft Dynamics CRM organization
  • An e-mail server

Between those two bullet points, there are a vast number of deployment permutations. Your CRM org might be on-premise, on-premise + internet-facing, hosted, or on CRM Live. Your e-mail server might be inside the corporate domain, outside the corporate domain, behind firewalls, and might be POP3, Exchange, Notes, etc. You could easily be dealing with multiple CRM orgs and multiple mail servers. And CRM also does e-mail processing based on business rules.

Unlike previous versions of CRM, for 4.0 we wanted to have a story which would work with all these permutations. Basic solutions involving direct connectivity between e-mail server to CRM and vice versa fell flat quickly. What we needed was a bridge to connect the two that was flexible in different deployment topologies. This bridge needed to handle e-mail send/receive for the multitude of mailboxes across a business, do the appropriate e-mail processing, and connect to multiple CRM organizations.

For CRM 4.0, we have two “bridges” that the administrator can choose from:

  • E-mail Router
  • CRM for Outlook

The generic topology looks like this:

EmailTop

For incoming e-mail, CRM for Outlook and the E-mail Router regularly check for new messages in the mailboxes they’ve been configured with. When new mail is found, it is picked up, processed, and promoted to CRM.

For outgoing e-mail activities created in CRM and marked for sending, CRM for Outlook and the E-mail Router will poll CRM, pick up the mail, and push them out through the configured SMTP server.

Important: Without utilizing the E-mail Router or CRM for Outlook in your deployment, CRM will have no functioning e-mail capabilities (e.g. no e-mail marketing campaigns).

Which Bridge to Use?

Depending on your requirements, you can mix and match between the E-mail Router and CRM for Outlook on a per-user basis (though you must use the E-mail Router for Queues). As always, there are pros and cons.

CRM for Outlook: Single User Routing

Pros

Cons

Sent e-mail appear in Sent Items folder of Outlook

CRM for Outlook must be running and connected to process mail

Works with the mailbox already configured in Outlook

Do not need to manage inbox forwarding rules

Does not require an administrator to manage

 

This is a good option for CRM deployments without an IT staff, such as hosted offerings or CRM Live.

E-mail Router: Centrally Managed Routing

Pros

Cons

Can be used with forward mailboxes
 (more on this in a future post)

Standalone component

Connect to multiple CRM organizations

Requires an administrator to manage

Queue integration (unmonitored mailboxes)

Need to manage inbox forwarding rules when used with a forward mailbox (see video)

Ideal for centrally managed deployments

 

Supported for deployment on server or client OS

 

This is a good option for centrally managed CRM deployments, typically those on premise.

E-mail Router Supported Protocols

While CRM for Outlook piggybacks on the default mail server configured in Outlook, the E-mail Router supports the following protocols out-of-the-box.

  • POP3 (new for 4.0)
  • Exchange (via the DAV protocol, only Exchange 2003 and 2007 supported)
  • SMTP for outbound e-mail

We recognize that this is not an exhaustive list of e-mail protocols out there. In an upcoming blog post, Dominic Pouzin will discuss how you can write your own e-mail plug-in, providing options to connect to systems like Lotus Notes, Yahoo! Mail, etc.

To see is to believe…

There’s no better teacher than experience. I highly recommend taking a look at a few short videos I’ve made to illustrate connecting the E-mail Router to a POP3 server and also to Exchange.

The CRM 4.0 E-mail Router with POP3

The CRM 4.0 E-mail Router with Exchange

The CRM 4.0 E-mail Router with an Exchange Forward Mailbox

Michael Lu



Published Thursday, February 07, 2008 8:32 AM
by crmblog

Record Owner Information Migration using DMM

Raju Kulkarni Published Wednesday, February 20, 2008 8:00 AM a great article that has saved me some time as I use the Data Migration Manager in CRM 4.0.

Click here to red the article.

Hiding a Section

David Fronk of Dynamic Methods Inc. wrote this
----------------------------------------------
Hiding a section has been an interesting customization to figure out. I definitely got help by reading through posts and groups, but then again, who doesn't? When hiding things in CRM typically it's done by referencing a specific control name, something like the tab number or the field name. Sections are strange in that they don't have any of the normal "English" identifiers that one would expect. It's actually reference directly through a GUID. Each section gets assigned a GUID upon creation, so writing code that is dynamic for hiding sections directly really wasn't pretty...or possible.

However, if you reference a section indirectly things actually get much easier. For example, everything in the CRM forms are contained within something larger. Fields are contained by Sections, which are contained by Tabs, which are contained by the web form itself. That means that there is a direct parent/child relationship between objects on the form. JScript has thought about this and allows you to reference ParentNode's through code.

With this new knowledge referencing sections actually becomes very easy. All that has to be done is make a reference to a field on the form and then get it's parent node and do what you need to do to it.

Here's the code:

document.getElementById("ownerid").parentNode.parentNode.style.display = "none";

You'll notice that I have to parentNode references, that's not a mistake, this is the progression on how to get to the section. Fields are actually contained by Labels and Labels are contained by Sections on a form. I didn't realize this until I tried using only the first parentNode reference. Play with it a bit and you'll see what I mean.

Then to make the section visible again just use empty quotes:

document.getElementById("ownerid").parentNode.parentNode.style.display = "";

And now you have full control over what to make visible to users upon any condition you want.

Happy coding!

David Fronk
Dynamic Methods Inc.

Scheduling and emailing reports with CRM

David Jennaway wrote this article.
-------------------------------

A common customer request is to be able to schedule CRM reports and automatically send the report to one or more users by email. This can be done without the need for any code, but needs a combination of configuration within both CRM and Reporting Services.

CRM Configuration
CRM reports are designed to be run under the context of the user running the report so as to return only the data that user has permission to see. Due to this configuration, Reporting Services will not permit you to schedule CRM Reports out of the box (if you try, you'll get the error 'Subscriptions cannot be created because the credentials used to run the report are not stored') . The easiest way to resolve this issue is to download the CRM Report Scheduling Wizard from here and install it on the CRM server.

Then, navigate to Workplace, Reports in CRM, select the report you want to schedule, and go to More Actions, Schedule Report. As you will do the scheduling later within Report Manager, I'd suggest you select the following options:

  • Generate snapshots 'On demand'
  • 'Make snapshots available only to me'
  • Specify any parameter values
  • You then need to specify the credentials under which the report will run. This needs to be a valid CRM user
  • 'Yes, generate the snapshot now'

Reporting Services configuration
The rest of the configuration is done via Reporting Services. First of all, you may have to configure the email properties of Reporting Services. To do this open RSReportServer.config, which by default will be in the Reporting Services\ReportServer directory under the SQL installation directory in Program Files. Within the 'RSEmailDPConfiguration' element you will need to set values in, as a minimum, the 'SMTPServer' and 'From' elements. You may need to apply other settings. For more information see the documentation for SQL 2005 or SQL 2000

Scheduling the Report in Report Manager
You can now schedule the report. Browse to Report Manager (by default it will be in the Reports virtual directory), go to the OrganisationName_MSCRM folder and the report you have scheduled (it's name will have the suffix On demand Snapshot). On the toolbar you should have a button 'New Subscription'. Click this, select 'Report Server E-mail' in the Delivered by drop down, and set all other options as required. (If 'Report Server E-mail' is not an option, go back to the instructions in the above paragraph

Training: Microsoft Dynamics CRM 4.0 courseware

If you're a partner you can access PartnerSource, if you're a customer you can access CustomerSource and use a lot of the benefits we offer there. One of these benefits is having access to tons of e-Learning courses, learning plans, downloads, documentation and now also Microsoft Dynamics CRM 4.0 courseware. If you click this link you will be directed to the E-Learning catalog filtered by CRM 4.0. Below are the links to the courseware that are currently available.

What’s New in Microsoft Dynamics CRM 4.0 Course Number 8910
This one-day training material provides individuals with the knowledge and skills to begin planning for Microsoft Dynamics CRM 4.0.

Installation and Deployment in Microsoft Dynamics CRM 4.0 Course Number 8911
This three-day training material provides individuals with the tools to install and configure Microsoft Dynamics CRM 4.0. The training material focuses on the components used within a Microsoft Dynamics CRM deployment, the hardware and software requirements needed to successfully deploy Microsoft Dynamics CRM, and the installation instructions for the primary Microsoft Dynamics CRM components: the Microsoft Dynamics CRM Server, the E-Mail Router, and Microsoft Dynamics CRM for Office Outlook. 

Customization and Configuration in Microsoft Dynamics CRM 4.0 Course Number 8912
This three-day training material provides individuals with the tools to configure and customize Microsoft Dynamics CRM 4.0. Configuration topics include setting up business management functions such as: Business units Users Teams Security privileges and roles System Settings Multilingual User Interface Language Packs Currency Exchange Rates Multiple Organizations. The training material also focuses on using the Microsoft Dynamics CRM 4.0 Customization tools to customize the following system components: Forms Views Entities Attributes Relationships Entity Mappings The following customization topics are outside the scope of this training material, but are introduced here to provide individuals with insight into potential advanced customization features: Application Event Programming Client Extensions Workflow SiteMap URL Addressable Forms IFrames SDK

Applications in Microsoft Dynamics CRM 4.0 Course Number 8913
This three-day training material explores the Microsoft Dynamics CRM application from a user's perspective. Application functionality covered in the training material includes: Sales Management Marketing Automation Service Management Service Scheduling

The Content Publishing team is continuously working to provide you with new stuff, so make sure you check once in a while to see new training content and material.

The dynamic Cache Tool for CRM 1.2 - 4.0 versions

Click here to go to the tool

Set Regarding - size of recently used list

Philip Richardson Wrote the following on his blog.
----------------------------------------
April 14, 2008 16:25 by philip
I discovered today that you can set the number of items shown in the Most Recently Used (MRU) list for CRM 4.0's Outlook Client. The default setting is 7 items and I find it just doesn't work for me.

Add the following reg key to our client machine:

Location: HKEY_CURRENT_USER\Software\Microsoft\MSCRMClient
Value Name: MaxRegardingObjectListCount
Type: REG_DWORD

Here is a reg patch for those that love their *.reg files. This patch sets it to 50 items (ie. 32 in hex).
[HKEY_CURRENT_USER\Software\Microsoft\MSCRMClient]
"MaxRegardingObjectListCount"=dword:00000032

Warning: Modifying the registry is dangerous. If you don't know what you are doing them don't attempt it. Ask one of your parents to help out.

The following screenshot shows this config in action. I've blurred the data out for the usual reasons.

How to customize the Marketing List Member view?

The MSCRM BI Team posted this article.
-------------------------------------

That's the question often asked by all the people customizing MS CRM. Simply, going to customization area does not allow you to customize the Marketing List Members view. So how to do that?


We should begin with noticing the fact that there are three types of marketing list by default in MS CRM - one for Leads, one for Contacts and one for Accounts. So if you want to customize the Marketing List Mamber view, you will have to know for which entity you would like to customize it. Once you know, it is worth noting somewhere the type codes for these entities, i.e. Account = 1, Contact = 2, Lead = 4. Knowing these values, we can proceed further.


For each entity type there are several views (e.g. "All members"). So you have to decide which one you would like to customize before you begin with the customization.


 Once you have done all this, follow these steps to customize the Marketing List Member view and enjoy all the advantages of MS CRM customization :)


 


1. We assume that we want to customize the All Members view for the Marketing List containing accounts. 


Go to the MS CRM database and use SQL Server Management Studio or Query Analyzer to enter the following query:


SELECT * FROM SavedQueryBasy WHERE name LIKE '%members%


2. You will be presented with the list of views containing members. Find the one that you want to customize and be sure that you look at the one for the entity, you would like to customize. So, in our example, we want to customize the view containing accounts. Thus, find the row that contains 1 in the ReturnedTypeCode column.


3. Once you've done this, copy the GUID of this view from the SavedQueryId column


4. You can leave the Management Studio now and go to CRM web client


5. Go to "Settings" / "Customize entities" and select the Account entity


6.  Go to "Forms and views" and open any view to customize it


7. Now, press CTRL+N on your keyboard to open the address bar


8. In the URL, replace the GUID of currently customized view to the one you have copied in point 3. and press enter to refresh the window


9. Wow! You are now presented with the Marketing List Member view that you would like to customize. Customize it using normal MS CRM mechanisms!


10. Once you finish, "Save & Close" the window and the entity window


11. In the "Customize entities" view click "More actions" / "Publish all customizations"


12. Once the customizations are published, you have your new Marketing List Member view :)


 Happy Customization! :)


You can follow these steps for all other views.


Please note that this customization (simply saying, as any other requiring to query the db and not shown on the web client) is NOT SUPPORTED!


 

How to properly add CRM Queue?

Question might look simply, but I lose few hours to force it to work… Before we start to add a queue, let’s make some assumptions:

1. Microsoft CRM 3.0 is installed

2. Microsoft Exchange 2003 is installed (on Windows Server 2003 – this is supported configuration)

3. Microsoft CRM Exchange E-Mail Router is installed.

I suppose that installed software is configured correctly, and replying for a message with valid CRM token generates CRM activity. In such a clean situation we can start to add a queue. First of all, create user in AD, but user has to be disabled and should have proper rights granted. Just to verify, open Active Directory Users and Computers and

- on the Account tab verify, that ‘Account is disabled’ option is checked

- on the ‘Exchange Advanced’ tab click Mailbox Rights and verify, that Allow is checked for the SELF account for “Full mailbox access” and “Associated external account” permissions

- on the ‘Exchange Advanced’ tab click “Custom Attributes” and verify, that CRMEmailEnabled value is present

In some places we can encounter attribute CrmMailEnabled instead of CrmEmailEnabled. As far as I know, queue works with both of them, but I use CRMEmailEnabled, following the “CRM Installation and Configuration course”. Before closing User Properties, copy user’s E-mail to clipboard. That’s all stuff, that we need from Active Directory.

Second part will be done in Microsoft CRM, so open main CRM page and go to Settings -> Business Unit Settings -> Queues and click New. Type Queue Name, paste e-mail copied just before, choose Owner and Business Unit and click ‘Save and Close’. Verify that ‘All incoming e-mail’ option is checked. That all the stuff from the CRM side…

And now… that it is the place where I lost much time. I was thinking (following the mentioned CRM Installation and Configuration course) that it should works at this place… But in effect, if I send message to CRM Queue nothing happens. I checked, that messages are sent (I mean present in Exchange Mailbox – it can be checked in Microsoft Exchange System Manager), but message is not delivered to CRM Queue. The question is why message cannot be delivered? Or maybe, why CRM cannot receive message? Solution is simple, and it is described in Microsoft CRM Implementation Guide:

Choose to Deploy Rule to Users Mailboxes

This is done by “Rule Deployment Wizard” tool, which is installed with Microsoft CRM Exchange E-mail Router.

After that everything should works properly. If not, there is one more issue, described in KB 921389 – “E-mail messages from internal Microsoft Dynamics CRM users are not delivered…” where the key is internal CRM user. In such a case, verify that mails from CRM users are not excluded. This option can be found in “Settings -> Organizational Settings -> System Settings” on the “E-mail Tracking tab”. Verify that “No” is selected in “Set whether to exclude e-mails between Microsoft CRM users” option.

How to change CRM 4.0 organization's database name

Sometimes you may have to change the CRM organization database name on SQL Server. It is possible in CRM 4.0 and is quite easy, in fact. To accomplish this task you will have to follow these steps:

1. Run Microsoft CRM Deployment Manager (Start -> All Programs -> Microsoft Dynamics CRM Deployment Manager).

2. Go to "Organizations" node, press right mouse button on the organization that uses the database whose name you want to change. Choose the "Disable" option.

3. Repeat all the activities described in point 2, but this time select "Delete" option.

4. Connect to your database server (for example, using Microsoft SQL Management Studio) and rename your [OrganizationName]_MSCRM database to the desired name. Sometimes you may get the information: “The database cannot be exclusively locked to perform this operation”. In such a situation the SQL Server restart will help.

5. Use the CRM Deployment Manager to Import Organization (Deployment Manager -> Organization -> “Import Organization” option). It will run the wizard which allows for importing an organization from an existing SQL database

6. Choose SQL Server and new database names.

7. Specify the "organization name", "display name" and report server network location.

8. Select appropriate method for mapping CRM users.

9. Finally, import new organization.

Hiding Views in CRM 4.0 Using Plug-in

Darren Liu, Darren's CRM Blog
Copy of his post
------------------------------------


There are many new moving parts added to CRM 4.0 and I am learning something new every day from the community, the projects that I am working on and the people around me. What I have learned this week by working with Sean McNellis at Microsoft is to hide Views using a simple CRM 4.0 plug-in.

As many of you may already know that Microsoft took off the capabilities of sharing views which many people used in CRM 3.0 to hide unwanted System Views from the user's view list. There have been many posts in the CRM newsgroup community on how to hide the views.

My colleague, Jeremy Hofmann found a clever way of hiding the views by updating a bit field in SavedQueryBase table against the MSCRM database. Unfortunately manipulating with the MSCRM database is not encouraged and also not supported by Microsoft. So what can we do?

What I have learned is that we can manipulate with the SavedQuery entity through a simple plug-in to control what shows up on the user's view drop down list. There are many neat things that you can do through the savedquery class offered by the SDK, you can read about it in the 4.0 SDK.

In this post, I will show you how to hide some Contact System views by writing a simple plug-in. I will intercept the retrieve operation that CRM used for getting the views and then append more condition logics to the its query expression.

Before:


ScreenHunter_01 Feb. 25 22.10

C# Code:

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Crm.Sdk;
using Microsoft.Crm.Sdk.Metadata;
using Microsoft.Crm.Sdk.Query;
using Microsoft.Crm.SdkTypeProxy;
using Microsoft.Crm.SdkTypeProxy.Metadata;

namespace CrmAddon.Crm.Plugin
{
public class HideContactViewsPlugin : IPlugin
{
public void Execute(IPluginExecutionContext context)
{


            // Query the SavedQueryBase table to retrieve the Query Id
Guid[] Views = new Guid[] {
new Guid("9818766E-7172-4D59-9279-013835C3DECD"), //NA-Contacts: No Orders in Last 6 Months
new Guid("9C241A33-CA0B-4E50-AE92-DB780D5B2A12"), //NA-Contacts: Responded to Campaigns in Last 6 Months
};

if (context.InputParameters != null && gHiddenViews.Length > 0)
{
if (context.InputParameters.Properties.Contains(ParameterName.Query))
{
QueryExpression qe = (QueryExpression)context.InputParameters.Properties[ParameterName.Query];

//only apply this action if the query is for 'views' or saved queries
if (qe.EntityName == "savedquery")
{
if (qe.Criteria != null)
{
if (qe.Criteria.Conditions != null)
{


                                //Append more condition logic to the default query that's used by CRM. In this case, I filtered on the savedqueryid to exclude the views from the Ids identified above.


ConditionExpression queryCondition = new ConditionExpression("savedqueryid", ConditionOperator.NotIn, Views);
qe.Criteria.Conditions.Add(queryCondition);
context.InputParameters.Properties[ParameterName.Query] = qe;
}
}
}
}
}
}
}
}


Plug-in Registration:


Message: RetrieveMultiple
Primary Entity: savedquery
Stage of Execution: Pre Stage
Execution Mode: Synchronous


Sample Registration Snapshot:


...


<Step


    CustomConfiguration = ""


    Description = "Hide Contact View Plug-in"


    FilteringAttributes = ""


    ImpersonatingUserId = ""


    InvocationSource = "0"


    MessageName = "RetrieveMultiple"


    Mode = "0"


    PluginTypeFriendlyName = "Hide Contact Views"


   PluginTypeName = "CrmAddon.Crm.Plugin.HideContactViewsPlugin"


    PrimaryEntityName = "savedquery"


    SecondaryEntityName = ""


    Stage = "10"


    SupportedDeployment = "0" >


</Step>

...



After:



image



As you can see that the "Contacts: No Orders in Last 6 Months" and "Contacts: Responded to Campaigns in Last 6 Months" views are removed from the drop down list. The new CRM 4.0 SDK is really powerful and you can definitely do more with it. E.g. hide/show the view based on the user id or team, etc...



I hope this will help you on your next CRM project. :)



Error When Creating A New Appointment

Danny Varghese wrote this blog on 03.14.08

One of our clients recently had an issue where a user got an error message when trying to create a new appointment.  Upon saving, a dialog pops up “The record you are requesting is currently unavailable.  Either the record was not found or you don’t have sufficient permissions to view it.”  When getting that message, I thought it was a permission issue, but that was quickly ruled out.  After much searching, I ran across a post on Ronald Lehman’s blog.  He posted the solution to this, but I wanted to reference this as well because our client received it a few times.  Also, it took me quite some time to find this post, so hopefully we can give it more exposure.  The url for Ronald’s blog post is: http://ronaldlemmen.blogspot.com/2007/05/error-when-creating-new-appointment.html. 


Basically he goes on saying that this is caused by an “orphan” record in CRM.  The SystemUserBase table in CRM should have a one to one correlation with the Resource table.  That is if a record exists in the Resource table, but not in the SystemUserBase table (as was our case), then this error would be received.


After running the query he suggested and “cleaning” up the data, that resolved the issue.



Sorting By Multiple Columns In Microsoft CRM

Microsoft CRM views in 3.0 are a great way to view important parts of records in a clear concise manner. The views also offer sorting which is an even greater plus for many users. What may not be known however is that users can sort by multiple columns!

Simply hold down the SHIFT key, and viola! This can be especially helpful for views that have columns with data that have similar values. A prime example is in CRM, if there are hundreds, or even thousands of Contact records, and the view might have first and last name columns. The likely hood of having duplicate first names is high. So if a user wants to sort by first and last names, he/she can hold down the SHIFT key, and click on the first name and last name column.

Cloning An Entity In CRM

Danny Varghese on 03.26.08 wrote

Intro


We’ve had requests from our clients to “clone” already created records at the click of a button.  The reason is that when users are entering data into numerous records of the same entity every day, where only a few fields may differ, it can be cumbersome.  A great example is we created an entity with over 50 fields and users may create 10-15 records of that entity where 90% field values will be the same.   I’ll explain the approach we took.


Approach


1.       Create a JavaScript function that will open a window to the entity to be cloned to (make the window variable global)


2.       Edit the ISV.config.xml to add a button, and in the configuration, reference the JavaScript function created above


3.     Inside the JavaScript function (you may create other methods as well), call the function to check the status of the new window


4.    When the page is loaded, start mapping from one window to the other as in the second function below


function checkPageState()

{              if (oClonedEntity.document.readyState == 'complete')               {                   cloneEntity();                          return;         }  

  setTimeout('checkPageState()',100);            

}     
function cloneEntity(){            
with(oClonedEntity.document.crmForm)       {             

    //add fields here that you want to copy from one entity to the newly created one

    new_field1.DataValue = crmForm.all.new_field1.DataValue;                  new_field2.DataValue = crmForm.all.new_field2.DataValue;       }                            //finally, close the dialog       

window.close();

} 
5.       After inserting the above code, test it out.  This will be highly beneficial for users, enjoy!