Quantcast
Viewing all 592 articles
Browse latest View live

Consistent and repeatable business processes for everyone…and a whole lot more!

Microsoft Dynamics CRM 2011 Beta is here! That means it’s time to start telling the story behind all of the great new features. This week we will focus on how Microsoft Dynamics CRM 2011 helps organizations work more intelligently by helping create and...(read more)Image may be NSFW.
Clik here to view.

Microsoft Dynamics CRM 2011 Client Beta updates available on Microsoft Update

As part of Microsoft Dynamics CRM 2011, the CRM Sustained Engineering (SE) team is releasing updates via Microsoft Update. Over the next few months the SE team will release updates to test the Microsoft Update functionality and deliver critical fixes...(read more)Image may be NSFW.
Clik here to view.

Microsoft Dynamics CRM 2011 Beta SDK Update!

Coinciding with the Windows Dynamics CRM 2011 Beta Service Release that was shipped yesterday, you can now download an update to the CRM 2011 Beta SDK package. This update contains lots of new sample code, new content and some bug fixes. Read the Release...(read more)Image may be NSFW.
Clik here to view.

Microsoft Dynamics CRM 2011 ~ Living in Outlook

Wow, is it release time already? The Microsoft Dynamics CRM 2011 Beta has been released, RTO is approaching, and I am really looking forward to getting these awesome features in front of users. In fact, I can’t wait, which is why I am going to show off...(read more)Image may be NSFW.
Clik here to view.

Microsoft Dynamics CRM 2011 ~ Let’s Get Conditional

It seems like conditional formatting in the Microsoft CRM Outlook Client is almost everyone’s favorite feature. I mean, how could you not love it? Drawing attention to the things you care about makes you want to use CRM because it makes your life easier...(read more)Image may be NSFW.
Clik here to view.

Settings Revenue Quotas/Targets in Multiple Dimensions

Ever wondered about the complexities involved in tracking the progress against sales targets in an organization, which is active in multiple territories, selling wide range of products, working on big accounts… If you are looking for an easy solution...(read more)Image may be NSFW.
Clik here to view.

Microsoft Dynamics CRM with Microsoft SharePoint integration introduction

Now that the Microsoft CRM 2011 Beta is out, so is the much awaited feature of integration with Microsoft SharePoint . Microsoft SharePoint has nailed Document Management and the ability to collaborate on documents is very rich. The versioning control...(read more)Image may be NSFW.
Clik here to view.

Authoring My First CRM Plug-in

Hello readers. Recently I’ve learned that building Microsoft Dynamics CRM is a much different beast from building on top of Microsoft Dynamics CRM. I’ve been on the team for a bit over 3 years, but just built my first plug-in. I’m not ready to tell you...(read more)Image may be NSFW.
Clik here to view.

Tracking Your Data Using Microsoft Dynamics CRM Dashboards

Business users often need to keep a real-time pulse on their customer data . This includes knowing what data changed, when it changed, and whether there are hotspots that need further investigation. With Microsoft Dynamics CRM 2011 Dashboards, putting...(read more)Image may be NSFW.
Clik here to view.

Microsoft Dynamics CRM 2011 ~ Rich CRM Email and Appointments

Ok, let’s be real. When you think about the Microsoft Dynamics CRM Outlook Client, “Track in CRM” is usually the first thing that comes to mind. The reason so many of you use Microsoft Dynamics CRM is because of Microsoft Outlook integration, and when...(read more)Image may be NSFW.
Clik here to view.

Live from Convergence 2010 Europe – Announcing New Microsoft Dynamics CRM Online Promotion

Image may be NSFW.
Clik here to view.
image

Today the Microsoft Dynamics team kicked off Convergence 2010 Europe from Twickenham Stadium in London.  The opening keynote at the event was delivered by Kirill Tatarinov in which he demonstrated the advancements in the new versions of Microsoft Dynamic CRM and ERP products and how they work together to help customers create a Dynamic Business

At the event today we also made some news announcements related to the next version of Microsoft Dynamics CRM Online.  I caught up with Brad Wilson, general manager of Microsoft Dynamics CRM Product Management Group, to tell us the latest happenings with Microsoft Dynamics CRM and the news being announced today. Apologies in advance for the amateur videography, but here you go.  The full press release issued today can be found here.

Live from London

Best,

Bill Patterson



Image may be NSFW.
Clik here to view.

Importing Outlook Contacts into Microsoft CRM Online using Add Contacts Wizard

Today’s guest blogger is CRM MVP Frank Lee  from Workopia. Here he talks about Importing Outlook Contacts.

I often get asked what is the best way to import existing Microsoft Outlook Contacts to Microsoft Dynamics CRM.  If you are using Microsoft CRM Online then one of the best options is to use the built-in “Add Contacts Wizard”.  Here is the link to the How To: Importing Outlook Contacts into Microsoft Dynamics CRM Online using Add Contacts Wizard article written by one of our consultants detailing the steps and our deployment approach.

Also, here are some useful links that I often reference regarding the built-in integration between Microsoft Outlook and Microsoft Dynamics CRM:

Enjoy!

Frank Lee



Image may be NSFW.
Clik here to view.

Getting Started with Custom Reports in the Cloud

The ability to create custom reports has been one of the top asks for Microsoft Dynamics CRM Online. When we set about designing a solution, security, ease of use, and performance were one of our top goals along with portability of reports, so that you can use the same RDL for CRM Online and On-premises deployments. In addition, we wanted to have the best authoring environment for Custom Reports. In Microsoft Dynamics CRM 2011, we have introduced Fetch-based custom reports that can run in CRM Online as well as On-premise, are secure, have great performance, and leverage the best WYSIWYG environment for authoring.

