Quantcast
Channel: Microsoft Dynamics CRM Team Blog
Viewing all 592 articles
Browse latest View live

Get it now: SDK Update 4.0.13

$
0
0

Even though we are hard at work on Microsoft Dynamics CRM 2011, we want to support our current customers. Many of you have been asking about an update to the Advanced Developer Extensions (Microsoft.xRM) assemblies and tools. This SDK Update 4.0.13 is now live for download and in the MSDN library!

In addition to updates of the binaries, we’ve included a new plug-in sample and walkthrough. Read the complete change list in the release history table on the first page.

Feel free to send Feedback to the SDK team.

Amy Langlois

Microsoft Dynamics CRM SDK


Importing two or more entities from a Single File

$
0
0

This post talks about a feature in Microsoft Dynamics CRM 2011 through which you can Import data from a single source file into multiple entities. For example, if you have a single CSV file that has data that you want to split across the Contact and Account entities. You can now do so in a few simple steps.

Let’s start with a basic CSV file that contains data for both Contact and Account entities. Our example file looks like this:

image

You can think of it like this:

image

You will observe that the file has some columns that belong to the Contact Entity in CRM 2011 and some columns that belong to the Account Entity. Also observe that multiple contacts belong to the same account. That means when this data is imported into CRM there should be 5 contact objects and 2 Account objects. This is what the relationships can be visualized.

image

Creating such structure by hand is tedious to say the least and normally to Import such data you will have to manually split the data into separate files and cleanse the data of any duplicates (in the Accounts file) before attempting to the Import the data. Using the CRM 2011 Single File Multi Entity feature all this can be accomplished in a few clicks!

Using the feature

To use the feature follow the steps detailed below.

Step 1 – Start the Import Wizard.

You can start the Import Wizard by clicking the “Import Data” button on the main menu on the grid of any Importable Entity.

image

Alternatively Navigate to Workplace à Imports and click “Import Data” on the ribbon menu.

Step 2 – Upload the File

When the Import Wizard launches, you will see the following screen.

image

Click the “Browse” button and select your file. To run this example, download the file from here. Click Next to go to the next page. You will see a file upload summary.

image

Click “Next” to proceed.

Step 3 – Select the Map

You will come to a screen that prompts you to select a predefined map. To use the Single File Multi Entity feature select the map named “For Generic Contact and Account Data”. Click next to proceed.

image

Step 4 – Map the data columns to CRM fields

In the next page, you will be asked to be asked to map the columns in the data file to the attributes of the Contact and Account entity. Make sure that you map only the relevant columns for each account and contact. Rest should be marked as “Ignore”. Also, note the mapping for “Parent Customer” for the Account entity. This mapping drives the relationship between the entities. See below for the mappings.

Mapping Tip #1: You can map the same data column to both entities. Just make sure that there is no data column mapped to Account that has unique values. For example, DO NOT map the “Business Phone” column to Account. This will interfere with the duplicate cleansing logic and result in creation of duplicate accounts.

Mapping Tip #2: The order of the columns does not matter. In the example shown data columns belonging to Contact and Account are bunched together to facilitate understanding of the scenario.

image

image

image

Step 5 – Submit the Import Job

Once all fields have been mapped, click “Next” to proceed. You will be shown a summary screen.

image

Click next to proceed. This is the final screen. You can optionally give your mappings a name and save it for future use. Click “Submit” to submit the job and start the Import process.

Final step - Verify your Import

Once the job has been submitted, go to the Import grid to see the progress of your job. (Workplace à Imports). In some time you should see that your job has completed.

image

Check in the Accounts and Contacts grid. You should see your newly created records.

image

image

Open up an account and verify the relationships have been properly established.

image

That’s it. You are done!

I will be covering some advanced topics on the Single File Multi Entity feature in another blog post. I plan to cover more about map authoring, duplicate elimination mechanics and troubleshooting.

Cheers,

Amit Neogy



Custom workflow actions in Microsoft Dynamics CRM 2011 Online

$
0
0

We have received multiple questions and feedback regarding the capability of adding custom workflow activities in CRM 2011 Online and I would like to provide some responses as well as offer some guidance on how to insert custom logic to workflows in CRM 2011 Online.

Due to a technical limitation we are unable to support custom workflow activities in CRM 2011 Online. Custom workflow activities is a widely used feature and having direct support for it in Online is one of our top priorities, we are considering enabling this support in a future release.

Nonetheless, this doesn’t mean that you cannot achieve having custom code that is executed as part of a workflow. There are multiple alternatives that make use of plugins combined with workflows to execute custom code asynchronously similar to custom workflow activities. I will explore one of these patterns in this article by using a real life scenario example.

Scenario: My salespersons constantly call leads to offer our products. If the lead is interested we qualify the lead (convert to account) and add it to a marketing list for prospective buyers. Otherwise we disqualify the lead. We need a call script for the salespersons which seamlessly performs the lead qualification process in the background.

Step 1: Identify which is the logic that is not supported by the CRM Workflow Designer and what inputs/outputs are required.

The only part of my workflow that requires custom code is to add members to the marketing list. Everything else can be handled by configuring a dialog using the CRM workflow designer. For my custom code I don’t need any output but I will need two input parameters: The marketing list and the account which should be added to the list.

Step 2: Create a custom entity to encapsulate the information from step 1.

I will create a custom entity called “Add to marketing list action” hidden from the sitemap. To handle the inputs/outputs it will have two lookup attributes: A marketing list and an account.

Step 3: Define the process in the workflow designer.

I will define the dialog and for the custom action, I will insert a Create step for my custom entity. In the form I will configure the inputs using form assistant:

clip_image002

clip_image003

Step 4: Write the custom code in a plugin

I have my code which I will register in a sandboxed plugin which will trigger on create of “Add To Marketing List Action”.

public sealed class AddMemberToMarketingList : IPlugin { public void Execute(IServiceProvider serviceProvider) { IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService (typeof(IPluginExecutionContext)); IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory) serviceProvider.GetService(typeof(IOrganizationServiceFactory)); IOrganizationService service = serviceFactory.CreateOrganizationService (context.UserId);Entity customEntity = (Entity)context.InputParameters["Target"]; AddMemberListRequest request = new AddMemberListRequest(); request.EntityId = ((EntityReference)customEntity["new_account"]).Id; request.ListId = ((EntityReference)customEntity["new_marketinglist"]).Id; service.Execute(request); } } !-- code>
!-->

Step 5: Clean up.

You don’t want to end up with thousands of “Add To Marketing List Action” entity instances. Therefore you can simply register an asynchronous plugin on Create of “Add To Marketing List Action” which will delete them immediately.

Done! Now you can ask salesperson to start the Dialog on lead entities and they won’t have to worry at all about the marketing lists or the lead qualification process. This approach (and other similar patterns) will provide the same benefits of custom workflow activities:

  • Ability to integrate two separate components: Declarative logic (workflow designer) and procedural code (plugins).
  • It can be packaged into a solution available for CRM OnPremise and Online.

Cheers,

Gonzalo Ruiz



Marketing with Dynamic List

$
0
0

Imagine how productive a Marketing manager would be if she can target all her customers by creating a marketing list which keeps itself auto updated based on a criterion. Read on to find out how Microsoft Dynamics CRM 2011 makes her job simpler. This article talks about the newly introduced Dynamic Marketing list in CRM 2011 and its capabilities. We shall also look into how it differs from marketing list in CRM 4.0 which will henceforth be referred as static marketing list.

The biggest challenge in CRM 4.0 for a Marketing manager was to keep the marketing list updated with new records in the system. This is a time consuming and repetitive process which manifests more in case there are a large number of members to be added. Here is when Dynamic Marketing list comes for your rescue.

For example, if a Marketing manager wants to create a Marketing List for all contacts in New York City, then she can create a Marketing list of type Dynamic and specify a query “All contacts in New York City” just like one specifies an advanced find criteria .That’s it.

Can’t believe that it is this simple? Let me show you a walkthrough.

Walkthrough

Launch a new Marketing List Form. Let us fill in the name as “New York City Contact List”. Select Type to be Dynamic, Member Type to be Contact and Save.

clip_image002

Click on Manage Members Button in Actions group.

clip_image004

This is the familiar advanced find dialog. Now select the attribute “Address 1: City” Equals “New York”

clip_image006

Click on Find in Manage Members dialog to verify whether you have selected the right criteria and you are getting the expected results.

clip_image008

Click on “Use Query” to save this query with Dynamic List. And you are done! You can add this marketing list to a Campaign or create a quick campaign for the members of this list.

If you navigate to Marketing List Members left nav in the form, you can see the records in the grid. This records grid is dynamic i.e., it will always show all the records in the system satisfying the criteria specified in the query.

clip_image010

