Archive for April, 2011

How to add button to CRM 2011 form?

April 27, 2011 Comments off

Suppose you want to add a custom button in the CRM Form in 2011 note I am talking about adding button to form not ribbbon, you need to add an attribute in the entity which will then be placed in the Form design and

then the attrbute be converted in a Button at runtime using the javascript below.

The below script can be attached as a web resource file of type Script(JScript).

The Form Onload method can then call the method “create_button_from_textattributeFunction” which will actually create the custom button at runtime.

//CRM 2011 – Custom Button Creator
//Creates a Button from a Text attribute in CRM form.
//For every Button you need, create a Text Attribute and place it on the Form

function create_button_from_textattribute(fieldname, buttontext, buttonwidth,clickevent)
crmForm.all[fieldname].DataValue = buttontext;
crmForm.all[fieldname].style.borderRight=”#3366cc 1px solid”;
crmForm.all[fieldname].style.borderTop=”#3366cc 1px solid”;
crmForm.all[fieldname].style.borderLeft=”#3366cc 1px solid”;
crmForm.all[fieldname].style.borderBottom=”#3366cc 1px solid”;

function push_button(){”1px”;”1px”;

function release_button(){”0px”;”0px”;

// tell the button what to do when clicked
function functionOnClick()
     alert(‘This is a CRM 2011 button click!!!!’);

// create the custom CRM button
function create_button_from_textattributeFunction()
create_button_from_textattribute(‘name’, ‘CRM 2011 Button’,’184px’, functionOnClick);

Categories: CRM

How to hide get started panel in CRM 2011?

April 15, 2011 Comments off

One of my client was irritated by the ‘Get started here’ pane which is shown by default in CRM 2011 (highlighted in image below).

Get started area CRM 2011

Get started area CRM 2011

So I started looking at ways of hiding it. The answer comes really simple. It is a setting under ‘Personal Setting option’ which has to be turned off to hide the pane for the current logged-in  user. For doing so perform the following steps

  • go to Files (appears left top of screen)
  • select options (a new dialog will open up)
  • On the general tab find the setting “Show Get Started panes on all lists” un-select to hide the get started section.
Get started panes personal setting

Get started panes personal setting

If on the other hand you want to hide get started pane for all users in the system you can do so by

  • Go to settings (left navigation area)
  • find Administration (under system section)
  • find the option by name “Show Get Started panes on all lists for all users” select no
Get started panes Admin setting

Get started panes Admin setting

Hope this helps

Categories: CRM

JScript changes from CRM 4.0 to CRM 2011

April 14, 2011 2 comments

So you want to port you CRM 4.0 Java script changes to CRM 2011. Well here is a table that can help.

Request To

CRM 4.0

CRM 2011

Set Field Value



Get Field Value



Set requirement fields

For No Requirement——————————


crmForm.all.CRMFieldSchemaName.setAttribute(“req”, 0);


crmForm.all.CRMFieldSchemaName_c.className = “n”;


For Recommended——————————


crmForm.all.CRMFieldSchemaName.setAttribute(“req”, 1);


crmForm.all.CRMFieldSchemaName_c.className = “rec”;


For Required——————————


crmForm.all.CRMFieldSchemaName.setAttribute(“req”, 2);


crmForm.all.CRMFieldSchemaName_c.className = “req”;


Enable/Disable fields

crmForm.all.CRMFieldSchemaName.Disabled = true;


crmForm.all.CRMFieldSchemaName.Disabled = false;


Hide fields = ‘none’;


crmForm.all.CRMFieldSchemaName =’none’;

Show fields = ‘block’;   OR

Xrm.Page.ui.controls.get(“CRMFieldSchemaName“).setVisible(false); = ‘inline’;

Get Pick list Value



Set Pick list Value

crmForm.all.CRMFieldSchemaName.DataValue= value;


Get Lookup value

var lookupItem = new Array;

var lookupItem = new Array;

lookupItem = crmForm.all.CRMFieldSchemaName.DataValue;

lookupItem = Xrm.Page.getAttribute(CRMFieldSchemaName).getValue();

if (lookupItem[0] != null)

if (lookupItem[0] != null)











Set Lookup value

var lookupData = new Array();

Xrm.Page.getAttribute(“CRMFieldSchemaName”).setValue( [{id: idValue, name: textValue, entityType: typeValue}]);

var lookupItem= new Object();

Or = ‘guid‘;

var value = new Array();

   lookupItem.typename = ‘entityname‘;

value[0] = new Object(); = ‘TextVal‘;

value[0].id = guid‘;

   lookupData[0] = lookupItem;

value[0].name = TextVal‘;

   crmForm.all.CRMFieldSchemaName.DataValue = lookupData;

value[0].entityType = typeValue;





Tab Hide = “hidden”;

Xrm.Page.ui.tabs.get(Tab Index).setVisible(false);

Xrm.Page.ui.tabs.get(Tab Index).setVisible(true);


Xrm.Page.ui.tabs.get(Tab Name).setVisible(true);

Categories: CRM, JavaScript Tags:

What’s so cool about MS CRM 2011?

Many of my clients have been asking why they should move from CRM 4.0 to CRM 2011?

Though there is a real talk about the many new features added to Dynamics CRM 2011 which were missing in its earlier version, Dynamics CRM 4.0. I will like to cover the features that will impact you the most as an end user. With this intention I though of writing a blog about the really cool features that matters most to an end user.

1) Dialogs: Dialog is a really cool feature added to Dynamics CRM 2011. Dialogs let you design a questionnaire which the sales executive can follow when talking to a prospect. The data received from the questionnaire can be pushed into any entity record of your choice in the CRM system. Thus a questionnaire on feedback post sales can push data into a case or a presale questionnaire can push data about allocated budget of client into lead/contact record.

Does it matter to you? Of course it does as it helps you stream line the process. It lets your staff get align with the business needs and sales process. It makes sure that all information pre-post sale/purchase is always captured.

2) Connections: In CRM 4.0 “Relationship Role” could be created between contact, account and opportunity. What this meant was social relationships like father of, mother of, employee of, employer of etc could have been created to store more information about the prospect. In CRM 2011 this is now extended to all entities. I.e. now you can link an order to a contact with relationship referred sale, or Invoice to a contract or Case with any relation you need depending on your business needs. Isn’t this cool? This helps you store ad-hoc relationships between entities, which is very useful when talking to a prospect.

3) Dashboards and reports: Users are now able to leverage Microsoft Dynamics CRM for advanced business intelligence functionality. Multiple dashboards can be managed to monitor the overall performance of the business, and the dashboards of Microsoft’s CRM are intuitive and easy to navigate. The new Microsoft CRM add on allows users to benefit from being able to utilize business intelligence information to quickly and easily identify customer and market trends.

4) Ribbon & usability: The new Ribbon added at the top of CRM 2011 screens has greatly improved the usability of CRM 2011. This not only far more easy to use but also reduces time to learn and train new employee.

Categories: CRM Tags:
%d bloggers like this: