Welcome to MSDN Blogs Sign in | Join | Help

Vacation and house fixing

I proberly won't blog a lot this summer since I got a house project. We bought our dream house quite near the sport area called Globen. The deal got finalized the same day as I was hosting the MS CRM-E2 (Engineering for Enterprise visit to Stockholm. I bet Amir, Murat and Steve never seen me so happy when I picked them up that morning... 


The life-time project, color will be changed next year?

Have a great summer!!!

Posted by Jonas Deibe | 0 Comments
Filed under:

Reading the right CRM blogs?

Ben has created a list of useful resource for the CRM community. if you are not listed and active blogger please ping Ben

http://blogs.msdn.com/benriga/archive/2008/05/28/reading-the-right-crm-blogs.aspx

 

Posted by Jonas Deibe | 0 Comments
Filed under: ,

Enterprise Library 4.0 - May 2008

Collection of libraries for faster .NET development. Some parts you already have by using the CRM plattform but if your project requires extensions it might be worth looking at before doing investments on building stuff yourself.

http://www.microsoft.com/downloads/details.aspx?FamilyId=90DE37E0-7B42-4044-99BE-F8ECFBBC5B65&displaylang=en

Works on visual studio 2008

Posted by Jonas Deibe | 0 Comments
Filed under: , ,

Lambda expressions and anonymous methods on Metadata service in CRM 4.0

In C# 3.0 Microsoft has added lambda expression. This is not a new feature in computer languages originally designed on a conceptualized level way back in time by an American called Alonzo Church.

Lamda expressions provide shorthand syntax for algorithms.

I have played around with this and below is a simple example where I retrieve all entities from the CRM metadata service. I call my filter method and provide my delegate with the filter expression. I have also an example on using anonym’s method, in previous versions before 2.0 you had to write a named method and pass that name where the delegate was required. The syntax for C# operator is => and lambda expression. Example is simple and I'm only using one param1 (filter) and checks if entity is customizable.

        static void Main(string[] args)

        {

            //Login and retrive all entities from metadataservice (change name to your org)

            RetrieveAllEntitiesResponse allEntitiesResponse = Metadata.RetriveAll("mydemo");

 

            //Lambda expression

            EntityMetadata[] filterEntities = Common.FilterMetadata(allEntitiesResponse,

                filter => (filter.IsCustomizable.Value == true)

                );

 

            /*

            //Anonymous method

            EntityMetadata[] filterEntities = Common.FilterMetadata(allEntitiesResponse,

                delegate(EntityMetadata filter)

                {

                    return (filter.IsCustomizable.Value == false);

                });

            */

 

            //Write result to console

            int total = 0;

            foreach (EntityMetadata item in filterEntities)

            {

                Console.WriteLine(item.SchemaName);

                total++;

            }

            Console.WriteLine("Return of record(s) {0}", total);

            Console.ReadKey();

 

        }

 

If your filter is complex you might consider to create a named method. I have attached Visual Studio 2008 project for you to play around with.

 

Lambda on MSDN

 

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

 

Posted by Jonas Deibe | 0 Comments
Filed under: , ,

Attachment(s): LambdaExample.zip