To update the query, click on Manage Members button. You will see the existing query already filled in

clip_image012

You can add the new clauses as per requirement, for example Parent Customer’s name begins with “ATMC”. Click on “Use Query” when you are done.

You can use this marketing list as usual in Quick Campaign, Campaign Activity and you can rest assured that your marketing campaign will reach the right set of customers.

Now, many of you who are familiar with List Member entity might be wondering how this differs from the option of using Advanced Find to add members. ” Use Query” action results in the fetchXML query being stored in the newly added attribute “query” of marketing list whereas adding members using advanced find will actually create a list member record in the database for each account/contact/lead being added.

For those who like to dig deeper, here is how dynamic list works under the wraps:

In a static list, we create a new list member entity record whenever any account/contact/lead is added to a static list. But in case of dynamic list, members are never added in the list i.e. we never add any entries in list member table. Whenever a dynamic list is used in a Quick Campaign or Campaign Activity distribution, the fetchXML query stored with dynamic list is executed at run time to retrieve the records satisfying the criteria. This ensures that the latest records are picked up every time such a list is used.

This is the reason why other actions like Remove Member, Add Member by Lookup etc. are not available for dynamic list. Also, you cannot add Account/Contact/Lead to a dynamic list using Add to Marketing List action available on Grid and Form. You can’t mix up the two actions like adding members by look up and using query on a single list.

For comparison between static and dynamic list, refer to the table below:

image 

Copy to Static

For those who want to save a snapshot of the dynamic list, that is if you want these set of members to be permanently added to a list, then you can use Copy to Static. This action will create a new static list which will have all the records that satisfy the query specified in the dynamic list as its members. This action will be particularly useful if you wish to keep a history of the records targeted by a Campaign. The newly created static list will be locked by default.

clip_image014

This is the new static list created from Dynamic List:

clip_image016

Also, this list has all the members which satisified dynamic list query.You can change the query in the original dynamic list which will have no effect on the members in this newly created static list.

clip_image018

Hope this enhancement proves beneficial in your day to day work.

Cheers,

Apoorvi Kapoor



How to Reference Assemblies from Plug-ins

$
0
0

You may have noticed that Microsoft Dynamics CRM 2011 (and CRM 4 before it) does not really have support for referencing custom assemblies from a plug-in assembly. You are limited to .NET Framework assemblies and the public Microsoft Dynamics CRM 2011 Software Development Kit (SDK) assemblies. In Microsoft Visual Studio, your references will look something like this:

clip_image002

If you wanted to reference an assembly that you had written, your options were pretty limited:

  • Register the assembly on disk with any referenced assemblies in the same directory.
  • Register the referenced assembly in the GAC
  • Include the relevant source code in the plug-in assembly

With the introduction of Solutions in Microsoft Dynamics CRM 2011, the first two options are not very manageable (as they require special setup on multiple servers during the installation of the solution). In addition, those options don’t work in Microsoft Dynamics CRM Online, since assemblies must be registered in the database in CRM Online. If you include source code, as the last option suggests, then all of the benefits of a referenced assembly are lost, without gaining any real benefits.

Merging Assemblies

Microsoft Research published a tool that can solve this very problem: ILMerge. It is a utility that merges multiple Microsoft .NET assemblies into a single assembly. Although this tool has been produced by Microsoft Research, it has been around since .NET 1.1 and is pretty stable. The newest version of the tool also works with .NET 4.0 (newest version of the CLR), which is how it impacts us. In order to get this example to work, you’ll need to use version 2.10.526.0 or above.

Suppose you created a library, PluginLibrary.dll, and wanted to add it as a reference in your plug-in assembly. If you are using ILMerge, you can do just that. Add a reference to your PluginLibrary.dll and build your project.

clip_image004

Once all of the assemblies have been built, ILMerge is run to merge them. Before we can start merging the assemblies, there are a few steps we need to take to get the tool to work with .NET 4.0. First, a config file (name it ILMerge.exe.config), as defined on the ILMerge web site. For convenience, here’s the file:

<?xml version="1.0" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/> </startup> </configuration> !-- code>
!-->

If you are running ILMerge on a 64-bit machine, you’ll need to locate the 32-bit version of the .NET 4.0 assemblies. If you don’t do this, ILMerge will attempt to load the 64-bit assemblies. Since the tool is compiled as a 32-bit assembly it will throw a BadImageFormatException while loading a 64-bit assembly. On my machine, these assemblies are located at C:\Windows\Microsoft.NET\Framework\v4.0.30319.

As a side note, since ILMerge cannot load 32-bit assemblies while CRM 2011 requires 64-bit assemblies, plug-in assemblies must be compiled as platform neutral (can be loaded as a 32-bit or 64-bit assembly) in order to work with both ILMerge and CRM 2011.

Now that the environment has been prepared, let’s run the tool:

ilmerge /keyfile:PrivateKey.snk /target:library /copyattrs /targetplatform:v4,"C:\Windows\Microsoft.NET\Framework\v4.0.30319" /out:CompletePlugin.dll MyPlugin.dll PluginLibrary.dll!-- code>
!-->

A quick explanation of the attributes:

- keyfile: Specifies the key file that should be used to sign the final assembly. An assembly must be signed in order to be registered with CRM 2011, so this is a required parameter.

- target: Indicates that the generated file should be a DLL

- copyattrs: Copies the assembly-level attributes from the assemblies and merges them. This is especially useful if you have included the generated entity classes (from CrmSvcUtil.exe) in your library assembly, as this will ensure that the assembly attribute, ProxyTypesAssemblyAttribute, is present on your merged assembly.

- targetplatform: The version of the .NET framework as well as the path to the assemblies. If you are running the tool on a 32-bit machine, the path is not required.

- out: Specifies the output DLL file name

- List of assemblies: The list of assemblies to be merged

Once the tool completes, the output assembly, CompletePlugin.dll, can be registered with Microsoft Dynamics CRM 2011.

Please note that the merged assembly cannot exceed the maximum assembly size (restricted by CRM 2011).

Links

Cheers,

Michael Scott



New Microsoft Dynamics CRM 2011 Whitepaper for ISVs and Developers

$
0
0

CRM MVP Julie Yack announces the release of her current whitepaper for tech nerds. Julie blogs regularly at The never boring life of me.

Looking for details on Microsoft Dynamics CRM 2011 and how it applies to you as an Independent Software Vendor (ISV), a technical decision-maker and/or a developer?  Are you a curious nerd looking for what’s new?  Here you go!

Ok, so here’s some of the nitty gritty details…

Paper is titled:

Microsoft Dynamics® CRM 2011
Building Business Applications with Microsoft Dynamics CRM 2011
A guide to Independent Software Vendors and Developers

Some details you can learn about:

  • Modeling of your business data
  • A better user experience
  • Visualization and reporting of data
  • Programmability including OData, WCF, LINQ, Dialogs, Workflows and more
  • Cloud cloud cloud (CRM Online and Azure both covered)

Brought to you by a couple of your favorite (I hope) CRM nerds, David Yack and me. We were asked to write this paper to follow-up on the one we produced for the similar topics for CRM 4.0.

I hope you find something useful inside this whitepaper download.

Cheers,

Julie Yack

It’s Veteran’s Day 2011

$
0
0

As a veteran of the U.S. Army in the Corps of Engineers, now a retired Major, here’s my favorite Veteran’s Day video this week:

From all of us at Microsoft

Cheers,

JaAG



Simple Chart Modification in Microsoft Dynamics CRM 2011

$
0
0

clip_image002

Start with Exporting the Chart

All Charts are entity based. Start by opening the entity that your chart is based on. In the case of the Sales Funnel, it is the Opportunities Entity. Next, make sure the chart in question is the current chart being displayed with the entity. Once you have the chart selected, click on the View tab and pick the Export Chart option. This will allow you to save a XML file to your local machine. We’ll edit this file to make our changes.

image

Edit the XML

Below is a complete chart file. Note the highlighted sections – we’ll drill into them next.

