Tuesday 16 April 2013

How to update the existing records using Re-import (OOTB Import)Wizard in MSCRM 2011:


If you export a set of Accounts for example and select the option to make available for update, save the file and then open the xml document using Excel, you'll see the format by expanding the first few hidden columns.  You can see that there are some unique values assigned that trigger the Update feature during import.


Step1:
 From Advance find take  the view where the primay key( Account -account name)  and also the required updated column (FAx) should be there.



Step2: Export the view but select the below option (MAKE THIS DATA AVAILABLE FOR RE IMPORT BY INCLUDING REQUIRED COLUMN HEADINGS) :




STEP3: Open the exported file  (open with Xml editor)



Step 4: Update the fax column data in the  above open  excel  with the data you required and save .

Step5: Import the same sheet from importing wizard like normal way.

Add Custom Attributes in the views of Activity Entity:

 Not possible .


The only "true" workaround is to customize each Activity-type record (e.g. Email, Appointment, etc.) individually to include the relationships or attributes you require, and develop custom pages, reports, Workflows, or Plug-in code to support your intended functionality upon each as necessary.
 Ref:

Wednesday 3 April 2013


Display an HTML Web Resource in a Form with No Border:

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 check box of the formatting tab of the Web Resource Properties dialog box. 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 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>

Display Full-Screen Dashboards with Auto-Refresh in CRM 2011

CRM dashboards are great visualizations of what’s going on in the business. Sometimes we would just want to have a huge plasma screen displaying specific dashboards and refreshing the data automatically and regularly. This post will show you how simple that is!

When you want to permanently display a dashboard in a screen, these are the usual requirements:

  • Strip down the dashboard to exclude ribbon, navigation menu, etc.
  • Automatically refresh the page every X minutes
The solution is to create an HTML web resource which will embed the stripped-down dashboard in a new HTML page with refreshes automatically. These are the steps to do so:


1. Identify the dashboard you want to display on a screen
Click on the arrow to the right of “Dashboards” on the sitemap, then right click on the dashboard you select and click “Copy a Link” (and allow access to clipboard)

image

When you paste the link, it will look something like this: Customer Service Performance Dashboard <https://avanade45.crm.dynamics.com/workplace/home_dashboards.aspx?dashboardId=%7b2e3d0841-fa6d-df11-986c-00155d2e3002%7d&dashboardType=1030&sitemappath=Workplace%7cMyWork%7cnav_dashboards>
You need to copy the URL (in blue for the example above).



2. Create your HTML Web Resource to host the dashboard
Create a new web resource in your solution as follows
image



3. Edit the HTML to embed your dashboard and auto-refresh
Click on the “Text Editor” button and then click on the “Source” tab to enter your HTML code. This is the HTML I used:

<HTML>
  <HEAD>
    <TITLE>Customer Service Performance Dashboard</TITLE>
    <META content="300" http-equiv="REFRESH">
      <META charset="utf-8">
  </HEAD>
  <FRAMESET contentEditable="true" frameSpacing="0" border="0" frameBorder="0" rows=""*>
    <FRAME noResize="" src="/workplace/home_dashboards.aspx?dashboardId=%7b2e3d0841-fa6d-df11-986c-00155d2e3002%7d&dashboardType=1030&sitemappath=Workplace%7cMyWork%7cnav_dashboards" name="top" scrolling="no">
  </FRAMESET>
</HTML>


The highlighted values are the refresh rate (in seconds) and the relative URL to your dashboard (taken from step 1). Note that the relative URL above works for CRM Online, but for OnPremise you might need to modify the path slightly.
The HTML above is basically an embedded frame to your dashboard with a META tag to refresh the content every 300 seconds (5 minutes). It should work on most (or all) browser versions supported by MSCRM.



4. Navigate to your dashboard and make it full-screen.
There is a URL link from the web resource which you can click to navigate to your dashboard:

image

Now to make it full screen you need to hit F11 in your keyboard, and voila! This is all you will see on the screen:

image

Note that there is a dropdown control to update the dashboard; however, if you update the dashboard here, each time your window refreshes it will revert back to the original dashboard. So you might need to follow these steps for each dashboard that you want to display on a screen and never change the dashboard from the dropdown menu. Now you can also bookmark these URLs so you can directly access your dashboard screen anytime. Note that the same authentication as to access CRM will be required to access these HTML pages.

 Branding a CRM 2011 application by  Mani Ramachandran

The Dynamics CRM 2011 application, along with the XRM framework, enables us to model a varied requirement set with a high degree of customization. But there are instances when CRM is used adjacent with another LOB application, either as sections inside of CRM 2011, or outside of it. In such a case, the user experience should be as streamlined as possible. Dynamics CRM approaches this issue by providing the style sheets that crm uses as part of the sdk (sdk\resources\styleguide), so that other applications can be brought in line with CRM. In situations where other LOB applications take precedent (or their UI cannot be modified), what are the options for the CRM customizer?