Playing around with filters on queues using a plug-in (C#)

Quite common I get questions regarding modifications on queues. What can be changed in the main GUI and how do I only display queues in context of the actual logged in user. The main GUI is not possible to change since it's none customized page but the content is possible to change by modifying the queue filters. Another possibility is of course to build your own aspx page to render the GUI and using SDK web services to render the information stored in the queues. This is the most advanced and code required solution I would say. I will focus on the simple and pluggable version!

The solution is simple and easy to plug-in using a simple .NET assembly. The trick is to register it on multiple retrieve on queue entity and from there replace the filter expression. I have seen a earlier blog post about this from my UK colleague Simon Hutson but that was based on none supported messages and the code was in VB.NET


Register of my plug-in using the plug-in tool found at codeplex

 

Once I have registered plug-in I verify it's functionality by debugging my assembly. Above I'm just about to remove the existing filter expression and replace it with my own filter.

The final result logged in as a CRM administrator. If I'm logged in as service support engineer belonging to business unit C I would not see the second line support queue since it's associated to another business unit B.


Logged in as Admin in a business unit above B and C

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

Posted by Jonas Deibe | 0 Comments
Filed under: , ,

Attachment(s): RemoveQueues.cs

CRM Online

Today CRM Online is available as service from Microsoft. Yes the name has changed from Dynamics CRM Live to Microsoft Dynamics CRM Online (Not to confuse too much on the existing www.live.com platform targeting more the consumer and smaller business) The product code base is more or less the same as the on-premise version and you can still access the rich web service interface even if you implementation is on CRM online. Of course you can add your own custom entities, attributes and relationships to extend the already out-of-the-box functionality. Checkout Extensibility Features CRM Online vs. On-Premise in Microsoft Dynamics CRM 4.0 for all the details http://msdn2.microsoft.com/en-us/library/cc299424.aspx

Check it out at http://crm.dynamics.com/

Press release http://www.microsoft.com/presspass/press/2008/apr08/04-22DynamicsCRMOnlinePR.mspx

CRM Online technology overview http://crm.dynamics.com/technology/index.html

Authentication explained from custom .NET code http://msdn2.microsoft.com/en-us/library/cc151051.aspx

Posted by Jonas Deibe | 1 Comments
Filed under:

Supported messages for plug-ins

Example t-sql style... There is an example in the SDK how to do this in C# code (Server\HowTo\CS\Entities\RetrieveSupportedMessages.cs)

In some scenarios you might not find your supported message but a workaround could be to set the Triggering Pipeline to Child Pipeline on the primary entity.

Use mydemo_MSCRM
Go

Select C.Name, A.SdkMessageFilterId, B.Name, A.PrimaryObjectTypeCode, A.IsCustomProcessingStepAllowed
From SdkMessageFilter as A
Inner join SdkMessage as B on A.SdkMessageId = B.SdkMessageId
Inner join MetadataSchema.Entity as C on A.PrimaryObjectTypeCode = C.ObjectTypeCode
And A.IsCustomProcessingStepAllowed = 1 Order by C.Name

Entity

Message

EntityCode

IsSupported

Account

Assign

1

1

Account

Delete

1

1

Account

GrantAccess

1

1

Account

Create

1

1

Account

ModifyAccess

1

1

Account

Retrieve

1

1

Account

RetrieveMultiple

1

1

Account

RetrievePrincipalAccess

1

1

Account

RetrieveSharedPrincipalsAndAccess

1

1

Account

RevokeAccess

1

1

Account

Merge

1

1

Account

SetState

1

1

Account

SetStateDynamicEntity

1

1

Account

Update

1

1

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

Posted by Jonas Deibe | 3 Comments
Filed under:

Sure Step what's in it for me?

Today I welcome a collegue of my Rebecka Isaksson as my first guest blogger. Rebecka is focusing on project management and business analysis and is part of the global Sure Step Development Team.

Here we go Sure Step methodology

Sure Step overview
Overview of Sure Step. Click and login to download partner document 

Why Sure Step?

So, “Why another methodology?”, you might ask? What’s so special about Microsoft Dynamics™ products that they require yet another methodology, on top of Microsoft Solutions Framework (MSF) and Microsoft Operations Framework (MOF)? How does it compare with PMI and ITIL? These are some of the most common questions that I have received so far, when talking to customers, partners and colleagues about Sure Step. As I work together with Jonas, he’s asked me to make a guest appearance here on his blog, to tell you a little bit more about Sure Step in general and some of the improvements and updates we're planning to make in Sure Step. I will try answer some of those questions here and give you my view on why I think Sure Step is so important to us and to our customers.

 

What’s the purpose?

First of all, I think it is important to remember that an ERP or CRM implementation is quite different from other software development and implementation projects. In particular the ERP implementation that very often impacts pretty much everyone and everything in the organization where it is introduced. Someone said once that “ERP implementations are 30% about technology and 70% about organizational development” and in general I tend to agree with that statement. Also, we need to keep in mind that the most common reason for purchasing and implementing this type of software is to reduce cost, increase efficiency in the business process and drive operational excellence by optimizing and standardizing the way people do things. In other words, customers want our help (software + service) to shape a more efficient business process by introducing a well-proven, standardized solution based on pre-defined processes that can be easily adopted to match their own functional needs, right?  So, it is not about customizing and developing lots of new features in the software and add new functionality but rather to focus on what the business needs and select and shape that standard functionality so that it fits and supports the business. This is what Sure Step can help you do.

 

Having said that, how does Sure Step match those objectives then? Well, we have not created the wheel all over again but instead we’ve picked the cherries from existing, well-proven methodologies, such as Microsoft Solutions Framework and Microsoft Operations Framework (MSF and MOF), combined those with the best practices and experiences from thousands of Microsoft and partner consultants and projects from around the world and created a common framework that can help us deliver high-quality services in a consistent manner, across large organizations and different geographies. By using aligned procedures and a common method we can offer much better, seamless services; smoother deployments at reduced risk;  on time and within budget; and with a much higher quality than ever.

 

What’s the Value Add?

Well, you could regard Sure Step as a toolbox containing a range of tools for what, how and when in the different project stages you need to perform certain tasks and activities. It contains well-structured activity flows, tools and templates, deliverables, role descriptions, recommended responsibility splits along with additional project management tools that makes it all much easier and quicker to manage and document every aspect of an implementation. On top of that it is customizable to fit specific customer situations (rapid or full implementation, upgrade, etc.) and the product (CRM, AX, SL, GP, NAV) that is being implemented and it spans across all phases of a project from initial diagnostics to post-implementation operations. Project management practices are based on well-proven and globally recognized practices such as PMI and ITIL, and are fully integrated across all phases, covering the whole spectrum of project management from scope management through risk, quality and time and cost management amongst other disciplines. This makes it all very easy to adopt for most of our customers as in most cases they recognize and can relate to the concepts presented to them.

 

Updates to Sure Step currently under development will make Sure Step more business oriented than it is today and we’ll be adding and improving many deliverables and templates, add a business process analysis cross phase process (including business modeling tools), as well as enhanced support for change management. There will be nine cross phase processes in total within Sure Step, all with specific activities providing customers and partners clear linkages and dependencies between them, thereby elevating the level of visibility within the implementation project even more. Improvements are under way so watch PartnerSource for announcements on releases of these updates in the coming months!

 

Where can I get my hands on it?

Sure Step is available through PartnerSource and enrollment in a Partner Service Plan for Microsoft Dynamics is required.              

 

Posted by Jonas Deibe | 2 Comments
Filed under: ,

Cache Tool source code

Console.WriteLine("Cache tool source code as attachment...");

Visual Studio 2005 project

 

Posted by Jonas Deibe | 3 Comments
Attachment(s): PrefireCRM4.zip

The dynamic Cache Tool for CRM 1.2 - 4.0 versions

Or any other web application... simply change the paths in the configuration file.

When doing demo's in a virtual environment as VPC it's pretty nice to have some sort of tool to pre-hit your application. I have made a simple console app that will do this for you. Run the application before doing a demo/presentation to activate just-in-time compilation and hoppfully everything goes faster since your clicks (requests) will at least be the second one.

The difference with this one compared to other CRM cache tools are:

  • Recursive lookup for files to hit (you don’t need to maintain your hit list) 
    therefore working for past and current versions of CRM
  • Depth control (how deep should we traverse)
                    

Path to webserver including protocol (http or https)

<add key="DefaultServer" value="http://stockholm:5555/" />

 

Path to in this example CRM webserver files are located

<add key="FilePath" value="C:\Program Files\Microsoft Dynamics CRM\CRMWeb\"/>

 

Filter on extension like *.htm, *.aspx, *.asmx

<add key="FileEx" value="*.aspx"/>

 

0 = Traverse as long as possible, 1 = Stay in current (FilePath) folder only, 2 = Two levels ect

<add key="FileDepth" value="0"/>

 

Installation

  1. run the attached msi packet to install the cache tool.
  2. Go to folder where tool is installed "c:\Program Files\CRM Sample Application\Trigger CRM" 
  3. Open the PrefireCRM4.exe.config file and change to your server settings.
  4. Click the short-cut on your desktop

I will in my next blog post attach the source code for the project.

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

 

Posted by Jonas Deibe | 1 Comments
Filed under: , , , ,

Attachment(s): Trigger CRM.msi

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

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 Micr