<visualization>
  <visualizationid>{87293554-2482-DE11-9FF3-00155DA3B012}</visualizationid>
  <name>Sales Pipeline Chet 2</name>
  <description>Shows the sum of estimated revenue in each stage of the sales pipeline.</description>
  <primaryentitytypecode>opportunity</primaryentitytypecode>
  <datadescription>
    <datadefinition>
      <fetchcollection>
        <fetch mapping="logical" count="10" aggregate="true">
          <entity name="opportunity">
            <attribute name="estimatedvalue" aggregate="sum" alias="sum_estimatedvalue" />
            <attribute name="stepname" groupby="true" alias="stepname" />
            <order alias="stepname" descending="false" />
          </entity>
        </fetch>
      </fetchcollection>
      <categorycollection>
        <category>
          <measurecollection>
            <measure alias="sum_estimatedvalue" />
          </measurecollection>
        </category>
      </categorycollection>
    </datadefinition>
  </datadescription>
  <presentationdescription>
    <Chart Palette="None" PaletteCustomColors="218,112,214; 128,0,128; 0,255,255; 218,165,32; 49,171,204; 255,136,35; 97,142,206; 209,98,96; 168,203,104; 142,116,178; 93,186,215; 255,155,83">
      <Series>
        <Series ShadowOffset="0" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" ChartType="Funnel" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1'>
          <SmartLabelStyle Enabled="True" />
        </Series>
      </Series>
      <ChartAreas>
        <ChartArea>
          <Area3DStyle Enable3D="True" />
        </ChartArea>
      </ChartAreas>
      <Legends>
        <Legend Alignment="Center" LegendStyle="Table" Docking="right" Font="{0}, 11px" ShadowColor="0, 0, 0, 0" ForeColor="59, 59, 59" />
      </Legends>
      <Titles>
        <Title Alignment="TopLeft" DockingOffset="-3" Font="Segeo UI, 13px" ForeColor="0, 0, 0"></Title>
      </Titles>
    </Chart>
  </presentationdescription>
  <isdefault>false</isdefault>
</visualization>

Edit the XML (the non-color changes)

<name>Sales Pipeline Chet 2</name>

Find the <name> line and give your chart a unique name

<Area3DStyle Enable3D="True" />

The Area3DStyle will be set to False initially, change this to True for the 3D look.

Edit the XML (the color section)

<Chart Palette="None" PaletteCustomColors="218,112,214; 128,0,128; 0,255,255; 218,165,32; …

The colors referenced are in RGB format where an integer from 0 to 255 represents the saturation of red, green, and blue respectively. The colors are listed in order that you see them from top to bottom in the graph. Each set of three numbers represents a color (so in this example 218,112,214; is the first color). In case you haven’t memorized the millions of color combinations that are possible, here’s what I do. There is a website that lists over 500 of the most common colors. http://cloford.com/resources/colours/500col.htm

image

You’ll note in the circled columns the three numbers that correspond to the associated color. Just input the colors you want from the list.

Import your new graph

image

Simply go back to the Entity page and select Import Chart from the View tab. If you have not changed the charts title, you will be prompted to either overwrite the original or make a copy. If you have given your chart a unique name, it will just be loaded and immediately displayed.

That’s all there is to it – now go out there and customize those charts!

Cheers,

Chet Kloss




Internal storage of SiteMap and Form customization in managed solution packages

$
0
0

Solution is a fantastic feature that will be released with the Microsoft Dynamics CRM 2011. Refer to this blog for its introduction: CRM 2011 solutions buisness apps on Steroids. SiteMap and Form customization management is built on top of the CRM 2011 solution infrastructure.

One of the customer feedbacks with the current SiteMap and Form customization import/export feature is that whenever a new customization is imported, it wipes out previous customization. With CRM 2011, customizations from multiple imported (installed) solutions will be merged together and presented to the end user in a unified customization layer. This is made possible in part due to the design of the internal storage of SiteMap and Form customization, which is the topic of this blog.

Unmanaged Solution

Unmanaged solution deals with the active customization layer. SiteMap and Form customization storage format in unmanaged solution is basically the same as before. I will not spend more time on it than point out the following bullet points:

  • The full content of the SiteMap definition (SiteMapXml) and full content of the Form definition (FormXml) is included in the customizations.xml file that is zipped into the unmanaged solution zip file.
  • SiteMap definition is included as ImportExportXml-> SiteMap xml node and complies with the schema defined at <CRM Server InstallDir>\Server\ApplicationFiles\SiteMapType.xsd.
  • Form definition is included as ImportExportXml -> Entities -> Entity -> FormXml xml node and complies with the schema defined at <CRM Server InstallDir>\Server\ApplicationFiles\FormXml.xsd.

Managed Solution

Here is where the major storage format change has happened since CRM V4. The main idea here is to capture SiteMap and Form customization as a diff between customized SiteMap and Form and the base upon which the customization is made. And this diff is transported in the managed solution package and applied to end user SiteMap and Form base when the solution is installed at the end user deployment.

Please note, as the end user SiteMap and Form base at installation is quite likely different from the SiteMap and Form base upon which the customization is based, some issues can happen and workaround is needed. But that is for another discussion.

SiteMap customization is captured as ImportExportXml-> SiteMap xml node in the customizations.xml file that is zipped into the managed solution zip file and complies with the schema defined at <CRM Server InstallDir>\Server\ApplicationFiles\SiteMapTypeManaged.xsd. If there is no SiteMap customization, this node does not exist in the solution customizations.xml file.

Form customization is captured as ImportExportXml -> Entities -> Entity -> FormXml xml node in the customizations.xml file that is zipped into the managed solution zip file and complies with the schema defined at <CRM Server InstallDir>\Server\ApplicationFiles\FormXmlManaged.xsd. If there is no form customization for a particular form, this node does not exist in the solution customizations.xml file for that form.

If you compare SiteMapTypeManaged.xsd to SiteMapType.xsd or FormXmlManaged.xsd to FormXml.xsd, you will notice that the main difference is that the xml definition for many elements in the managed version has an additional attribute named solutionaction with the following valid values:

<xs:simpleType name="solutionactionType"> <xs:restriction base="xs:string"> <xs:enumeration value="Added" /> <xs:enumeration value="Removed" /> <xs:enumeration value="Modified" /> </xs:restriction> </xs:simpleType > !-- code>
!-->

“Added” is used to indicate that this element (and all its child elements) is added by the customization. “Removed” is used to indicate that this element (and all its child elements) is deleted by the customization. And “Modified” means some aspect of this element (not considering its child elements) is modified by the customization. If an element is not affected by the customization, solutionaction attribute will not appear in its definition of xml node. And if an element and all its child elements are not affected by the customization, the xml node sub tree will not appear in the solution customizations.xml file.

Some Sample Illustrations

Since the managed solution packaging for SiteMap customization and Form customization is similar and uses the same engine, I will be using SiteMap customization to illustrate the internal storage of customization in a managed solution.

I made some changes to the out of box SiteMap under SiteMap -> Area (Id="Workplace") -> Group (Id="MyWork") node:

  • I changed the Icon for the nav_dashboards SubArea from /_imgs/area/18_home.gif to /_imgs/data_management.gif.
  • I added a new node <SubArea Id="link" Title="link" ... >
  • And I deleted the node of <SubArea Id="nav_calendar" ...>

See the following screen shots:

clip_image002 clip_image004

And when I include the SiteMap in a solution for Export as Managed Solution, I see the following in the ImportExportXml-> SiteMap xml node in the customizations.xml file that is zipped into the managed solution zip file:

<SiteMap> <SiteMap> <Area Id="Workplace" ...="" > <Group Id="MyWork" ...="" > <SubArea Id="nav_dashboards" ...="" Icon="/_imgs/data_management.gif" ...="" solutionaction="Modified" /> <SubArea Id="nav_activities" ...="" /> <SubArea Id="nav_calendar" solutionaction="Removed" /> <SubArea Id="link" Title="link" ...="" solutionaction="Added" /> </Group> </Area> </SiteMap> </SiteMap> !-- code>
!-->

“…” above means some detail is not shown.

As you can see that the nav_dashboards SubArea node has solutionaction="Modified", the nav_calendar SubArea node has solutionaction="Removed", the link SubArea node has solutionaction="Added", and the nav_activities SubArea node does not have solutionaction attribute. That is how the customization is captured and stored in the managed solution for transport to the end users.

Conclusion

There you have it about the internal storage of SiteMap and Form customization in a managed solution package. I hope I have achieved my goals for this blog:

  • To satisfy any curiosity about the internal storage of SiteMap and Form customization in a managed solution package of CRM 2011.
  • To equip you with knowledge to help you debug issues with SiteMap and Form customization during solution import and export. During export, you can verify if all your customization is captured in the exported solution. And during import, you can identify certain cases of import failure and help you to find workarounds if necessary.

Please take a note that the manual editing of managed solution files is not supported (at your own risk) and the information presented here is accurate as of the CRM 2011 Beta release. I hope you benefit from the improvements we made in this area and let us know what can be further improved for future releases. Thank you for choosing Microsoft Dynamics CRM.

Ronghua Jin



Social Activity Dashboard for Microsoft Dynamics CRM 2011

$
0
0

Over the past few days I have been wondering if the new dashboard capabilities in Microsoft Dynamics CRM 2011 would enable me to create a dashboard that monitors activities on various social media sites. Monitoring social media sites is important for small, medium and larger businesses. By doing this a business can keep track of the conversations that people in social communities are having about their brand or service, or even about their competitors.

I imagined myself to be an owner of a small business that sells shoes and other footwear, and asked myself this question: what are the things that I would like to track. Some of the things that came to mind were -

  1. What are the latest updates from the brands that I sell?
  2. What does the social media activity around the various shoe brands look like?
  3. What are some of the biggest conversation topics related to shoes and footwear these days?
  4. What is the current set of conversations happening around shoes and footwear?

Social Media Widgets for CRM Dashboards

I then looked around to find ways in which such information could be displayed on a CRM dashboard. Fortunately, the solution was not too hard to find. There are several web sites that provide social media widgets free of use. One just has to grab the HTML\Java Script code for these widgets and add them into a CRM Web resource. Having done that we are ready to create a "Social Activity Dashboard" - we just have to add these web resources on the dashboard.

Getting the Widgets

Some of the most useful widgets for monitoring social activity can be download directly from Twitter. These widgets provide a real time update into profile pages, and search keywords. The widgets solve the problem by providing the data., so these are good candidates for our dashboard.

In addition to the live data from Twitter, we also need to be able to do some basic analysis such as retrieving the keywords that people are talking about, and the activity timeline for various search terms that I as a shoe business owner may be interested in. Looking around the web I found that the Fuse Labs gadgets from Microsoft provide me a rich set of aggregation capabilities.

Twitter Widgets

I found the following two Twitter widgets interesting for our Social Activity Monitor Dashboard. These are downloadable from http://twitter.com/about/resources/widgets.

Twitter Profile Widget:

I used this widget to get live updates about a profile, in this case Nike - one of the brands that I as a business owner would deal with.

clip_image002

Twitter Search Widget:

I used this widget to get live updates regarding the search keywords that I as a business owner was interested in - in this case my search keywords were Nike, Adidas, and Puma.

clip_image004

Fuse Labs Gadgets:

The gadgets from http://fuse.microsoft.com/ provide the ability to aggregate information from Twitter and provide some basic analytics regarding the social media conversations. These are available at - http://fuse.microsoft.com/project/SocialGadgets.aspx

Fuse Labs Gadget - Tag Cloud

This gadget provides a tag cloud for the keywords provided by the user. I used the keyword "Shoes" to generate this tag cloud gadget

clip_image006

Fuse Labs Gadget - Comparison

I used this gadget to provide a comparison across conversations in the 3 brands that I deal with - Nike, Adidas, and Puma.

clip_image008

Creating Web Resources and Dashboard

The next task is to create the web resources after the widgets have been identified. The widgets from Twitter, and Microsoft Fuse Labs allow the HTML code for these widgets to be downloaded, and embedded into custom applications. I downloaded the code for these widgets and embedded them into CRM Web resources. After creating the web resources, creating the dashboard was easy. For details on how to do this see http://blogs.msdn.com/b/crm/archive/2010/10/12/tracking-your-data-using-microsoft-dynamics-crm-dashboards.aspx.

clip_image010

The Solution package for the Social Activity Dashboard shown above can be downloaded from the following codeplex site - http://crmsocialdashboard.codeplex.com/. If there are more interesting ways in which social information can be consumed, please mention it in your comments.

Cheers,

Siddhartha Rai



Upgrading a CRM 4.0 Custom Workflow Activity to CRM 2011

$
0
0

CRM MVP Mitch Milam is our guest blogger today. Read Mitch’s blog.

I recently upgraded one of my custom workflow activity plugins to CRM 2011 and thought it would be an interesting exercise to walk through that process with you. So let’s walk through the changes, from top to bottom.

Reference Assemblies

As with any application that communicates with CRM, you need to reference the CRM SDK assemblies:

CRM 4.0

using System.Workflow.Activities;

using System.Workflow.ComponentModel;

using System.Workflow.ComponentModel.Compiler;

using Microsoft.Crm.Sdk;

using Microsoft.Crm.Sdk.Query;

using Microsoft.Crm.SdkTypeProxy;

using Microsoft.Crm.Workflow;

CRM 2011

using System.Activities;

using Microsoft.Crm.Sdk.Messages;

using Microsoft.Xrm.Sdk;

using Microsoft.Xrm.Sdk.Workflow;

Creating Parameters for the Activity

This activity accepts 4 parameters, one of which was required. In this example, we are:

  • “Decorating” a Lookup property to show the label “Marketing List” in the Workflow user interface.
  • The parameter is required
  • Since it is a lookup, the lookup is referencing the list Entity, which is a Marketing List.
CRM 4.0

With CRM 4.0 developers were generally targeting the .NET Framework v3.0 (or3.5), so to define an input parameter looked something like this:

public static DependencyProperty MarketingListLookupProperty = DependencyProperty.Register("MarketingListLookup", typeof(Lookup), typeof(RemoveFromMarketingList));
 
[CrmInput("Marketing List")]
[ValidationOption(ValidationOption.Required)]
[CrmReferenceTarget("list")]
public Lookup MarketingListLookup
{
    get
    {
        return (Lookup)base.GetValue(MarketingListLookupProperty);
    }
    set
    {
        base.SetValue(MarketingListLookupProperty, value);
    }
}
!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->!--crlf-->
CRM 2011

In the .NET Framework 4.0, the parameter definition is slightly condensed:

[Input("Marketing List")]
[ReferenceTarget("list")]
[RequiredArgument]
public InArgument<EntityReference> MarketingListEntityReference { get; set; }
!--crlf-->!--crlf-->!--crlf-->!--crlf-->

Class Definition

The class definition has changed slightly due to the change in Windows Workflow versions. Beside the base class changing from SequenceActivity to CodeActivity, you will notice the CRM 2011 version does not have the “decorations” that specify the group and name that will be displayed within the CRM workflow editor. More on that later.

CRM 4.0

[CrmWorkflowActivity("Remove from Marketing List", "CRM Accelerators")]

public class RemoveFromMarketingList: SequenceActivity

CRM 2011

public class AddToMarketingList : CodeActivity

Execute Method

The Execute method remains the sole method required for a custom workflow activity though the Context parameter and return value have changed.

CRM 4.0

protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)

CRM 2011

protected override void Execute(CodeActivityContext executionContext)

Connecting to CRM

The code that defines the connection to the CrmService has changed slightly as well, but overall, the concepts remain the same:

  1. Get the Execution Context
  2. Get a handle to the Workflow Context or Organizational Service Factory
  3. Create an instance of the CrmService
CRM 4.0

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

IWorkflowContext context = contextService.Context;

ICrmService crmService = context.CreateCrmService();

CRM 2011

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

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

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

Accessing Parameter Values

Accessing the values found within the input parameters is slightly different in CRM 2011 where the value of the parameter is not actually extracted until you actually need to use it. In CRM 4.0, that process happens more or less automatically due to the DependencyProperty setup.

CRM 4.0

Guid ListId = MarketingListLookup.Value;

CRM 2011

Guid ListId = MarketingListEntityReference.Get<EntityReference>(executionContext).Id;

Doing the Work

After you have all of the above code in place, the remainder of your code should function as it did in CRM 4.0. I did not have to make any changes to my code once the “plumbing” was upgraded.

Registering your Plugin

The registration process is exactly the same between versions: You use the Plugin Registration Tool.

The biggest difference between the two is in CRM 2011, the Plugin Registration Tool is where you specify how the custom workflow activity is displayed to the user within the workflow editor.

When you highlight the workflow activity, you need to specify the FriendlyName, Name, and WorkflowActivityGroupName properties as shown below:

clip_image002

Note: Even though the above figure doesn’t show it, the FriendlyName and Name properties need to be the same.

Conclusion

Well, that is about it. It probably only took me 2 hours to perform the upgrade of my code and that was starting from scratch with zero knowledge of the process. I just reviewed the SDK documentation and sample code and worked through each issue as it was encountered.

I hope this helps and good luck.

Mitch Milam

Update Rollup 14 for Microsoft Dynamics CRM 4.0

$
0
0

The Microsoft Dynamics CRM Sustained Engineering (SE) team released Microsoft Dynamics CRM 4.0 Update Rollup 14 on Thursday, November 18, 2010.

The links below will take you to the necessary information about Update Rollup 14.

General details about Update Rollup 14

Update Rollup 14 is cumulative. However, the Update Rollup 14 CRM Client and Data Migration Client packages require Update Rollup 7 to be installed. For all other CRM components, you do not need to install any previous Update Rollups prior to Update Rollup 14.

The Update Rollup 14 download contains updates for the 40 supported Language Packs. Prior to installing the Update Rollup 14 Language Pack, you must install the original Language Pack. If you have Language Packs installed, you should

  1. Download the Update Rollup 14 Language Pack
  2. Install the Update Rollup 14 Language Pack
  3. De-provision the Language Pack
  4. Re-provision the Language Pack

Information about how to avoid reboots when installing the CRM Outlook Client can be found in the Update Rollup 4 blog posting.

The Update Rollup 14 Client can be deployed before the server is upgraded to Update Rollup 14.

Steps to make the Update Rollup 14 Client available via AutoUpdate can be found in the Update Rollup 4 blog posting. The Link and Patch IDs can be found in KB article 2389019.

Each update rollup could have fixes that require manual configuration. Please see the “Hotfixes and updates that you have to enable or configure manually” section in KB article 2389019.

How to get support for Update Rollup 14

For support, please contact Microsoft Product Support. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site: http://support.microsoft.com/default.aspx?scid=fh;[LN];CNTACTMS.

Note: In special cases, charges ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Cheers,

Matt Brown



Tips and Tricks: Filling in Lookups

$
0
0

Who hasn’t been thankful for the form assistant in Microsoft Dynamics CRM 4.0 when doing a demo? You could quickly click on any of the records that showed up to fill in the lookups. After all, it didn’t really matter if you added Jane Doe or John Doe as a contact.

Microsoft Dynamics CRM 2011 doesn’t have a form assistant anymore, so now are you doomed to use the lookup dialog? Actually there is a much better way than the form assistant and the Lookup dialog and it’s called MRU (Most Recently Used). It just needs a little bit of preparation. CRM 2011 has this new capability that allows you to select a record directly from the lookup field without ever leaving it. The only prerequisite is that you have added the record to the same lookup type before. Here is it how you do it:

Open any form that has a contact lookup and add a contact let’s say Jane Doe using the Lookup dialog or if you know the spelling let auto-resolve take care of it (just press CTRL+K).

clip_image002

Now open another form with a Contact lookup, for example an Opportunity. In this case the lookup is called Customer, which could actually be either a contact or an account. Start typing the letter “J” notice how the MRU pop up gives you “Jane Doe”. You can now either use the keyboard (DOWN ARROW to select and ENTER to add) or the mouse to add it to the lookup field.

clip_image004

If you don’t care which record you are adding in the lookup field you, CRM 2011 lets you bring up the entire list of your most recently used records in alphabetical order. All you need to do is press ALT+DOWN ARROW in the empty (this is important!) lookup field and in case of the Customer lookup you get a list of recently used contacts and accounts, since both are valid entities for this lookup type.

clip_image006

This is much better than the form assistant especially for lookups like customer, where you had only a list of accounts or a list of contact that the time. It’s also has a much better performance, since the MRU items are stored locally and synced with the server only every 20 min or when a session closed.

Btw, the auto-complete feature is also pretty neat and easy to use. Just type a name or the first letter and press CTRL+K. Then click on the red underlined text in the lookup field. The auto-complete pop up gives you a list of all (not just MRU) matching records. Note that this can take a bit longer to load depending on how many records you have in the system.

clip_image008

Cheers,

Karin Zimprich



Goal Management: Behind the scenes

$
0
0

What is goal management?

In today’s world, any competitive organization has well defined goals for its members – measurable, and time bound, and with a clear ownership. Goal management in Microsoft Dynamics CRM 2011 lets you set such goals for members in your organization, and also lets you track the progress being made against them. You can set goals with complex queries spanning across multiple records, goal trees spanning organizational hierarchy, monitor their progress on a day-to-day basis, and all this with perfect ease.

So while you are wondering on the immense possibilities in which you can use this feature, our PM buddy Manu has already done a great job summarizing how you can use this feature to cater end-to-end scenarios here.

And now, for those of you, who want to dig deep into this magic vault, and understand what is happening behind the scenes, so that you can build your own applications on top of this, here’s your share of the pie.

Goal Management comprises of four different entities: goal, goal metric, rollup field, and rollup query.

In colloquial language, if you say: In the Quarter 3 of FY2010, Nancy needs to bring in $250000 revenue through opportunities in New York City, this is how this information maps to goal management entities:

image

I can generalize the above as:

1. Goal:

     a. Who does it?

     b. How much?

     c. In what time?

2. Metric: Is sort of metadata to goal. What is the type of goal you are setting? Types can be

     a. Count: Goal based on number of records. Like number of phone calls made by David.

     b. Amount: Goals based on aggregated amounts which come from some fields in a CRM entity. Like actual revenue. This has three sub types:

          i. Money

          ii. Integers

          iii. Decimals

3. Rollup Field:

     a. The record on which goal is based.

     b. The attribute in the record which contributes towards the target set in the goal

     c. The date type attribute which is compared against the timelines of the goal to decide if a record contributes towards this goal or not.

     d. The value of state/status that the record should have in order to be able to contribute towards a goal.

4. Rollup Query: What all records contribute?

You’ll notice that there’s a slight overlap of “what all records contribute?” between rollup field and rollup query. Here’s my take on it:

If you want your records to be filtered based only on dates, and statecode/statuscode(for example: closed opportunities), then metric will suffice.

Additionally, if you want to consider only those records which are owned by the goal owner, use the ConsiderOnlyGoalOwnersRecords field set to true for this.

But if you ask for anything more than this, while filtering records, you’ll need to use rollup query to define your query. Let’s say, you want to roll up only those opportunities which are in the city of New York, and have estimated revenue greater than $10,000 and are owned by your team, and have the originating lead also owned by your team, all you need to do is: Create a rollup query which has all the above clauses, and associate it to the rollup field you want to use the query for.

Now, that we understand, what each entity is used for, it’s time for some of my developer secrets to be unveiled. Let’s talk about some of the nuances that you need to know while programming for goal:

Goal timelines:

Goals can be of two types: custom period goal and fiscal period goal.

A fiscal period goal’s timelines match the organization’s fiscal settings. For example if the organization’s fiscal period is quarterly, then you can set quarterly goals, and the start dates and end dates of these goals will align with the organization’s quarter start and end date respectively.

If you do not want to use your org’s fiscal settings, then you can choose your own dates by creating a custom period goal.

Goal Metric: Whenever you create a goal, you associate it with a metric. A metric is not just a reference in goal, but it carries its properties: metricType and goalType to the referring goal as well.

Goal Rollup:

Let us first talk about what we mean by goal rollup.

Goal entity has certain fields that we use to indicate the progress made against the goal. The gathering of this data is termed as rollup.

A goal rollup is a two phase process:

1. For each individual goal, queries are performed based on the rollup fields they are associated with, and aggregates are updated in the goal.

Let’s run this through an example:

We’ll use the out-of-box metric: Revenue for this purpose.

Let’s take the same goal for Nancy that uses the Revenue metric as an example.

If you open Revenue, it has two rollup fields:

clip_image004

So a rollup on Nancy’s goal above will result in two aggregate queries on opportunities:

The Actual(money) field will be updated with an aggregate for Actual Revenue of all opportunities closed as won in Q3 FY20101 in New York.

The In-Progress(Money) field will be updated with an aggregate for Est. Revenue of all opportunities active in Q3 FY2010 in New York.

2. A goal can have one or more child goals, and hence you can create trees of goals to represent goals for an organizational hierarchy. In such scenarios, a child goal contributes towards a parent goal. Let’s say, Nancy reports to David, and David to Kevin. So we have the following hierarchy:

Kevin-> David->Nancy

Hence Nancy’s goal contributes towards David’s, and David’s goal in turn contributes towards Kevin’s goal.

So in the second phase, the child goal’s contribution is rolled up to the parent goal, all the way up to the root goal of the goal tree.

Rollup only from child goals field:

While creating a goal, you can choose not to roll up any data from participating records into the goal. The rollup fields in this case will contain data aggregated only from the child goals. So the step 1 in goal rollup section above will not be executed for this goal.

When does goal rollup happen?

Goal rollup has two modes: asynchronous and synchronous.

There’s a recurring async job that performs the rollup with a frequency configurable in organization settings.

Also, there’s a Recalculate button that you can use to do the rollup for a specific goal tree on an on-demand basis.

Goal targets:

You set a target in a goal. The target can be one of the three types: money, decimal, integer, and hence we have the following target fields respectively:

1. targetmoney

2. targetdecimal

3. targetinteger

Based on the metric you are referring, you will use only one of these at any given point of time.

Goal Rollup Fields:

In order to measure how the goal owner is doing, we have a set of rollup fields: Actuals, In-Progress, and Custom.

Actuals – This indicates the actual amounts achieved so far. Example, in case of revenue goals, this can indicate all opportunities closed as won.

In Progress – This is an indicator of the amounts you expect to achieve. Example, in case of revenue goals, this can indicate all open opportunities.

Custom – In case you need to track anything else as a performance indicator, you can use this field. For example, for revenue goals, you have two indicators: open opportunities with rating = hot strongly indicate potential revenue, while those with rating = warm indicate potential revenue, but much less likely than the former. In this case, you can use the In-Progress field for one, and the custom rollup field for another case.

Each of these is again of the three type variants. So we get the matrix:

 

Money

Integer

Decimal

Actual

ActualMoney

ActualInteger

ActualDecimal

In Progress

InProgressMoney

InProgressInteger

InProgressDecimal

Custom

CustomRollupFieldMoney

CustomRollupFieldInteger

CustomRollupFieldDecimal

Once you select a metric, which has one or more rollup fields, mapping to actual, in progress or custom rollup fields in goal, then while working on goal entity, you should use the respective field from rollup field, and respective type from the metric’s goal type.

Rollup Queries:

Again, based on the metric’s goal type, you’ll have a rollup query for your actual, in-progress, and custom rollup fields. Following is the table mapping for rollup query lookup fields and goal’s rollup fields:

Rollup Query Lookup
Goal Rollup Field

RollupQueryActualIntegerId

ActualInteger

RollupQueryActualDecimalId

ActualDecimal

RollupQueryActualMoneyId

ActualMoney

RollUpQueryInprogressIntegerId

InProgressInteger

RollUpQueryInprogressDecimalId

InProgressDecimal

RollUpQueryInprogressMoneyId

InProgressMoney

RollUpQueryCustomIntegerId

CustomRollupFieldInteger

RollUpQueryCustomDecimalId

CustomRollupFieldDecimal

RollUpQueryCustomMoneyId

CustomRollupField

Based on your metric’s goal type again, there will be at max three rollup queries in use at any given point.

Auto-computed Attributes:

A set of auto calculated fields have been provided for making your life easy:

Field Name
Description

ComputedTargetAsOfTodayMoney

Indicates what should be the actual target value as of today based on the target value and the goal’s start date.

Used when goal is a money type goal.

ComputedTargetAsOfTodayDecimal

Indicates what should be the actual target value as of today based on the target value and the goal’s start date.

Used when goal is a decimal type goal.

ComputedTargetAsOfTodayInteger

Indicates what should be the actual target value as of today based on the target value and the goal’s start date.

Used when goal is an integer type goal.

ComputedTargetAsOfTodayPercentageAchieved

Indicates what percentage of the target should the actual be as of today based on the target value and the goal’s start date.

Percentage

Indicates what is the actual achieved percentage of the goal against the target.

Uses target and actual fields to compute this.

Overriding goal rollups:

In normal course of things, goal rollups happen in background with a fixed frequency and the rollup fields are updated by the rollup job. However, if you explicitly want to override what the rollup job has calculated for the rollup fields, you can set the isoverride, and isoverridden fields = true and update the rollup fields.

If you set isoverridden to false, then the next rollup on that goal will overwrite these values with calculated values again.

Please note that you can do this only using SDK. The UI does not allow you to do this.

Goal owner vs goal manager: Looking at goal SDK, you’ll find two attributes: goalownerid, and ownerid. Goalownerid stands for the person/team for which the goal is being set. Ownerid is in traditional sense the CRM owner of the record, but since in real life scenarios, a manager governs her reportees goals, hence ownerid is named as Manager in the UI.

A goal rollup always happens in the context of goal’s manager.

Goal trees:

In a given goal tree, the following attributes will be same across the tree:

1. Goalperiodtype

2. Goalstartdate/goalenddate

3. Goalmetric

Goal currency: A goal’s currency is defaulted to organization’s currency, and is not valid for update.

Recalculate message: Goal rollup can be done synchronously using the Recalculate message. A recalculate for a goal will recalculate the entire goal tree. For code samples, you can refer to the SDK documentation.

By now you have enough insights to get started with goal management in CRM. Time to get your hands dirty!

Cheers!

Your friendly dev,

Nimisha Saboo

Custom Report Capabilities in Microsoft Dynamics CRM 2011

$
0
0

In Microsoft Dynamics CRM 2011, we have introduced Fetch-based custom reports that can be created and run in both On-Premise and On-Line environment. This has fulfilled one of the top ask for Microsoft Dynamics CRM Online. Fetch xml provides a secure, performant way to retrieve data from the CRM. These reports uses data processing extension component of SQL Server Reporting Services to execute report. It enables us to connect to CRM platform and retrieve the data. Refer to Abhijit Gore’s blog to know more about newly introduced fetch-xml based custom reports in Microsoft Dynamics CRM 2011.

I will discuss the different reporting capability available in the custom reports. The first post of this series will discuss how different attribute types are handled in the Fetch-based custom reports. A report writer writing report will use “Raw Value” fields for the computational purposes like aggregation, grouping…; and “Formatted Value” fields for the display purposes. The result returned from querying fetch xml in CRM contains both raw and formatted value. These formatted values are as per the user settings in CRM. The table below illustrates some of the example of raw and formatted value in CRM.

image

Data processing extension for CRM Reports also supports access to both raw and formatted value of an attribute by creating separate field in the data set corresponding to each value. Some special types like “Lookup” and “Picklist” also support additional fields (A complete list for all the supported types is at the end of this post).

Using Report Authoring Extension for BIDS to create Report Data set:

The following example create a report that shows the opportunity name, estimated revenue (in base), potential customer and the total estimated base revenue of opportunities. The display value in the table should be formatted; however, the value used for aggregation, sorting and grouping should be done on raw values.

1. Start Business Intelligence Development Studio “BIDS” and create a new report which uses “Microsoft Dynamic CRM Fetch” Data source type.

2. Enter the following fetch xml in the Query string. Specify the required attribute in the entity node of the fetch xml.

image

3. Click next and complete the report wizard.

4. The report wizard automatically populates the entire permissible field in the dataset. Generally, more than one field is generated for a single attribute in the fetch xml. The fields appended with “Value” text denote the raw value of the attribute. There are three different field generated for attribute “customerid” in the fetch xml.

  • DataField “customerid” returns the display name of the customer.
  • DataField “customeridValue” returns the raw value of the customer.
  • DataField “customeridEntityName” returns the entity, customer belongs to.

clip_image002

5. Modify the report by adding the necessary columns in the table. Since these columns will be just used to display purposes, we will use fields that correspond to the formatted value.

clip_image004

Column Name

Expression Value

Opportunity Name

=Fields!name.Value

Customer Name

=Fields!customerid.Value

Est. Revenue

=Fields!estimatedvalue_base.Value

Est. Close Date

=Fields!estimatedclosedate.Value

6. For aggregation, we will use the raw value of the attribute. Field “estimatedvalue_baseValue” denote the raw value of attribute “estimatedvalue_base”. Aggregate can be obtained using expression:

                         =Sum(Fields!estimatedvalue_baseValue.Value).

clip_image006

Note: The aggregated value displayed here will not be a formatted value. To format the aggregate value report writer can use the culture information passed during report execution as parameter. I will explain this part in the later post.

7. At runtime, Data processing extension for CRM Reports will use the fetch xml to query the CRM platform and get the entity result collection. It then internally parses the result collection and returns the result for different field in data set.

image

A sample DataSet

A dataset contain separate field entry for the different value in attribute.

“Name” is the name to be used for the field in the report.

“DataField” is the name of field (viz. is logical name of the attribute) in the fetch xml.
To access the formatted value, use logical name in the data field.
To access the raw value, use logical name + “Value” suffix in the data field.

<DataSet Name="DataSet1"> <Fields> <Field Name="name"> <DataField>name</DataField> <rd:TypeName>System.String</rd:TypeName> </Field> <Field Name="estimatedvalue_base"> <!--Formmatted value of the estimatedvalue_base attribute--> <DataField>estimatedvalue_base</DataField> <rd:TypeName>System.String</rd:TypeName> </Field> <Field Name="estimatedvalue_baseValue"> <!--Raw value of the estimatedvalue_base attribute--> <DataField>estimatedvalue_baseValue</DataField> <rd:TypeName>System.Decimal</rd:TypeName> </Field> <Field Name="estimatedclosedate"> <!--Formmatted value of the estimatedclosedate attribute--> <DataField>estimatedclosedate</DataField> <rd:TypeName>System.String</rd:TypeName> </Field> <Field Name="estimatedclosedateValue"> <!--Raw value of the estimatedclosedate attribute--> <DataField>estimatedclosedateValue</DataField> <rd:TypeName>System.DateTime</rd:TypeName> </Field> <Field Name="customerid"> <!--Formmatted value of the customerid attribute--> <DataField>customerid</DataField> <rd:TypeName>System.String</rd:TypeName> </Field> <Field Name="customeridValue"> <!--Raw value of the customerid attribute--> <DataField>customeridValue</DataField> <rd:TypeName>System.Guid</rd:TypeName> </Field> <Field Name="customeridEntityName"> <!--Entity Name of the customerid attribute--> <DataField>customeridEntityName</DataField> <rd:TypeName>System.String</rd:TypeName> </Field> <Field Name="opportunityid"> <!--Formmatted value of the estimatedvalue attribute.--> <DataField>opportunityid</DataField> <rd:TypeName>System.String</rd:TypeName> </Field> </Fields> <Query> <DataSourceName>DataSource1</DataSourceName> <CommandText>&lt;fetch version="1.0" output-format="xml-platform" mapping="logical"&gt; &lt;entity name="opportunity"&gt; &lt;attribute name="name" /&gt; &lt;attribute name="estimatedvalue_base" /&gt; &lt;attribute name="estimatedclosedate" /&gt; &lt;attribute name="customerid" /&gt; &lt;attribute name="opportunityid" /&gt; &lt;order attribute="estimatedclosedate" descending="false" /&gt; &lt;filter type="and"&gt; &lt;condition attribute="ownerid" operator="eq-userid" /&gt; &lt;condition attribute="statecode" operator="eq" value="0" /&gt; &lt;/filter&gt; &lt;/entity&gt; &lt;/fetch&gt;</CommandText> <rd:UseGenericDesigner>true</rd:UseGenericDesigner> </Query> </DataSet> !-- code>
!-->