You will now be able to add company logos to the report, perform conditional formatting to highlight issues, control the format of the report to name a few. Business Intelligence Development Studio (BIDS) by Microsoft SQL Server is the best and most powerful authoring environment for authoring SQL Server Reports. By enabling authoring of CRM Fetch-based reports in BIDS, we tried to address all your concerns. We only ask you to stick to CRM’s Fetch XML to query data out of CRM.

Fetch XML based Custom Reports

Custom reports in Microsoft Dynamics CRM 2011 are your regular RDLs with Fetch XML as the data query language. These are identified by MSCRMFETCH in the DataProvider section in the RDL.

<DataSources>

   <DataSource Name="DataSource1">

      <ConnectionProperties>

         <DataProvider>MSCRMFETCH</DataProvider>

         <ConnectString>http://localhost;AdventureWorksCycle</ConnectString>

         </ConnectionProperties>

      <rd:SecurityType>DataBase</rd:SecurityType>

      <rd:DataSourceID>fd45ed8a-xxxx-xxxx-xxxx-deeeaf87dd31</rd:DataSourceID>

   </DataSource>

</DataSources>

Along with the Fetch XML in the CommandText, the below query gets the opportunity details:

<DataSets>

   <DataSet Name="DataSet1">

      <Query>

         <DataSourceName>DataSource1</DataSourceName>

         <CommandText>&lt;fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"&gt;

   &lt;entity name="opportunity"&gt;

   &lt;attribute name="name" /&gt;

   &lt;attribute name="customerid" /&gt;

   &lt;attribute name="estimatedvalue" /&gt;

   &lt;attribute name="statuscode" /&gt;

   &lt;attribute name="opportunityid" /&gt;

   &lt;order attribute="name" descending="false" /&gt;

   &lt;/entity&gt;

   &lt;/fetch&gt;</CommandText>

         <rd:UseGenericDesigner>true</rd:UseGenericDesigner>

      </Query>

      <Fields>

         <!-- Omitted RDL -->

      </Fields>

   </DataSet>

</DataSets>

The rest of the RDL is same as any other SQL report which means you can leverage full capabilities of Microsoft SQL Server Reporting Services to render your CRM data as a scorecard, Sales Funnel or Bing Map. We will look at an example later in the post.

Execution of Fetch-Based Custom Reports

To be able to run these Fetch-based reports, we have a runtime component , custom data processing extension (DPE) that resides on and is invoked by the SQL Server Reporting Services (SSRS) on encountering MSCRMFETCH in the DataProvider attribute (as mentioned above). SSRS passes the command text to the DPE to execute. DPE executes the query in the context of the user performing the action and provides the data back. This is then formatted as per the RDL by SSRS before being presented to the user.

Authoring of Fetch-Based Custom Reports

To enable WYSIWYG authoring in BIDS, we have written a custom plugin for Business Intelligence Development Studio that allows users to specify the Fetch XML query and provide the metadata for authoring. It also enables live preview right in the BIDS environment without having to upload the report to CRM. Once you are happy with the report, you can upload it to CRM as an RDL (with embedded Fetch). You only need BIDS and Report Authoring Extension to be installed.

Download Now

The runtime component that resides in SSRS is known as Microsoft Dynamics CRM 2011 Reporting Extensions (English Beta bits available here as part of CRM Server). The authoring component, a plug-in for BIDS, is known as Microsoft Dynamics CRM 2011 Fetch Authoring Extension (English Beta bits available here). Please note: BIDS being a 32-bit environment, the Fetch Authoring Extension is also available in 32-bit only. For purposes of Beta, the Fetch Authoring Extension is known as Fetch Extension.

Other Enhancements

In addition to enabling Fetch-based reports, we have made reports Solutions aware. That is, reports can now be packaged into a Solution and deployed effortlessly to several organizations. A Report Wizard-generated report can be transported via solutions to different orgs and can still be edited via Report Wizard.

The Report Wizard now generates Fetch XML based reports. You can now download these report RDLs to act as a starting point for your Fetch-based Reports.

The Microsoft Dynamics CRM 2011 Reporting Extensions now installs both Fetch data processing extension and SQL data processing extension (aka srs dataconnector) on SSRS. Both the data processing extensions are a mandatory install.

For On-premises deployments, the SQL-based reports will continue to be supported along with scheduled reports and delivery mechanisms like email.

There are two ways of writing a custom Fetch-based Report; we will look at both of them here.

Authoring a Fetch-based Report

Customize a Report Wizard report

If CRM Report Wizard satisfies your reporting needs, but you need to change some formatting, like adding a company logo or perform conditional formatting, you can follow these steps:

1. Create a report in Microsoft Dynamics CRM using the Report Wizard for Opportunities that shows Key fields like Topic, Potential Customer, Estimated Revenue, Estimated Close Data, Probability etc (refer this CRM 4 help topic for more help).

2. While still in the Report Wizard,

    a. Click ‘Run Report’ on the Action toolbar to verify the contents.

    b. On the Actions toolbar, click ‘Download Report’, and save the RDL to your machine.

3. Install Microsoft Dynamics CRM 2011 Fetch Authoring Extension, if needed.

4. Launch Business Intelligence Development Studio.

5. Create a new Report Server Project.

Image may be NSFW.
Clik here to view.
image

6. In Solution Explorer, right-click the Reports folder, click ‘Add’, and then click ‘Add Existing Item’.

Image may be NSFW.
Clik here to view.
image

7. Select the RDL that you downloaded in Step 2.b.

8. Double-click the RDL in Solution Explorer and navigate to ‘Report Data’ window on left

9. Expand the ‘Data Sources’ node and right-click the CRM node.

Image may be NSFW.
Clik here to view.
image

10. Click ‘Data Source Properties’.

11. In the Data Source Properties dialog, click ‘Credentials’.

12. Select ‘Use this user name and password’, and specify your CRM User name and password. Click ‘OK’.

