Darren Liu's Blog

Archive for January 2011

Display an HTML Web Resource in a Form with No Border

with 4 comments

When you add an HTML Web Resource to an entity form a border will be displayed even when you do not check the Display Border checkbox of the formatting tab of the Web Resource Properties dialog box.

HtmlWebResource

To prevent a border from being displayed, set the style properties of the body element of the HTML document. You must also not include any DOCTYPE information. The following HTML will cause the HTML Web resource contents to display without a border.

 

<html>
<head>
<title>No Border Web Resource</title>
</head>
<body style="border-width: 0px; padding-left: 0px; padding-top: 0px; margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px">
<p>
This Web Resource will display with no border</p>
</body>
</html>

By default, many HTML editors will include DOCTYPE information in the contents of the HTML. The following HTML with the same body style applied will still appear with a border.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Web Resource with Border</title>
</head>
<body style="border-width: 0px; padding-left: 0px; padding-top: 0px; margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;">
<p>
Style applied but border still appears.</p>
</body>
</html>

Thanks Jim Daly again for the information and I hope it helps you on your project.

Written by darrenliu

01/28/2011 at 1:14 am

Posted in CRM, Development

Tagged with ,

Retrieve Records filtering on an Entity Reference field using OData

leave a comment »

I ran into a problem today trying to retrieve records filtering on an Entity Reference field using the OData endpoint.  Thanks to Jim Daly for helping me. An Entity Reference field contains several properties and Id is one of the its properties.  Usually when you are filtering using OData, all you have to do is use the keyword $filter, the search field, operator and the value.

For example, to retrieve all the accounts where address1_city equal Redmond, you’ll do the following:

/AccountSet?$filter=Address1_City eq 'Redmond' 
 
However to retrieve from an Entity Reference field is little bit different.  To access the properties in an Entity Reference field, you just need to use the forward slash “/” and then follow by the property name.
 
For example, to retrieve all the accounts where primarycontactid equal to {guid}, you have to do the following:
 
AccountSet?$filter=PrimaryContactId/Id eq (Guid'567DAA8F-BE0E-E011-B7C7-000C2967EE46') 

I hope this help in your next project.

Written by darrenliu

01/28/2011 at 1:00 am

Posted in Uncategorized

Turn RSS Feed Reading View Off

leave a comment »

I am working with CRM using the REST endpoint today and I would like to see the XML returned by the Organization data service in Internet Explorer.  However I forgot how to turn the Feed Reading View off (if you have feed reading view on, you will not able to see the XML).  So I “bing”…  I found the answer and I would like to put it on my blog for my future reference and also for the folks who is looking to do the same during CRM development.  So to turn Feed Reading View off, I need to follow the steps below.

  1. Click on the Tools menu.
  2. Select Internet Options from the dropdown menu.
  3. Click on the Content tab on the Internet Options property screen.
  4. Click on the Settings button of Feed section to bring up the Feed and Web Slice Setting dialog box.
  5. Uncheck the check box for Turn on feed reading view.

    image

  6. Click OK button to close all of the open dialog boxes.
  7. Restart Internet Explorer.

Before

image

After

image

Here we go, I can now see the XML returned by the Organization data service!  Anyway, happy coding everyone!

Written by darrenliu

01/27/2011 at 1:34 am

Could not load file or assembly ‘Microsoft.IdentityModel’

leave a comment »

I ran into a problem trying to authenticate with CRM 2011 Online, I received the following error message when I tried to run my code:

Could not load file or assembly ‘Microsoft.IdentityModel Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencie. The system cannot fine the find specified.

The reason for receiving this error is because I don’t have the Windows Identify Foundation Pack installed on my Windows 7 machine.  To resolve this problem, I downloaded and installed the Windows Identity Foundation Pack.

Written by darrenliu

01/20/2011 at 7:20 am

Posted in CRM, Development

Tagged with ,

CRM 2011 CRM Update Available

leave a comment »

