Tuesday, December 6, 2011

Tuesday, November 15, 2011

Hiding Tabs and Sctions in CRM 2011

Replaced the old code of  CRM 4.0
crmForm.all.tab1Tab.style.visibility = "hidden";
crmForm.all.tab1Tab.style.position = "absolute";

with

 Xrm.Page.ui.tabs.get(tabNumber).sections.get(sectionNumber).setVisible(true);
eg:

Xrm.Page.ui.tabs.get(1).sections.get(5.setVisible(true);
on tab 1 and section 5

Migrated to CRM 2011 today 11/15/2011

Migrated to CRM 2011 today 11/15/2011

Monday, November 14, 2011

Passed Microsoft CRM Dynamics Sure Step Certification

I earned my Microsoft CRM Dynamics Sure Step Certification last week 11/7/2011.
The exam was quiet interesting and challenging. I had prepared through the study materials and  implementations.


Friday, September 30, 2011

Hides buttons from Associated Views

// Hides buttons from Associated Views

function HideViewButtons(Iframe, buttonTitles) {

debugger;

Iframe.onreadystatechange = function HideTitledButtons() {

if (Iframe.readyState == 'complete') {

var iFrame = frames[window.event.srcElement.id];

var liElements = iFrame.document.getElementsByTagName('li');

for (var j = 0; j < buttonTitles.length; j++) {

for (var i = 0; i < liElements.length; i++) {

if (liElements[i].getAttribute('title') == buttonTitles[j]) {

liElements[i].style.display = 'none';

break;

}

}

}

}

}

}


// Change the source of our IFRAME

var hideButtons = ["Add existing Trip Destination to this record", "Add a new Quote Kit Part to this record"];

HideViewButtons(document.getElementById("IFRAME_Destination"), hideButtons);

Monday, August 1, 2011

Managing Microsoft Dynamics Implementations Certification - Sure Step Certification

Managing Microsoft Dynamics Implementations Certification - Sure Step  Certification  Exam MB5-858

Skills Measured

Prepare to Manage a Microsoft Dynamics Implementation with Microsoft Dynamics Sure Step (47.14%)


Identify key goals and pre/post activities associated with Microsoft Dynamics Sure Step decision accelerators and the Diagnostic phase.

Given a scenario, identify the appropriate Microsoft Dynamics Sure Step project type and the related key activities.

Identify Microsoft Dynamics Sure Step cross phase processes and the key activities and deliverables associated with each cross phase.

Given a scenario, identify the appropriate Microsoft Dynamics Sure Step documentation.

Identify Microsoft Dynamics Sure Step optimization offerings.

Project Management Library.

Manage a Microsoft Dynamics Implementation with Microsoft Sure Step (41.43%)


Given a scenario, identify and complete the appropriate Microsoft Dynamics Sure Step documentation.

Complete the Microsoft Dynamics Sure Step Analysis phase.

Create a Microsoft Dynamics Sure Step project.

Gather and document customer business requirements by using the Microsoft Dynamics Sure Step FRD.

Given a scenario, identify how to use Design documents in the Microsoft Dynamics Sure Step Design phase.

Identify and complete key test activities in a Microsoft Dynamics Sure Step Development phase.

Identify key activities of the Microsoft Dynamics Sure Step Deployment phase.

Manage change, risks, and issues by using Microsoft Dynamics Sure Step tools and templates.

Conduct a Microsoft Dynamics Sure Step Tollgate Review.

Create a Microsoft Dynamics Sure Step Go-Live Cutover Plan.

Project Management Library.

Manage Post Implementation Activities with Microsoft Dynamics Sure Step (11.43%)

Given a scenario, identify appropriate Microsoft Dynamics Sure Step Quality Management activities.

Given a scenario, recommend appropriate Microsoft Dynamics Sure Step Post Go-Live Support activities.

Given a scenario, recommend appropriate Microsoft Dynamics Sure Step Performance Tuning and Optimization activities.

Identify the key tasks associated with closing out a Microsoft Dynamics Sure Step project

Monday, July 25, 2011

To hide a "Add existing record" button from an associated view in an iframe in a CRM form.

I have tried Daves method to hide the associated view button, somehow it did not work for me, after trying various solution this one worked for me.
To hide a "Add existing record" button from an associated view in an iframe in a CRM form.

if(crmForm.all.IFRAME_new1)
{
crmForm.all.IFRAME_new1.onreadystatechange = function()
{
if (crmForm.all.IFRAME_new1.readyState == 'complete')
{
var addExistingBtn = crmForm.all.IFRAME_new1.contentWindow.document.getElementById('_MBtoplocAssocOneToMany10040travelbudgetdestination');
crmForm.all.IFRAME_new1.contentWindow.document.getElementById('_MBtoplocAssocOneToMany10040travelbudgetdestination').style.display = 'none';
}
}
}

Monday, June 27, 2011

Showing associated views of N:N related entities in CRM form

GetFrameSource = function(tabSet, roleOrd)


{

if (crmForm.ObjectId != null)

{

var roleOrdParamMissing = (typeof(roleOrd) == "undefined")

(roleOrd == null);

var oId = crmForm.ObjectId;

var oType = crmForm.ObjectTypeCode;

var security = crmFormSubmit.crmFormSubmitSecurity.value;

var url = "areas.aspx?oId=" + oId + "&oType=" + oType + "&security=" + security + "&tabSet=" + tabSet;

if (!roleOrdParamMissing) {

url += "&roleOrd=" + roleOrd;}

return url;

}

else

return "about:blank";

}


RenderInIFrame = function(iFrame, navEntity, view, viewType)

{

if(viewType == 1)

iFrame.src = GetFrameSource(view, 1);

else

iFrame.src = view;

// If the navigation bar item doesn't exists, display error; otherwise, hide it.

if (navEntity == null

navEntity == "undefined")

alert("navEntity: " + navEntity + " is null or undefined");

else

navEntity.style.display = "none";

}

RenderInIFrame(document.all.IFRAME_name, document.all.navfas_relationshipname, "areafas_relationshipname", 1);

Thursday, June 23, 2011

Rendering Iframe for a N:1 realtionship between entities

When you want to  build a iFrame into a form for 2 entities which has a N:1 relationship you need to use the following code.

//*****************************************************************************

//Display entity1 into entity2 IFRAME

//*****************************************************************************

function GetFrameSource(tabSet) {

 if (crmForm.ObjectId != null) {

 var oId = crmForm.ObjectId;

 var oType = crmForm.ObjectTypeCode;

var security = crmFormSubmit.crmFormSubmitSecurity.value;

return "areas.aspx?oId=" + oId + "&oType=" + oType + "&security=" + security + "&tabSet=" + tabSet;

}

else {

 return "about:blank";

}

}

crmForm.all.IFRAME_Destination.src = GetFrameSource("new_travelbudgetdestination");

where IFRAME_Destination is the IFRAME name and  new_travelbudgetdestination is the name of the N:1 realtionship that you have created.

Wednesday, June 8, 2011

To make a required field in CRM dynamics to non-required field using JavaScript

To make a required field in CRM dynamics to non-required field using JavaScript
if (crmForm.all.newfieldname.DataValue != null)

{
crmForm.SetFieldReqLevel("new_nonrequiredfield",0);// set field to not required
}

else
{
crmForm.SetFieldReqLevel("new_nonrequiredfield",2);// set field to not required
}

Wednesday, May 4, 2011

Rearrange tab Order oin CRM form from Left to Right

CRM tabs from top-to-bottom, left-to-right

( within a section; after which it moves on to the next section ):


Example 1: ( CRM Tab Order )

Field1 Field3

Field2 Field4
Most other applications tab from left-to-right, top-to-bottom:

Example 2: ( Normal Tab Order )

Field1 Field2

Field3 Field4


How the Tab Order Works


Each data entry field has a property called tabIndex which is a number ( integer ) that instructs the window the order in which to move the cursor between the various fields. The order is from from lowest to highest, i.e., from 1 to 10,000, or whatever.

This means your first field has the lowest tabIndex value and your last field as the highest.

Microsoft CRM appears to set the first data entry field tabIndex to 1000 and increases the tabIndex by 10 for each subsequent field. For example:

Example 3: ( CRM Tab Order, with TabIndex Values )

Field1: TabIndex=1000 Field3: TabIndex=1020

Field2: TabIndex=1010 Field4: TabIndex=1030

Changing the Tab Order

In certain cases, you may wish to change the tab order so that users are not so confused by the change ( and you as the form designer are not confused as to where and how to place your fields ). All we need is a little JavaScript code in the Form's OnLoad event, and we're set:

crmForm.all.Field1.tabIndex = 1000;

crmForm.all.Field3.tabIndex = 1010;

crmForm.all.Field2.tabIndex = 1020;

crmForm.all.Field4.tabIndex = 1030;



Note: replace Fieldx with the schema name of the field and leave the rest as is.

Which produces the following Tab Order:

Example 3: ( Tab Order Reset )

Field1: TabIndex=1000 Field3: TabIndex=1010

Field2: TabIndex=1020 Field4: TabIndex=1030

Final Notes:

Setting the tabIndex to 0 will result in the field being ignored by the tab order. While you don't run into this requirement often, it is there if you need it.

Wednesday, April 13, 2011

To include External Javascript in your onLoad form

function XRMCodeInjector(scriptFile) {


var injection = new ActiveXObject("Msxml2.XMLHTTP");

injection.open("GET", scriptFile, false);

injection.send(null);

eval(injection.responseText);

}



XRMCodeInjector('/ISV/XRM/XRMServices/XRMServicesjs');

XRMCodeInjector('/ISV/XRM/javaScript/xrmUtility.js');

Thursday, April 7, 2011

Enable or Disable custom buttons created on CRM forms.

In CRM forms we would have used creating new buttons, if we need to enable or disable these buttons we can use the following code below.


var liElements = document.getElementsByTagName('li');


var buttonTitles = ['Reject'];

for (var j = 0; j < buttonTitles.length; j++) {

for (var i = 0; i < liElements.length; i++) {

if (liElements[i].getAttribute('title') == buttonTitles[j]) {

var elem = liElements[i];

elem.disabled = true;

}

}

}

Thursday, March 17, 2011

Adding or Moving Notes field from the Notes Tab to General Section

1. Go to Settings > Customization and double click the Contact entity


2. On the pop-up window, select Forms and Views. On the right, it'll show up a list. Double click Form.

3. A new pop-up window will show, with the form designer. Click on the tab Notes.

4. Inside, you can click on a region that will select a square around the Notes section. Yes, it will have a lock before the name.

5. Double click that region (the section) until the Section Properties form pops. At the bottom you'll find the Location group box with the picklist Tab.

6. Select General and click OK so that this section will move to the General tab. Possibly the Notes tab will become empty, and the Notes section will be at the bottom of the General tab.

7. Click Save and Close and Publish your customization.