List of Attribute types and their supported values:

The following table illustrates the different attribute types and the different fields available for them (raw, formatted). Normally, “logical name of the attribute” in DataField returns the formatted value and logical name + “Value” suffix returns the raw value. However some data types like “Lookup”, “Customer”, “Owner” and “Picklist” provides access to some additional fields.

image 

Following is the sample result set for different data types:

clip_image010

We just discussed how we can access the raw and formatted value of an attribute in fetch based custom reports. I hope this post will help you in authoring and designing the custom fetch based reports. Please let us know what would you like to see about Custom fetch based report in the future posts.

Cheers,

Kunal Garg




Testing your Microsoft Dynamics CRM 2011 Apps

$
0
0

You have a fantastic App for Microsoft Dynamics CRM 2011 and you want to list it on the Microsoft Dynamics Marketplace and/or achieve certification. Good news! The software test that you have to take is self-administered and is available now for you to give it a try. Do note that several of the sites mentioned here still need to be updated with information about CRM 2011 but that shouldn’t prevent you from giving the software test a try.

The process

1. Register your company and application and download the Microsoft Platform Ready test tool at http://www.microsoftplatformready.com. For questions or comments about the Microsoft platform ready site and tool you can contact: devspec@microsoftplatformready.com

2. Run the tool and execute the corresponding tests that are applicable to your application. You must execute the test cases for Microsoft Dynamics CRM 2011 as well as any other applicable technology that is currently supported by the test tool.

3. Once you have passed the test and submitted the results to Microsoft you can now proceed to register on the Microsoft Dynamics. The Get Listed page spells out the process you need to follow to get your product listed. Currently there is a certain amount of duplication between both systems (e.g. you have to register twice) but the experience will be streamlined with future enhancements.

4. If you want to pursue certification ensure that you have taken the test and submitted the results before you contact the vendor that administers certification on behalf of Microsoft. Do note that there are additional requirements (e.g. customer references) other than the software test to achieve certification. Certification is not required to be listed on the marketplace but it will grant you a “Logo”, better placement in search results and other perks that are well worth it. To learn more about certification see this link. You can also contact msdynamics@veritest.com if you have questions about certification.

The software test

Ok, now to the meat of this post. Running the MPR test tool is very straight forward. Here is a sample run with some clarifications.

1. This is the very first screen, just select “Start a new Test”

clip_image001

2. In the next screen you have to select all applicable technologies. In this example all I have is a CRM solution package so I only selected “Microsoft Dynamics CRM 2011”. Folks that do not install anything on the CRM server keep reading, the test also works for applications that “connect” to CRM.

clip_image002

3. On the prerequisites screen click on “Edit” to add the details of the environment that will be used to test your application. The test is designed to verify that your application works with CRM Online which by extension also verifies that it would work in CRM On-premises. Note that even if there are some other restrictions that would prevent customers from running your application in online (e.g. some legal requirement in a given country) your application should be technically capable of running in CRM online. If your application cannot run in CRM online it will not be able to pass the test.

clip_image003

  • Enter the unique name of your organization, its URL (you can get this information by logging into your CRM deployment and going to Settings>Customization>Developer resources). Ensure that the organization that you are providing does NOT have the solution that you are trying to verify pre-installed or the test will fail.
  • Enter the credentials (typically your live id) and password. The credentials must correspond to a CRM user that has administrative privileges in the organization.

After you supplied the values above click on “Test Connection” to verify the tool can connect to CRM. After connectivity is verified click close. You can now move to the setup information

clip_image004

4. The next screen is key; it allows you to specify if your application installs a solution on the CRM server. If your application doesn’t install anything on the CRM server but does interact with CRM (E.g. a Microsoft Word Add-in) you can still use the test tool to verify your application, just make sure to select “No” when asked for an installation package. The CRM test is focused on testing CRM specific scenarios so even if you have a setup package you should select “No” on this screen if the setup package doesn’t deploy a CRM solution. In the word add-in example all the tool will verify is that the add-in interacts with CRM using our public SDK.

clip_image006

For this run since I am actually installing a CRM solution I selected “Yes” and provided the corresponding installer, which in my case is just the solution .zip file. You may have your own custom installer(s) (e.g. MSI) that in turn deploys a CRM solution.

  • After you provide the file you also have to enter the unique name of the solution (not the display name) that will be installed. As a developer you designated a unique name when you initially created your solution. If you don’t remember it you can find it on the solution.xml file inside the solution.zip file. In my case the solution unique name is “Dummy”

Click next to proceed to the prerequisite summary screen and then next to actually execute the test, keep reading on, this is where most people get a bit confused.

The next screen asks you to install your application. You have to install it; the tool will not automatically install it.

clip_image007

Why? Installing a complex application may require multiple steps and input from the person installing it, the tool doesn’t know the flow/input of your installer (particularly custom installers). Once you have installed your application check the box “Yes” and click next. The tool will then connect to CRM to verify that the application was successfully installed. In this run all I had to do is to import the solution into CRM (On your CRM organization go to Settings>Solutions>Import and provide the solution file).

After installation you have to exercise the primarily functionality of your application and indicate the tool when you are done. The tool will be monitoring activity on the CRM server and verify that valid activity is being performed by the user that was provided on the prerequisites.

clip_image008

What does primary functionality constitutes? Depends on each application, all the tool will verify is that there was activity on the CRM server, it is up to the ISV to ensure that the primary functionality was effectively exercised (read on for those that think ‘cheating <grin>)

The last test is uninstallation of your application. For managed solutions that were installed via solution import this is as simple as deleting the solution. If you have an unmanaged solution or a custom installer you need to execute your own uninstallation routines.

clip_image009

Once you have uninstalled the solution click on “Yes” and then click “Next”. The tool will connect to CRM and verify that the solution was uninstalled.

If everything went as it should <smile> you should get a “Pass” result at the end.

clip_image010

If there are any failures the test will tell you what went wrong. The most common mistake that I’ve seen in some beta runs is that the solution unique name was not properly provided, double check that the name you supply is the unique name and not the display name. Another common mistake is that a setup package and solution name is provide even if nothing gets installed on the CRM server, remember that the CRM test only verifies CRM related operation thus if you don’t install anything on the CRM server don’t supply a setup package on this test.

When you are ready to submit your test result to Microsoft go to the “Reports” section of the tool and follow the on screen instructions.

clip_image011

Happy testing!

Daniel Bien



CRMUG Summit 2010

$
0
0

Today's guest blogger is CRM MVP Larry Lentz who shares with us his experience at this year’s CRMUG Summit.

The last week in October the CRM User Group, www.crmug.com, held its annual Summit. This year it was in Orlando, Florida. CRMUG as an organization is unique in that it is user driven, not vendor driven. Sure, there are vendors and resellers such as myself, but the bulk of the energy comes from the customer base. This carries forward to the Summit. As with most conferences there were a large number of breakout sessions along several tracks. The sessions were run mainly by the member users themselves.

imageThose of us who are on the partner side who presented were cautioned not to push our products or services. The exception was the Vendor Showcases which were meant to be a chance for vendors to explain their products. I attended the one presented by my ‘Battle Buddy’ (you had to be at Summit to understand) Erik van Hoof of CWR Mobility from The Netherlands. Even though I’ve been using CWR Mobile CRM for some time I learned new stuff. There was also an Exhibit Hall where vendors and partners could display as well.