(For Online customers, the user name would be of format ‘example@hotmail.com’. For On-premises customer, the user name would be of format ‘domain\LoginId’)

Note: On-premises users may skip this step if CRM is installed in same domain as ‘Use Windows Authentication’ is selected by default.

Image may be NSFW.
Clik here to view.
image

13. Now, navigate to the ‘Preview’ tab. If your credentials are correct, you should see the report preview similar to the one shown below:

Note: If you do not have any data in CRM, You can always enable Sample Data by going to Settings…Data Management…Sample Data and Selecting ‘Install Sample Data’. It takes a few minutes to populate the sample data in the CRM system. You can remove the Sample Data by same route.

Image may be NSFW.
Clik here to view.
image

Now, let’s add a company logo and some conditional formatting to the report.

14. To add a company logo, click the ‘Toolbox’ tab, and click ‘Image’.

Image may be NSFW.
Clik here to view.
image

15. Click on the Report where you would like to add the Image.

16. In the Image dialog, click Import to select the company logo (image can be JPG, BMP, PNG, GIF).

Image may be NSFW.
Clik here to view.
image

17. Click Ok. Adjust the image size by dragging the side bands.

Image may be NSFW.
Clik here to view.
image

18. Let’s say, you want to highlight all opportunities having probability > 80%. To do that, select the row in the Design Mode (click the Design tab).

Image may be NSFW.
Clik here to view.
image

19. Press F4 to view the row properties. ( via Menu ‘View’…’Properties Window’)

This should open the properties window (usually in the lower-right corner of Visual Studio).

20. Find the BackgroundColor property, click the down arrow, and click ‘Expression’.

Image may be NSFW.
Clik here to view.
image

21. Type the following in expression

=IIF(Fields!closeprobability.Value > 80 ,"Green","Transparent")

Image may be NSFW.
Clik here to view.
image

22. Click OK.

23. To see the report preview, click the Preview tab. Depending on your data, your will see opportunities with probability > 80 in a green background color.

Image may be NSFW.
Clik here to view.
image

24. Save your project.

25. Now upload the RDL to CRM. Select the RDL in Solution Explorer, and from the Properties window, copy the ‘Full Path’.

Image may be NSFW.
Clik here to view.
image

26. Navigate to CRM. Select the report you had created in Step 1, and click ‘Edit’ on the Ribbon menu.

27. In the Report Wizard, change Report Type to ‘Existing File’, and then click ‘Browse’.

28. In the File dialog, paste the full path (copied in step 25), and click ‘Open’.

29. In the Report Wizard, on the Action toolbar, click ‘Save’ to upload the new RDL.

CRM will confirm the action as shown below (you can also upload the report as a new report, if needed)

Image may be NSFW.
Clik here to view.
image

30. Click Ok.

31. Now, let’s run the report by clicking ‘Run Report’. You should see the newly added Logo as well as the conditional formatting.

Image may be NSFW.
Clik here to view.
image

The report is now available for use.

Create custom Fetch-based reports

The steps in the earlier section demonstrated how you can take a Report Wizard report, enhance it in Business Intelligence Development Studio, and upload it back to CRM. What if you wanted to create a report from scratch in BIDS?

The initial steps vary a little. Let’s use the same example.

First you need a Fetch XML query that will retrieve the data for the report.

1. Navigate to CRM Advanced Find, and specify a query.

Image may be NSFW.
Clik here to view.
image

2. You can pick the individual columns by selecting ‘Edit Columns’

3. After you are satisfied with your query, click ‘Download Fetch XML’.

4. Save the Fetch XML to your local drive.

5. Install Microsoft Dynamics CRM 2011 Fetch Extension, if needed.

6. Launch Business Intelligence Development Studio.

7. Create a new Report Server Project.

Image may be NSFW.
Clik here to view.
image

8. In Solution Explorer, right-click Reports folder, and click ‘Add New Report’.

Image may be NSFW.
Clik here to view.
image

The Report Wizard will launch.

9. Click Next on the first page.

10. In the ‘Select the Data Source’ page, specify a name for the data source, select ‘Microsoft Dynamics CRM Fetch’ as Type, and type in the connection string.

Connection String should be in the following format:

CRM Server URL;[Org Unique Name];[Home Realm URL]

Only the CRM Server URL is mandatory. If Org Name is not specified and the user belongs to multiple orgs, then the first org returned by CRM is used. For most users, you will not need to worry about Home Realm. Home Realm URL is the Identity Provider used by your organization and is needed when your organization uses Federation for identity management. Contact your network administrator to know the URL.

For CRM Online, You will need to specify your Live ID. And, if you belong to more than one org, you will need to specify your Org Name.

Image may be NSFW.
Clik here to view.
image

11. Next, click ‘Credentials’, and select ‘Use a specific user name and password’.

Image may be NSFW.
Clik here to view.
image

12. Click OK. Click Next.

13. In the ‘Design the Query’ dialog, paste the contents of Fetch XML query you had saved in Step 4.

(Optionally, you can see the results of query by going to Query Builder, and clicking ‘Run’)

Image may be NSFW.
Clik here to view.
image

14. Click Next.

15. On the Select Report Type page, with tabular choice selected, click Next.

16. On the Design Table page, select the fields to show in the details.

Note: Attributes in Microsoft Dynamics CRM appear more than once in results. attributeName is formatted value and attributeNameValue is the value of the fields. For e.g estimatedvalue will be $10,000.00 and estimatedvalueValue will be numeric 10000.0000

17. Click ‘Finish >>|’.

18. Give a name to the report, and click Finish.

19. Click the Preview tab to view the report.

Image may be NSFW.
Clik here to view.
image

You can format the report before uploading it to CRM. The steps remain the same as explained in earlier example.

We just saw how easy it is to create a Fetch-based report via the Report Wizard or a new custom report using BIDS. You can also leverage native capabilities offered by BIDS to render scorecards, maps, sales funnels etc.

Note: In case you are experiencing issues with Microsoft Dynamics CRM 2011 Beta, please leverage the Beta Forums.

Please let us know, in comments, what topics you would like to see about Reporting in the future blogs.

Cheers,

Abhijit Gore



Image may be NSFW.
Clik here to view.

Microsoft Dynamics CRM Dashboards for Techies

In the previous blog post we showed how a sales manager, Kevin, can use the charts and dashboards features to derive quick insights from his Microsoft Dynamics CRM data. In this blog we show how we can take such analyses to the next level by using the customization capabilities in Microsoft Dynamics CRM 2011.

Step 1- Understanding when to customize charts and dashboards

Earlier we showed how Kevin can use the chart and dashboard designer to create a quick dashboard that provides insights about Accounts, Contacts, Leads, Opportunities, Orders and Invoices. All the charts we created in that blog had just one level of grouping. This suffices for simple analysis. However, there is a lot more that charts can do! Imagine an account chart that not only shows when the account was modified but also what the current status of the account is, and allows for more control over the presentation properties of the chart.

Additionally the charts that we created earlier were rendered on the dashboard and thus showed aggregate information from all the records contained in their respective views. However, in some cases account managers need to access this information in the context of a specific account.

In this blog we show how such complex charts can be customized, and embedded in forms.

Step 2- Decide which views, charts, forms and dashboards need customization.

Let’s discuss two broad categories of customizations that we will illustrate in this blog. First are charts that group records by 2 criteria – date of modification and current status. Second are charts that customize the account form to show it in the context of a specific account. (Note that any form in CRM can be customized to show charts)

The following table summarizes the information that Kevin would like to track using the dashboard:

 Image may be NSFW.
Clik here to view.
image

Step 3- Create the solution and its components

Note: The chart customizations that we illustrate in this blog can be done on either system or user charts. However forms can be customized only by administrators/customizers.

If the customizations need to be shared with all users in an organization, it is a good idea to create these as part of a solution package and publish the solution. This way the solution can also be reused across different CRM organizations.

Creating a solution in Microsoft Dynamics CRM 2011 is quite easy; I created a solution called CRMTrackingDashboard for the purpose of this blog. To begin with we need to add the entities we need into the solution using “Add Existing” feature in the Solutions.

Step 4- Create the views needed to solve your problem

We need to create a new view for each of the components described above. Creating these new views is straightforward. I have created a new view for each of these entities with a filtering criteria that says “Modified On Equals This Month”. All these views were created as part of the CRMTrackingDashboard solution.

Step 5 – Create the Charts needed to solve the problem

Customizing charts to include additional grouping criteria and presentation properties requires XML definitions for these charts. To make the creation and editing of these charts a little easier,, one can always create a basic chart definition using the chart designer, export it to XML, hand edit the additional changes, and import the definition back in.

We will use the charts designer as a starting point for creating a first draft of the account chart definition. To create the above chart for the Accounts entity –

1. Go to Accounts entity in the solution explore

2. Go to the Charts Node

3. Click on New Chart

4. Create a chart by giving grouping criteria as the “Modified on”, and set the date-grouping to day. Set the name of this chart as “Daily Account Status”

5. Export this chart definition using the “Export Chart” feature in Actions menu.

We are now ready to hand edit this charts definition and add the additional grouping criteria.

Since our second grouping criteria is the Status field, we need to add this into the “datadescription” part of the chart definition. The exact criteria that we need to add is –

<attribute groupby="true" alias="groupby_status" name="statecode" />

Having added this into the existing chart definition, the updated chart’s data description looks like the following:

  <datadescription>
    <datadefinition>
      <fetchcollection>
        <fetch mapping="logical" aggregate="true">
          <entity name="account">
            <attribute alias="aggregate_column" name="name" aggregate="count" />
            <attribute groupby="true" alias="groupby_column" name="modifiedon" dategrouping="day" />
            <attribute groupby="true" alias="groupby_status" name="statecode" />
          </entity>
        </fetch>
      </fetchcollection>
      <categorycollection>
        <category>
          <measurecollection>
            <measure alias="aggregate_column" />
          </measurecollection>
        </category>
      </categorycollection>
    </datadefinition>
  </datadescription>

We also need to tweak the presentation a little so that we can specify the exact presentation properties that we would like to use. Here is the presentation description that we would like to use:

<presentationdescription>
    <Chart Palette="None" PaletteCustomColors="97,142,206; 209,98,96; 168,203,104; 142,116,178; 93,186,215; 255,155,83; 148,172,215; 217,148,147; 189,213,151; 173,158,196; 145,201,221; 255,180,138">
      <Series>
        <Series ChartType="StackedColumn" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59">
          <SmartLabelStyle Enabled="True" />
        </Series>
      </Series>
      <ChartAreas>
        <ChartArea BorderColor="White" BorderDashStyle="Solid">
          <AxisY TitleForeColor="59, 59, 59" TitleFont="{0}, 10.5px" LineColor="165, 172, 181">
            <MajorGrid LineColor="239, 242, 246" />
            <MajorTickMark LineColor="165, 172, 181" />
            <LabelStyle Font="{0}, 10.5px" ForeColor="59, 59, 59" />
          </AxisY>
          <AxisX TitleForeColor="59, 59, 59" TitleFont="{0}, 10.5px" LineColor="165, 172, 181">
            <MajorGrid Enabled="False" />
            <MajorTickMark Enabled="False" />
            <LabelStyle Font="{0}, 10.5px" ForeColor="59, 59, 59" />
          </AxisX>
        </ChartArea>
      </ChartAreas>
      <Legends>
        <Legend Alignment="Center" LegendStyle="Table" Docking="Bottom" Font="{0}, 11px" ShadowColor="0, 0, 0, 0" ForeColor="59,59,59"></Legend>
      </Legends>
      <Titles>
        <Title Alignment="TopLeft" DockingOffset="-3" Font="{0}, 13px" ForeColor="59, 59, 59"></Title>
      </Titles>
    </Chart>
  </presentationdescription>