The Microsoft Dynamics CRM team released another CRM 2011 update for the RC version on 2/11.  This update resolved the following issues which indicated in KB2461081.  You’ll receive this update through your Windows Update.

  • You receive a ‘CountryCurrencyNotSupported’ error message with RON currency in Microsoft Dynamics CRM 2011
  • You receive an exception error when you click Cancel in the convert wizard on the PCS payment instrument page 
  • Changes to the timing of when the server setting table LastUpgradeApproachingNotificationCheck is updated
  • When you click "Get CRM For Outlook" with a preferred language of Dutch, the "Run" option is missing
  • The "Number of Employees" list in the Cyprus Market Sign-Up displays the numbers in the list incorrectly
  • The "View" tab is incorrectly displayed as the first tab in the entity grid ribbon
  • You receive a "An error has occurred" error message when you click Help in Microsoft Dynamics CRM 2011 
  • You receive a "The Collation specified by SQL Server is not supported" error message when you provision a template 
  • When you try to convert a subscription, you are required to log out and then log back in
  • The "ControlFeaturesOnPatchAction" file does not execute 
  • When you change the user password, the encrypted password becomes invalid
  • The Email Router stops processing email when the CRM Live authentication token expires
  • When you upgrade from the beta version of Microsoft Dynamics CRM 2011 to Microsoft Dynamics CRM 2011, the non-wizard custom Rrports are not published when a move and upgrade is performed
  • Custom picklist options that you created in system picklists in the beta version of Microsoft Dynamics CRM 2011 are lost when you upgrade from the beta version to Microsoft Dynamics CRM 2011
  • When you perform an Import Organization to upgrade from the beta version of Microsoft Dynamics CRM 2011 to Microsoft Dynamics CRM 2011, you receive the error "The Label expression for the chart ‘Chart0’ contains an error: [BC30057] Too many arguments to ‘Public Shared Function GetCultureInfo" 
  • When you perform an Import Organization to upgrade from the beta version of Microsoft Dynamics CRM 2011 to Microsoft Dynamics CRM 2011, you receive the error "The Value expression for the textrun ‘Table0_Group0_Header0.Paragraphs[0].TextRuns[0]’ contains an error: [BC30057] Too many arguments to ‘Public Shared Funct"

Written by darrenliu

01/19/2011 at 6:04 pm

Posted in CRM

Beta to RC Upgrade Error–Trial Period Expired

leave a comment »

I upgraded my VPC from beta to RC today and I received an error telling me that the “trial period has been expired”.  The solutions are already in the CRM community.  I just want to post it here on my blog for my future reference and also for the folks looking for the solution to this problem.

image

So there are two solutions to this problem.

Solution 1 – Import/Upgrade (Preferred Method)

  1. Install the RC bits for the CRM Server on an alternate computer. Note that you can install the RC bits on the same computer that is running Beta, but you must uninstall all Beta components and delete the MSCRM_CONFIG database on the SQL instance before doing so.
  2. Install the CRM 2011 Reporting Extensions to the computer running SQL in the new deployment.
  3. Restore the database backups of the Beta orgs to the computer running SQL in the new deployment.
  4. Use Deployment Manager to Import the Beta orgs. The Import wizard will detect that the org is a Beta org and will upgrade it to the RC bits.
  5. During import, use the Auto Mapping option to map CRM users to Active Directory.

Solution 2 – Connect to Existing (Note : This option requires the Administrator to update the license keys in the MSCRM_CONFIG database manually.)

  1. Uninstall all CRM components from deployment computers.
  2. Install the RC bits for CRM Server, and on SQL Server page of the setup wizard, specify to Connect to Existing. The Setup wizard will detect and upgrade the MSCRM_CONFIG database and the default org to the RC bits.
  3. During the server installation/upgrade process, you likely will encounter the following error:

    “Action Microsoft.Crm.Setup.Server.AddLicenseAction failed. Your trial period has expired.”

    If this occurs, in the ConfigSettings table in MSCRM_CONFIG, in the LicenseKeyV5RTM column, manually enter the license key.

    use MSCRM_CONFIG
    update ConfigSettings set LicenseKeyV5RTM = 'MQM2H-JYYRB-RRD6J-8WBBC-CVBD3'

    Important : You can also complete this task with SQL Management Studio by using the following SQL statements:

    In the server setup dialog, click Retry , and the Server setup should complete normally.

  4. Use Deployment Manager to upgrade the remaining Beta orgs to RC.

Written by darrenliu

01/19/2011 at 4:56 pm

Posted in Uncategorized