Being primarily user oriented gave the attendees an opportunity to learn from each other. We often get caught up in our own little worlds and ways of doing things. It’s reassuring to see that others may be, or have been, struggling with the same issues and to see how they have resolved those issues. The sessions were designed to be interactive, not just a presentation. There was often a lot of very interesting discussion and interaction between the attendees. The session tracks were Sales, Service, & Marketing, CRM Support, CRM Development, IT Infrastructure, and Community Resources. Microsoft provided two User Experience researchers to perform studies with attendee volunteers. The one I attended was very interesting with a lot of good interaction and discussion.

imageSeveral Microsoft Dynamics CRM MVPs were there to support CRMUG. These included Mitch Milam, Scott Sewell, Joel Lindstrom, Donna Edwards, and yours truly Larry Lentz. In addition to sharing our own knowledge and experience we all learned a lot from our attendance. I know I did.

In addition to the general conference which ran from Tuesday through Thursday, The CRMUG Academy conducted full and half day formal classes on Monday and Friday. I taught the 80141A Integrating Microsoft Dynamics CRM 4.0 with SharePoint. 80003A Workflow in CRM 4.0 was also taught. Additionally I taught a half day Forms Customization class on Friday.

Next year the CRMUG Summit will be held in Las Vegas starting November 7th. See you there!

Cheers,

Larry Lentz



Bulk Activity Management

$
0
0

Activities form a major part of Microsoft Dynamics CRM. Sometimes it becomes necessary to perform operations on many of these activities at once. Microsoft Dynamics CRM 2011 provide ways to manage multiple activities at once. With the new grid view of Dynamics CRM 2011 you just have to select the multiple activities you want to manage together using the checkboxes. You do not have to hold down the control key like in CRM 4.0 for multiple selections. The only bulk operations supported by Microsoft Dynamics CRM 4.0 was Assign to operation.

Bulk Activity Editing

Microsoft Dynamics CRM 4.0 provided Bulk Editing capabilities for various records. Bulk edit was not supported for Activities. With the new Dynamics CRM 2011 bulk edit support has been provided for most activities. Activities that do not allow bulk editing include Recurring Appointments. You cannot bulk edit components of different activity types. This is because each Activity will have its own unique bulk edit form. Also some fields also might be disabled if incompatible for bulk editing.

Let us assume that we want to send letters to 3 personalized emails to 3 different Contacts informing them about the new Dynamics CRM 2011. First we create 3 Emails each of them having different recipients.

clip_image001

Select the three different emails and click on Edit.

clip_image002

An "Edit Multiple Record" form appears. We can now place in the text about how much we like CRM and how awesome it is in the fields we want.

clip_image003

All entries that are left blank indicate that you do not want to update the original entry in the Email. So now if you actually check the individual mails, you can find a personalized mail for each user.

clip_image004

Note that there is no way to blank off any entry using the bulk edit feature.

Other Bulk Management Operations

Bulk operations such as Mark Complete and Cancel require that the activities be of the same type. When either of them is selected there is a pop up window where you can select the status of the activities. So if I have to set the status of three Letters as Sent

clip_image005

Operations such as Set Regarding, Add Note and Add to Queue support activities of different types. Lets assume that we want to perform Set Regarding operation on the three emails and maybe a couple of corresponding appointments to a particular campaign. We can use advanced find to actually find the records we want to perform the bulk operation. Select all of them.

clip_image006

Then select Set Regarding. A lookup dialog box pops up where we can select the appropriate campaign we want.

clip_image007

Note that some of these operations that are not supported for certain activities. So these operations will not act upon these activities in bulk also. For example, Email activity does not support Mark Complete operation.

Cheers,

Girish Rao



Demystifying the Recurring Appointment series expansion in Microsoft Dynamics CRM 2011

$
0
0

Microsoft Dynamics CRM 2011 Beta is out and so is the support for creating and managing recurring appointments within Microsoft CRM.

Now we can create and manage recurring appointment within Microsoft Dynamics CRM 2011 using its familiar Web client user interface and it also allows you to perform full bi-directional synchronization with Microsoft Dynamics CRM Client 2011 for Outlook.

Recurring appointments look and feel is almost similar to Outlook’s Recurring appointments, this was done to ensure that users get familiar interface of Outlook’s recurring appointment but there are two important differentiators as well that I want to highlight here.

1. Outlook Recurring Appointments follow Rule based OnDemand expansion model while in CRM occurrences get created and persisted in Database as individual Appointment records. This expansion based model allows other components of CRM to work independently on individual appointments records.

2. Unlike Outlook, CRM allows us to update recurrence rule of recurring series and still maintain past history of recurring series. On every update of recurrence information, past appointment instances of recurring series are preserved and they can be viewed from a common grouping link in recurring series records.

In this blog post I wanted to share more detail on recurring appointment series expansion logic, as it has some settings that you can configure as per your organization’s business requirements.

Expansion based model works best for business system like CRM very well but it has its own set of challenges, like high storage cost and initial processing cost in series expansion. Series maintenance cost(like update and delete cost) is also high when series definition changes. To address some of these concerns partial expansion based model is followed in CRM, which mitigates performance issues as well as allows an organization to define its own expansion rule as per business needs for long running recurring appointments.

This is how we define partial expansion model -

I. Initial expansion window configurable by business policy.

II. Future expansions done by background expansion service for a configurable time window on incremental basis.

Now let’s take one concrete example to explain how partial expansion based approach works. Assume you have a never ending recurring series definition; in this case partial expansion of a recurring series will work in this way.

I. On recurring appointment series creation, immediately 15 appointment instances would be created (controlled by RecurrenceExpansionSynchCreateMax setting).

II. An Asynchronous “OnDemand” expansion job would be created, which will expand the series for next 12 months time window (controlled by FutureExpansionWindow).

III. There is a weekly “Recurring” series expansion job pre configured into CRM system which will take care of expanding any series for next 7 days into system. This job will keep expanding series regularly and it will ensure that you have access to next 12 month’s worth of instances for any series.

There are a number of organization settings that you can tweak to adjust recurring series expansions as per your organizations need.

a. RecurrenceExpansionSynchCreateMax - Specifies the maximum number of instances to be created synchronously after creating a recurring appointment. CRM default is 15 instances. This setting allows us to control synchronous creation of series instances. Default value 15 allows us to work immediately on created series instances, having a larger value will keep user waiting for series creation operation to complete.

b. FutureExpansionWindow - Specifies the maximum number of months in future for which the recurring activities can be expanded. CRM default is 12 months. After this period series instances will keep on expanding on Weekly basis (like a sliding time window) until series expansion is fully complete as per series end date definition. This setting ensures that at any day you will be able to see instances in CRM calendar for future time window controlled by FutureExpansionWindow.

c. PastExpansionWindow - Specifies the maximum number of months in past for which the recurring activities can be created. CRM default is 3 months. On web client this setting prevents user to specify recurring series start date more than three months in past. Further, this setting allows us to control how many past instances of series we want to synchronize from Outlook side. Generally, most of the time we are interested in present information instead of past information so it will prevent the synchronization of very large number of past instances from Outlook side.

d. RecurrenceExpansionJobBatchSize - Specifies the value for number of instances created in on demand job in one shot. There is no CRM default value for this setting, which means this setting is ignored unless set to some positive integer value. This performance tuning setting allows to tune Asynchronous expansion of recurring series, if there are too many instances that needs to be created because “FutureExpansionWindow” is very large, in such cases this setting will allow automatic pausing of recurring series expansion job to give other Asynchronous jobs an opportunity to complete their work.

e. RecurrenceExpansionJobBatchInterval - Specifies the interval (in seconds) for pausing expansion job. CRM default is zero seconds. If pausing happens because of “RecurrenceExpansionJobBatchSize” setting, then paused series expansion job will sleep for the specific seconds as per this setting. This setting should not be changed unless you want to do expansion related performance tuning yourself.

These settings are not available in System Settings page in CRM, so you’ll want to write a simple SDK program to change them if you want to tap into them.

You can find more detail in SDK documentation on how to work with recurring appointments and it’s interaction with other sub systems in CRM.

Cheers,

Prabhat Pandey

What’s New in Microsoft Dynamics CRM 2011 training

$
0
0

NOW AVAILABLE! What’s New in Microsoft Dynamics CRM 2011 training materials (draft) are available for download on PartnerSource and  Customer Source for partners and customers on a service agreement. These materials explain the new features and functionality found in Microsoft Dynamics CRM 2011 and are intended for Microsoft Dynamics CRM 2011 partners, namely implementation consultants, presales consultants and developers.

After completing this training, individuals will be able to:

· Describe the new application features and enhancements

· Identify enhancements to the user experience

· Examine customization and extension capabilities

· List the installation, upgrade, and hardware requirements

· Show how to manage settings and administration 

If you are a partner and you do not currently have access to Partner Source, send email to voice@microsoft.com to request access.

Cheers,

Todd Merrell



Viewing all 592 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>