The hand edited chart definition can be imported back into CRM using the Actions->Import Chart feature

Step 6- Create your dashboard

Now that our views and charts have been created we are now ready to add a dashboard into the solution. Here are the steps –

1. Go to the dashboard node within solutions

2. Click on create new dashboard

The steps for creating a system dashboard are same as the steps for creating a user dashboard, which was described in our previous blog. Hence we will not repeat it here. However note that the customizer can designate one dashboard in the solution as a system default dashboard. The system default dashboard applies to all users in the org. The system default dashboard settings, can be overridden by the user default dashboard settings for each user.

Dashboard Screenshot

Image may be NSFW.
Clik here to view.
clip_image002

Step 7- Customize the Accounts form

WE mentioned earlier that we would also like to show information in the context of an account. In order to do this –

1. Navigate to the Account node in solutions

2. Open the account form using the form editor

3. Insert charts on account – to insert the Orders on the account follow the steps below

    a. Click on the sub-grid icon in the form editor ribbon

    b. Choose entity as Orders

    c. Select “Show Related Records”

    d. Select the view “Orders Modified This Week”

    e. Click on the show chart only checkbox

4. Repeat Step 3 for adding other charts on the dashboard such

Here is the screenshot of the Account form showing charts for Contacts, Opportunities, Quotes, and Orders in the context of that account:

Image may be NSFW.
Clik here to view.
clip_image004

Conclusion

It is evident from the above steps that the charts and dashboards features in Microsoft Dynamics CRM 2011 are easy to use and powerful at the same time. While Dashboards can be created by business end users in Microsoft Dynamics CRM 2011, there is also room for developers to enhance these dashboards so they meet a wider range of business needs. We hope the steps outlined above will help your organization make good use of these features. We will have more blogs in the future to showcase further analytics related capabilities.

Cheers,

Siddhartha Rai



Image may be NSFW.
Clik here to view.

Windows Azure Web Role Hosted Service + Microsoft Dynamics CRM Online Impersonation

We have had a lot of demand for some direction on how to impersonate a Microsoft Dynamics CRM Online user from a Windows Azure hosted service (Web Role). I have completed a walkthrough that will guide you through this process using the default Cloud Web Role project in VS 2008/2010.

Image may be NSFW.
Clik here to view.
image

This walkthrough uses Windows Identity Foundation instead of RPS due to some limitations I had with RPS. You can find the documentation and sample code on http://code.msdn.microsoft.com/crmonlineforazure

Thanks,

Clint Warriner



Image may be NSFW.
Clik here to view.

Bing Maps and Microsoft Dynamics CRM Online

Microsoft Dynamics CRM 2011 has been improved to make you more productive by giving you different visualizations of your data, such as the Dashboards feature. Another such visualization that has generated a lot of interest is Bing Maps integration. For example, if you wanted to show a graphical representation of each of your contact’s current location on a map such as the one pictured here:

Image may be NSFW.
Clik here to view.
clip_image001

The solution consists of an HTML web resource, which queries CRM for contacts and renders a Bing Map with their location, displayed in a Dashboard.

Preliminary Steps

1. Create a new solution (or open an existing one) to transport the Web Resource and Dashboard.

2. Create a new *.html file and open it in your favorite IDE (I used Visual Studio). I am going to start with the following template to give the example a jump start. It includes references to the required libraries: Virtual Earth (same as Bing Maps), jQuery, and the Global Client context. The map will be rendered in the “div” element with id = “map” and will cover the whole page (notice the adjusted margins and the 100% width/height for the element). I have also included some generic parsing functions that will make parsing the URL parameters much easier.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title>Bing Map</title>
    <script type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>
    <script type="text/javascript" src="https://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="ClientGlobalContext.js.aspx"></script>
    <script type="text/javascript">
        //Code will go here
    </script>
</head>
<body style="margin: 0 0 0 0">
    <div id="map" style="width: 100%; height: 100%;" />
</body>
</html>
<script type="text/javascript">
    var map = new VEMap("map");
    map.LoadMap();

    //Region: Generic Parsing Functions for URL Parameters
function getParameters(values, unescapeValues) {

        //Taken from samples in the CRM SDK
        var parameters = new Array();
        var vals = ('?' == values.charAt(0) ? values.substr(1) : values).split("&");
        for (var i in vals) {
            vals[i] = vals[i].replace(/\+/g, " ").split("=");
            if (unescapeValues) {
                parameters[unescape(vals[i][0])] = unescape(vals[i][1]);
            }
            else {
                parameters[vals[i][0]] = vals[i][1];
            }
        }

        return parameters;
    }
    //EndRegion

    //Code will go here
</script>

Querying the Server

Defining the loadAddresses function

In order to get data from the server, this example uses the OData (a RESTful endpoint introduced in CRM 2011) to retrieve the data in a JSON format.

