Tuesday, 18 June 2013

FetchXML Outer Joins - CRM 2011, Opportunities and Customers.

Joins in fetchxml or the lack of joins can cause big problems in data returned if you do the wrong thing.

The following line of code run from within the context of an opportunity would return all opportunities that also have a Customer selected.

<link-entity name="account" from="accountid" to="customerid" visible="false" alias="accountid">
 
If you want to show all Opportunities regardless of whether a customer has been added or not then you need to add in link-type=”outer” as per below.

<link-entity name="account" from="accountid" to="customerid" visible="false" link-type="outer" alias="accountid">

Hope this helps

Wednesday, 9 January 2013

How to add a new SubArea to the Sitemap of CRM that links directly to an Activity, i.e (Task, Phone Calls, Appointments etc.)


How to add a new SubArea to the Sitemap of CRM that links directly to an Activity, i.e (Task, Phone Calls, Appointments etc.) 

I find the easiest way to edit a sitemap is to use this editor - http://sitemapeditor.codeplex.com/

It will allow you to connect your CRM, backup the sitemap first and then change/test it.
  • To add Tasks to the Navigation area of CRM
  • Expand Area (Workplace)
  • Expand Group (My Work)
  • Add a new SubArea and give it a Title and Description of Task
  • Get the GUID of the Task view
  • Add a URL of - /_root/homepage.aspx?etn=task&type=task&viewid=%7b2B5F5A5D-2D23-4FE7-AA58-E77995368AE7%7d&viewtype=1039
  • Save and Update the Sitemap and test
If you don’t have the Type=Task added then it will default to the main activities window

 
 

Thursday, 6 September 2012

InitializationFailure whilst trying to connect to a CRM 2011 using the Office 365 Portal.

I recently tried connecting to a new crm demo in BIDS, one which was setup using the office 365 portal. I connect this way for lots of customers so didnt expect an issues, although what actually happened was I received the following error message.

IntializationFailure
 ----------------------------
 An authentication error occurred while connecting to server "
https://disco.crm4.dynamics.com/XRMServices/2011/Discovery.svc". Make sure that the connection string and credentials are correct, and try again.

Through lots of investigation I found that in order to connect using the new Portal accounts and not the WLID's before you need to install the Microsoft Online Services Sign-In Assistant for IT Professionals RTW which you can find here:

http://www.microsoft.com/en-us/download/details.aspx?id=28177

Thank you Microsoft for making this so easy to find!

Tuesday, 24 July 2012

CRM 2011 Dashboard Chart Labels

In order to hide the labels in crm charts you need to  edit the chart xml. Here's how

Export the Chart
Create a copy of the chart xml and edit it.
Where it says IsValueShownAsLabel="True" change it to false
Save the xml
Import the chart back into CRM and Replace the existing one.

Then the chart will appear without the labels on.

Thursday, 3 May 2012

How to retrieve all attributes using FetchXML in CRM 2011

Sometimes you might be querying a hidden entity in CRM, or you simply dont want to have to go into CRM to check field names.

Therefore to return all attributes in a fetchxml query you can simply add <all-attribues/> where you would usually list them and it will return them all.

Example:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="listmember">
<all-attributes/>
</entity>
</fetch>

Wednesday, 7 March 2012

How to create a drill through Link from a SSRS Report in CRM 2011 Online

How to create a drill through Link from a SSRS Report in CRM 2011 Online

Steps:

1.    Create a Report Parameter called CRM_URL, Make it hidden and with a default value of https://YOURCRMORGANISATION.crm4.dynamics.com/main.aspx?

2.    View the Text Box Properties of the cell you wish to add the link to, go to the Action tab, then select Go To Url, then expression and add in

=Parameters!CRM_URL.Value & "?ID={" &
Fields!customeridValue.Value.ToString() &"}&OTC=2"

          Replace customerid with your value, keep the Value part as this is the GUID of the record.

OTC = 2 is contact, so change this to 1 for account, 3 for opportunity. To find the other OTC codes go to the entity in question, open a record and in the URL you will see etc=3, this number is the OTC (Object Type Code).

3.  Save and Publish the report into CRM

Enjoy!

Monday, 9 January 2012

SSRS Report - UTC / UK Time Issue

I came accross an issue recently, I created a SSRS Report from scratch and set the locationisation to en-GB which displays the dates etc in a dd/mm/yyyy format. This presented me with a problem, when connecting to a crm online server it likes the format to be in utc so when I passed 01/08/2011 (1st August 2011) it thought i was passing 08/01/2011 (8th January 2011).

The solution it seems was to edit the rdl file in notepad and change the query parameter, which once I found out where/how was a 10 second job.

The steps were:

Find the location of the Report in question
Right click on the report and select Open with
Choose Notepad
Do a find for <QUeryParamater>


Original Code:<QueryParameters>
 <QueryParameter Name="@StartDate">
        <Value>=Parameters!StartDate.Value</Value>
</QueryParameter>


New Code:<QueryParameters>
 <QueryParameter Name="@StartDate">
        <Value>=Format(Parameters!StartDate.Value,"MM-dd-yyyy")</Value>
</QueryParameter>


Notice the change in the Value, this simply formats the value into a mm-dd-yyyy format and then your away.

Enjoy

ADFS Timeout on Server 2012 for CRM 2011

This follows on from this Microsoft Guide http://social.technet.microsoft.com/wiki/contents/articles/7681.setting-the-adfs-timeout-for-crm...