Unsupported modifications to the rescue!
A few assumptions/ caveats before we go down this road:
  1. The crm application is installed on-premise (you have access to the web files)
  2. The changes are unsupported. Future rollups/ updates from MS could wipe out the changes
  3. Many of the changes could be global in nature, so test the new styles completely before moving it to production
Dynamics CRM uses css to style the various pieces in the application. Some of the styles are available in the css files, and some are generated during run-time by the code-behind. The approach is to figure out the element that I want to re style, note down the css class and the webfile it is a part of, and make the necessary changes to those css webfiles. Here are some examples of the changes, and the sections I edited to get it to work.

1. Border color for selected dashboard item

        File \CRMWeb\ _forms\controls\form.css.aspx

TABLE.ms-crm-Form-SubGrid-Layout-Selected,
TABLE.ms-crm-Form-AssociatedGrid-Layout
{
border:                                                 2px #8ab728 solid;
}
TABLE.ms-crm-Form-Chart-Layout-Selected
{
border:                                                 1px #8ab728 solid;
}






















2. Active header panel background color for view

     File \CRMWeb\ _forms\controls\form.css.aspx

TR.ms-crm-Form-SubGrid-viewRow
{
background-color:   #bef14f;
}











3. Background color and text color for view sort columns, with modified divider color

     File \CRMWeb\_common\styles\theme.css.aspx

.ms-crm-List-Header
{
<% = this.GetStyleCss(CrmTheme.Current.Grid.Header) %>
background-image: url("null");
background-color:   #76d3ee;
color: #3e4d6b;
}
File \CRMWeb\_grid\ AppGrid.css.aspx (for text color):


label.ms-crm-List-Sortable
{
text-overflow:ellipsis;
overflow:hidden;
white-space:nowrap;
<% if (CrmStyles.IsRightToLeft) { %>
text-align:right;
<% } %>
color: #3e4d6b;
}


    File \CRMWeb\_common\styles\global.css.aspx  – for white color dividers between the columns.
             .ms-crm-ImageStrip-resize{background:#ffffff;width:2px;height:14px;overflow:hidden;}
 .ms-crm-ImageStrip-bar_line{background:#ffffff;width:2px;height:14px;overflow:hidden;}




4. View module panel background color

     File \CRMWeb\_common\styles\theme.css.aspx

        .ms-crm-List-Title
        {
        <% = this.GetStyleCss(CrmTheme.Current.Grid.TitleArea) %>
        background-color:   #84b38e;
        color: #3e4d6b;
        }
        span.ms-crm-View-Name
        {
        <% = this.GetStyleCss(CrmTheme.Current.Grid.ViewName) %>
        color: #3e4d6b
        }





5. Navigation section header background and text color
       File \CRMWeb\appnav\appnavbar.css
div.ms-crm-NavBar-Title
{
border-bottom: 1px dotted #A5ACB5;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#2b73c0, endColorstr=#2361a1);
}
nobr.ms-crm-NavBar-Header-Title
{
vertical-align: middle;
font-weight:    <%= WebUtility.GetFontResourceForStyle("General.Bold.font_weight")%>;
font-size:      <%= WebUtility.GetFontResourceForStyle("General.14px.font_size")%>;
color                      :          white;
overflow              :       hidden;
text-overflow:  ellipsis;
display  : block;
}























6. Navigation section items background color and selected color
       File \CRMWeb\appnav\appnavbar.css
LI.ms-crm-NavBar-Subarea
{
height : 16px;
line-height : 16px;
margin-left: 3px;
margin-right: 3px;
padding: 1px;
background-color: #c4d1f5;
}
LI.ms-crm-NavBar-Subarea-Hovered
{
padding: 0px;
border: 1px solid #61A6E4;
}
LI.ms-crm-NavBar-Subarea-Selected
{
padding: 0px;
border: 1px solid #A7CDF0;
background-color: #2361a1;
}


































7. Active List Tool background color in dashboards
       File CRMWeb\_static\css\1033\Cui.css
.ms-cui-cg-lb.ms-cui-cg-s .ms-cui-cg-t{
color:#3e4d6b;
background-color:#bef14f;
}









8. Active/ Default background color tabs

       For selected tab:
.ms-cui-tt-s > .ms-cui-tt-a{
border-color:#b6babf;
background-color: #c2f259;
color:#601704 !important;
}

       For all tabs:

.ms-cui-tt-a{
margin-top:20px;
color:#6c6e70 !important;
border:1px solid transparent;
border-bottom:0px;
display:block;
cursor:default;
background-color: #0578bc;
color:#f8fa5b !important;
}










Here is a sample re-branded landing page. With changes to about 5 files, we are able to get our dynamics crm user interface aligned with an external application's UI. The image below also has changes to the logo, which is an important part of user experience (here is a good example for changing the logo).
















There is a feature request in MS Connect (ID 480469) that talks about custom logos, and is a possibility in a future release. So if you have some time, please go to MS Connect and vote for it!

Before I bid adieu, let me reiterate that these changes are unsupported, meaning a rollup update could not only replace the files, but might change the way the css is rendered. Thanks for reading!