function loadAddresses(entityName, idAttribute, nameAttributes, addressAttributes, descriptionAttributes) {

This function can be called to populate the map with pushpins. The idAttribute is a string field indicating the field on the entity that defines the ID, while the nameAttributes, addressAttributes, and descriptionAttributes parameters are Arrays that indicate the list of entities that define the address that needs to be located on the Map and the name/description that should be displayed for the pushpin.

Defining the Query URL

Since the OData endpoint is RESTful, it is queried using URL parameters. The query selects all of the attributes and retrieves all of the attributes that are needed to render the pushpins.

var serverUrl = GetGlobalContext().getServerUrl();

var requestUrl = serverUrl + "/XRMServices/2011/OrganizationData.svc/" + entityName + "Set?$select=" +

nameAttributes.join(",") + "," + addressAttributes.join(",");

if ("string" == typeof(idAttribute) && 0 != idAttribute.length) {

requestUrl += "," + idAttribute;

}

else {

idAttribute = "";

}

if (null != descriptionAttributes && typeof(descriptionAttributes) == "object" && typeof(descriptionAttributes.length) == "number") {

requestUrl += "," + descriptionAttributes.join(",");

}

Querying the Server

Next the request needs to be submitted to the server and added to the map:

$.ajax(

{

type: "GET",

url: requestUrl,

contentType: "application/json; charset=utf-8",

dataType: "json",

error: function (request, textStatus, errorThrown) {

   alert("Error occurred: " + request.responseXML);

   return;

},

success: function (data) {

   var results = data.d["results"];

   var addressList = new Array();

   for (resultKey in results) {

       addressList.push(results[resultKey]);

   }

addPushpins(new Array(), addressList);

}

});

Since this request will be made asynchronously, we have to provide callbacks that jQuery will call in the case of an error or success. To keeps things simple, the error callback simply displays an alert. The success callback, meanwhile, loops through each of the entities that is returned and adds them to an array, which is then passed in to a addPushpins method that still needs to be defined.

Processing the Query Results

The addPushpins method will have the following execution flow:

  1. Remove the first item from the address list
  2. Submit a call to Bing Maps asynchronously
  3. Create a pushpin object and add it to a list of pushpins
  4. Call addPushpins for the next address

Once all of the pushpins have been generated, the pushpins should be added to the Bing Map.

function addPushpins(pushpins, addresses) {

    function convertToString(entity, attributes) {
        var attributeValues = Array();
        for (var i = 0; i < attributes.length; i++) {
            var value = entity[attributes[i]];
            if ("undefined" != typeof (value)) {
                if ("string" != typeof (value) || 0 != value.length) {
                    attributeValues.push(value);
                }
            }
        }

        return attributeValues.join(" ").trim();
    }

    if (addresses.length > 0) {
        var item = addresses.pop();

        var title = convertToString(item, nameAttributes);
        var address = convertToString(item, addressAttributes);
        var description = convertToString(item, descriptionAttributes);

        var moreInfoUrl = null;
        if (0 != idAttribute.length) {

            var id = item[idAttribute];
            moreInfoUrl = serverUrl + "/main.aspx?etn=" + entityName.toLowerCase() + "&id=%7b" + id + "%7d&pagetype=entityrecord";
        }
        
//This can also be done using a $filter parameter against the OData endpoint
        if (0 == address.length) {

            //If the address is blank, skip this one. Do this asynchronously so that there
            //is not the risk of a stack overflow.
            setTimeout(function() { addPushpins(pushpins, addresses) }, 0);
            return;
        }

        map.Find(null, address, null, null, 0, 1, false, false, false, false,
        function (shapeLayer, results, places, moreResults, error) {
            var place = places[0];
            var newShape = new VEShape(VEShapeType.Pushpin, place.LatLong);
            newShape.SetTitle(title);
            newShape.SetDescription(description);
            if (null != moreInfoUrl) {
                newShape.SetMoreInfoURL(moreInfoUrl);
            }

            pushpins.push(newShape);

            addPushpins(pushpins, addresses);
        });
    }
    else {
        var shapeLayer = new VEShapeLayer();
        map.AddShapeLayer(shapeLayer);
        shapeLayer.AddShape(pushpins);
    }

In addition to rendering a title, address, and description, it will also generate a More Info URL that will link the user to the page for that specific entity. Once all of the pushpins are generated, the pushpins are added as shapes to the Bing Map.

Finishing the Web Resource

Now, we just have to add a call to the loadAddresses function and the Map will be rendered.

var parameters = getParameters(location.search, true);
if ("undefined" != typeof (parameters["data"])) {
    parameters = getParameters(parameters["data"], false);
}
var entityName = parameters["entity"];
var idAttribute = parameters["id"];
var nameAttributes = ("undefined" == typeof (parameters["name"]) ? Array() : parameters["name"].split(","));
var addressAttributes = ("undefined" == typeof (parameters["address"]) ? Array() : parameters["address"].split(","));
var descriptionAttributes = ("undefined" == typeof (parameters["description"]) ? Array() : parameters["description"].split(","));
if (0 == descriptionAttributes.length) {
    descriptionAttributes = addressAttributes;
}

This retrieves all of the URL parameters, parses them, and then calls the loadAddresses function.

Create the Dashboard

Now that the HTML has been defined, open the Solution Explorer for the new Solution and create a new Web Resource with Type of Web Page (HTML) – be sure to use the “Browse” button instead of the Text Editor to ensure that your HTML does not get changed. Don’t forget to publish the web resource. One thing to keep in mind about Web Resources: if you use a “/” in your web resource name (to simulate folder structure, such as “scripts/new_MyWebResource”, you will need to change the referenced path for the ClientGlobalContext.js.aspx to “../ClientGlobalContext.js.aspx”).

In the Solution Explorer, create the new Dashboard and insert the Web Resource. The Web Resource needs to include the Custom Parameter in order for the script to know which entity and attributes to use. The following example uses the Contact entity and address attributes:

entity=Contact&id=ContactId&name=FullName&address=Address1_Line1,Address1

_Line2,Address1_Line3,Address1_City,Address1_StateOrProvince

,Address1_PostalCode,Address1_Country&description=Description

Image may be NSFW.
Clik here to view.
clip_image002

Now refresh the main page of the Web Client and navigate to the Dashboard.

Final Notes

The Web Resource that was developed can be still be improved (more error checking, retrieving less data from the server, etc), but the code shows how JavaScript can be used to integrate with Bing Maps.

Cheers,

Michael Scott



Image may be NSFW.
Clik here to view.

How To: Creating Custom Report with Microsoft Dynamics CRM 2011 BIDS Fetch Extension

Today’s guest blogger is CRM MVP Frank Lee  from Workopia who provides us his insights about another way to create custom reports.

The Microsoft Dynamics CRM 2011 architecture enables report developers to create and customize reports even more than before. Prior to this release, reporting was usually created by using the report wizard within the CRM application. It was not as customizable or flexible as the new version. Here are the steps to create a custom report with Microsoft Dynamics CRM 2011 via the Microsoft SQL Server Business Intelligence Development Studio (BIDS) Fetch Extension:

Requirements:

  • Microsoft SQL Server 2008 or 2008 R2 Business Intelligence Development Studio (BIDS) installed
  • Microsoft Dynamics CRM 2011 BIDS Fetch Extension installed
  • Microsoft Dynamics CRM 2011 Online account

Part A – Setup a Microsoft CRM 2011 FetchXML Custom Report development environment

  1. Setup a Windows 7 32 bit or 64 bit PC ~ Other supported OS: Vista, Windows Server 2008 or Windows Server 2008 R2
  2. Install the Microsoft SQL Server 2008 or 2008 R2 Business Intelligence Development Studio (BIDS) feature

Image may be NSFW.
Clik here to view.
image

  1. Install the Microsoft Dynamics CRM 2011 Fetch Extension and run the “CRM2011-BIDSExtensions-ENU-i386.exe” installation program.

Image may be NSFW.
Clik here to view.
image

Part B – Create a Microsoft CRM 2011 FetchXML Report

  1. To start creating the report, you need to open the Microsoft SQL Server Business Intelligence Development Studio (BIDS):

Image may be NSFW.
Clik here to view.
image

  1. Create a new project and select the Report Server Project from templates; be sure to include a name and the location to store the project:

Image may be NSFW.
Clik here to view.
image

  1. You should have a Reports folder within your project; right click and Add New Report, this should start the Report Wizard:

Image may be NSFW.
Clik here to view.
image

  1. Click next until you see the page with the Data Source options. You need to select a new datasource (do not save or make as a shared) – this is important because you want the datasource information local within the file you upload to CRM. Referring to a saved data source will not work because the information will not be available when uploaded to the CRM server
  1. Select Microsoft Dynamics CRM Fetch for type and fill in the connection string in the following format: ServerURL;OrganizationName;HomeRealmURL
    1. only ServerURL is required, this would be the url to your CRM server like: https://someserver.crm.dynamics.com
    1. The optional OrganizationName should also be included if you have multiple CRM environments, it will use the first organization otherwise – you will find this value within the Developer Resources area in the CRM client located within Settings > Customizations (refer to the red mark).

                               Image may be NSFW.
Clik here to view.
image

    1. The HomeRealmURL, also optional, it will be a registry value from HKLM\SOFTWARE\Microsoft\MSCRMBidsExtensions\HomeRealmUrl
  1. Next you need to enter in the credentials for you connection, it should be your Windows LiveID (WLID) – usually the email that you use to sign-in the CRM Online along with its password. Click Credentials to fill in this information and afterwards you can click next
  1. If successful, you will move onto the next page where it will ask for a FetchXML type query. Since this is a report, a query is important to obtain the information you want in the report
    1. One way to obtain a FetchXML query is to start by using the CRM Online web client and creating an Advanced Find query.

                            Image may be NSFW.
Clik here to view.
image

    1. A query usually involves asking for the columns of data you want to retrieve also, make sure you click Edit Columns so that you can select the data you want to see in your report
    1. Lastly, click Download Fetch XML and you should be able to view the xml file with the supplied query. I usually just open it with a browser and then view Page Source to copy the text:

                         Image may be NSFW.
Clik here to view.
image

  1. Up to this step, most of the work has been done and the remaining steps of the wizard will guide you through and offer ways to customize the layout and appearance of your report
  1. Once you have finished using the wizard, I suggest previewing (Preview tab) the report before uploading – this will connect directly to CRM and give you the actual report. One advantage about creating a report this way is you can edit the report within Visual Studio (Design tab) and modify or add items to the report to make it more presentable:

                 Image may be NSFW.
Clik here to view.
image

  1. The report should be an .RDL file that gets created; this file will need to be uploaded into the CRM environment
    1. Open the web client and navigate to Reports, normally found in the Workplace section. Once there, create a new report by clicking New at the top left
    1. Select Existing File as the Report Type, the File Location should now be enabled:

                           Image may be NSFW.
Clik here to view.
image

    1. Browse to that .RDL file that was created by the project and upload it
  1. You have now completed your report and uploaded it to the CRM system, you can click Save and test it out by opening the report

Cheers,

Frank Lee



Image may be NSFW.
Clik here to view.

Sales Process Workflow that allows skipping stages

Please see the blog article Microsoft Dynamics CRM Sales Process for an introduction to sales process workflow in CRM.

In this article, I will present an approach which can be used to move the workflow from one stage to another (forward only) using a custom attribute and a series or Wait and Parallel Wait steps.

The Parallel Wait Step

The condition and parallel wait steps in the Microsoft Dynamics CRM Workflow designer may be used to implement business logic that needs to respond to various changes in the system. For example, we can create a multi-stage workflow where certain steps can be skipped based on user input. This article uses Microsoft Dynamics CRM v.4, but it is applicable for Microsoft Dynamics CRM 2011 as well.

A ‘Wait’ step in a CRM Workflow enables the workflow author to define a step that needs to wait for some user action to take place before the workflow can proceed. For example, a task that needs to be completed. The parallel wait step lets the author specify an alternate condition that would require the workflow to be canceled – for example an opportunity is ‘lost’ before all the steps in the workflow complete.

Custom field for controlling the workflow

Let’s use the salesstagecode field (displayed in the UI as “Process Code”) to create a workflow that supports skipping stages based on the value of the field. If your system uses this field for something else, you can create a custom picklist for this purpose. I have customized the field with three additional values, Stage A, Stage B and Stage C:

Image may be NSFW.
Clik here to view.
image

Workflow definition

There are three parts in each stage of the workflow that controls which stages are processed:

1.  A condition step that checks for ‘Process Code’ value before attempting any step within a stage

2.  A Wait step followed by an update step that changes the ‘Process Code’ value to the next step

3.  One or more Parallel Wait (Otherwise) steps that controls what happens if the opportunity record is updated by users while the workflow is waiting

Image may be NSFW.
Clik here to view.
image

Verifying the workflow

Each stage in the workflow checks for the value of the attribute before executing the steps within. At the end of the stage, an update step is used to update the stage to the next stage value.

Now let’s create two opportunity instances. The first one would set the Process Code to Stage A (or Default), second one sets the process code to Stage B.

Image may be NSFW.
Clik here to view.
image

For the second workflow to start in Stage B, we will set “Process Code” of the opportunity record to “Stage B”

Image may be NSFW.
Clik here to view.
image

For the first opportunity record, you can see that the workflow executes ‘Stage A’ steps.

Skip the current stage

Now go to the opportunity record and change Process Code to Stage B. The workflow will proceed to Stage B

Image may be NSFW.
Clik here to view.
image

Skip a stage at the beginning of the workflow

For the second opportunity record, the workflow skips past the steps in ‘Stage A’ except for condition steps and starts executing at ‘Stage B’

Image may be NSFW.
Clik here to view.
image

Ensure the workflow instance is completed if opportunity is closed

If you update the opportunity record with ProcessCode=Stage C. The workflow will skip remaining steps in Stage B and proceed to Stage C.

Image may be NSFW.
Clik here to view.
image

Final notes

If you have many workflow instances in ‘Waiting’ status, it will eventually lead to performance issues. You can add a Parallel Wait step that waits for a period of time to ensure that workflows don’t wait forever.

If you have completed workflow instances that are no longer needed, you may want to delete them using the CRM application or using Bulk Delete.

In Microsoft Dynamics CRM 2011 you can mark a workflow definition so that workflow instances will be deleted once the workflow completes. To access this flag, click on the ‘Administration’ tab. The checkbox is at the bottom of the dialog titled “Automatically delete completed workflow jobs (to save disk space)”.

Cheers,

Mahesh Vijayaraghavan



Image may be NSFW.
Clik here to view.

Highlights: CRM 2011 Feature of the Week

Image may be NSFW.
Clik here to view.
image
CRM MVP Aaron Elder, CTO at Avanade contributes a list of highlighted features for the Microsoft Dynamics CRM 2011 release.

I have been releasing a quick highlight of one new CRM 2011 feature every week.  Here is what has been released so far:

10/21/2010 – Workflow Improvements

9/20/2010 – Sample Data

9/13/2010 – Auditing

9/6/2010 – Deployment Manager Improvements

8/30/2010 – Connections

8/23/2010 – Privilege & Roles Improvements

8/9/2010 – Team Improvements

And there are much more to come.  The goal is to release a different feature each week until CRM 2011 RTMs.  The feature of the week feed is here:

http://www.avanadeblog.com/xrm/crm-2011-feature-of-the-week/

Cheers,

Aaron Elder

Image may be NSFW.
Clik here to view.

Shortcuts Rock for Microsoft Dynamics CRM

Today’s guest blogger is CRM MVP Alex Fagundes, CIO of PowerObjects, talks about one of his favorite features, Outlook Shortcuts.

Image may be NSFW.
Clik here to view.
image

One of the things that sets Microsoft Dynamics CRM apart from some of the other options that are available today for CRM is the native integration – or as I like to call it – the “super duper embedded-ness” of Microsoft Dynamics CRM into Microsoft Outlook. It seems like integration with, or the ability to “work with Microsoft Outlook” is at the top of the list of wants for like 99% of the prospective customers that we talk with. Simple reason for this is that Microsoft Outlook is by far and away the de facto standard for email, contact, calendar, and task management amongst organizations large and small.

Millions of people rely on Outlook to manage their professional and often time personal lives. So, it stands to reason that when considering a business tool like a CRM system, they would naturally expect and demand that it work with a tool that they are already so heavily dependent on – Outlook. For today’s post I won’t go into ALL of the reasons why the Dynamics CRM “embedded-ness” in Outlook far out paces the competition in its ability to let users “work the way they work” – instead I will just highlight one of the ways in which you can make each users experience seamless and personal with Microsoft Outlook and Microsoft Dynamics CRM.

Outlook Shortcuts Rock: So a little known/used capability of Microsoft Outlook is the ability to use “shortcuts” to build your own personal version of Outlook and Dynamics CRM in one easy to use interface.

Here’s where to find “Shortcuts” and the default folders it will include:

Image may be NSFW.
Clik here to view.

Here is how you add groups:

Image may be NSFW.
Clik here to view.

Once you add a Group, then you add Shortcuts to Dynamics CRM folders:

Image may be NSFW.
Clik here to view.

Then add shortcuts to Dynamics CRM folders

Image may be NSFW.
Clik here to view.

In just a minute our two your Outlook + Dynamics CRM shortcuts area could look like this:

Image may be NSFW.
Clik here to view.

Well we hope the you find this helpful – because Microsoft Dynamics CRM is the only thing we do – we are always looking for way to make it a more valuable tool in any organization!

Happy crm’ing,

Alex Fagundes



Image may be NSFW.
Clik here to view.
Viewing all 592 articles
Browse latest View live


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