Wednesday, September 2, 2009

Some usefull links about CRM Custmization

CRM Form Types

Is the user creating a new record?
crmForm.FormType == 1

Is the user updating an existing record
crmForm.FormType ==2

Is the user unable to update this record?
crmForm.FormType == 3

Is this record deactivated?
crmForm.FormType == 4

Is the user using the Quick Create form?
crmForm.FormType == 5

Is the user using the Bulk Edit form?
crmForm.FormType == 6

What is the unique ID for this record?
= crmForm.ObjectId

What type of record is this?
= crmForm.ObjectTypeCode

What type of record is this (Entity Name)?
= crmForm.ObjectTypeName

Is the user using the Outlook Client?
crmForm.IsForOutlookClient==true

Is the user using the Outlook Light Client?
crmForm.IsForOutlookLightClient == true

Is the user working On line?
crmForm.IsOnline==true

Have any fields in this form been changed?
crmForm.IsDirty==true

Reference:
http://mscrm-developer.blogspot.com/2008/09/crm-form-types.html

=======================================
Use full JavaScripts

http://ronaldlemmen.blogspot.com/

=========================================
Hide menu bar in Iframe

http://crm.atechnisch.nl/2008/03/hiding-bars-in-iframes/

=============================================
Tricks and Tips from Users of Microsoft Dynamics CRM
http://crm.atechnisch.nl/2008/03/hiding-bars-in-iframes/

Tuesday, July 28, 2009

Find login user of CRM using JavaScript

var xml = "" +
"" +
"< soap:envelope chema-instance="" chema="" envelope="" http:="" schemas.xmlsoap.org="" soap="" www.w3.org="" xmlns:soap="\ " xmlns:xsd="\ " xmlns:xsi="\ " >" +

GenerateAuthenticationHeader() +

" < soap:body >" +

" < retrievemultiple crm="" ebservices="" http:="" schemas.microsoft.com="" xmlns="\" >" +

" < query crm="" http:="" q1:queryexpression="" schemas.microsoft.com="" uery="" xmlns:q1="\" xsi:type="\" >" +

" < q1:entityname>systemuser< / q1:entityname >" +

" < q1:columnset q1:columnset="" xsi:type="\" >" +

" < q1:attributes >" +

" < q1:attribute>businessunitid < / q1:attribute >" +

" < q1:attribute>firstname< / q1:attribute >" +

" < q1:attribute>fullname" +

" < q1:attribute>lastname" +

" < q1:attribute>organizationid " +

" < q1:attribute>systemuserid" +

" < /q1:attributes >" +

" < /q1:columnset >" +

" < q1:distinct>false" +

" < q1:criteria >" +

" < q1:filteroperator>And" +

" < q1:conditions >" +

" < q1:condition >" +

" < q1:attributename>systemuserid" +

" < q1:operator>EqualUserId" +

" < / q1:condition >" +

" < / q1:conditions >" +

" < / q1:criteria >" +

" < / query >" +

" < / retrievemultiple >" +

" < / soap:body >" +

"< / soap:envelope >" +

"";



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



xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);

xmlHttpRequest.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");

xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");

xmlHttpRequest.setRequestHeader("Content-Length", xml.length);

xmlHttpRequest.send(xml);



var resultXml = xmlHttpRequest.responseXML;

var entityNode = resultXml.selectSingleNode("//RetrieveMultipleResult/BusinessEntities/BusinessEntity");



var firstNameNode = entityNode.selectSingleNode("q1:firstname").nodeTypedValue;

var lastNameNode = entityNode.selectSingleNode("q1:lastname").nodeTypedValue;

var fullNameNode = entityNode.selectSingleNode("q1:fullname").nodeTypedValue;

var systemUserIdNode = entityNode.selectSingleNode("q1:systemuserid").nodeTypedValue;

var businessUnitIdNode = entityNode.selectSingleNode("q1:businessunitid").nodeTypedValue;

var organizationIdNode = entityNode.selectSingleNode("q1:organizationid").nodeTypedValue;


alert(systemUserIdNode );

Friday, July 17, 2009

Auto Generated Account Number using JavaScript

Here given JavaScript to access CRM data using web service, means we can call CRM webservice using JavaScript.

Main logic for generating Account Number

a. Find the last Account number assigned to account using web service.
b. Increment last account number by one.
c. Set new generated account number to account.

=============================================


To find last account number, we are using JavaScript, and we can write this Script on "OnLoad" or "onSave" event of account.

JavaScript


var authenticationHeader = GenerateAuthenticationHeader();
// Prepare the SOAP message.
var xml = ""+
"" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+
" xmlns:xsd='http://www.w3.org/2001/XMLSchema'>"+
authenticationHeader+
""+
""+
"" xsi:type='q1:QueryExpression'>"+
"account"+
""+
""+
"new_AccountNumber"+
"
"+
"
"+
"false"+
"" +
" " +
" new_AccountNumber" +
" Descending" +
"
" +
"
" +
"
"+
"
"+
"
"+
"
";

// Prepare the xmlHttpObject and send the request.
var xHReq = new ActiveXObject("Msxml2.XMLHTTP");

xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);

xHReq.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");

xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");

xHReq.setRequestHeader("Content-Length", xml.length);

xHReq.send(xml);
// Capture the result.

var resultXml = xHReq.responseXML;
var results = resultXml.getElementsByTagName('BusinessEntity');
var i=0;
var lastAccountNumber= 0;
lastAccountNumber= results[i].selectSingleNode('./q1:new_AccountNumber).nodeTypedValue;

lastAccountNumber=eval(lastAccountNumber)+1
crmForm.all.new_AccountNumber.DataValue = lastAccountNumber;

}


Similary we can find any data of CRM entities using JavaScript and web service.

Hide associated view buttons

Some time user is not required some buttons to be shown in associated view grid menu.
To hide associated view buttons we are required to Add JavaScript on the form OnLoad event of entity, in which this assicated view is shown.

Suppose we want to hide "Add existing ----" button from associated view.
This assoicated view will be shown in Account entity, and associated view is of some custom entity. then we are requried to add following JavaScript on Account form load event.

====================================

HideAssociatedViewButtons('new_account_new_sponsoredkid', ['Add existing Sponsored Kid to this record']);

function HideAssociatedViewButtons(loadAreaId, buttonTitles){
    var navElement = document.getElementById('nav_' + loadAreaId);
    if (navElement != null) {
        navElement.onclick = function LoadAreaOverride() {
            // Call the original CRM method to launch the navigation link and create area iFrame
            loadArea(loadAreaId);
            HideViewButtons(document.getElementById(loadAreaId + 'Frame'), buttonTitles);
        }
    }
}

function HideViewButtons(Iframe, buttonTitles) {
    if (Iframe != null) {
        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;
                        }
                    }
                }
            }
        }
    }
}

==================================== HideAssociatedViewButtons function requires loadAreaId, buttonTitles as a parameters. We can find this loadAreaID, by viewing source code of Account form. and buttonTitles means ToolTip of that button. Above all contents are referred from http://blog.davehawes.com/post/2008/04/24/MSCRM-4-Remove-Add-Existing-xxxxx-button.aspx

Hide any tab of CRM form

To hide any tab of MS CRM form, we are reuqired to write JavaScript on "OnLoad" event of that form.

Just add following line in OnLoad event

crmForm.all.tabTab.style.display = "none";

Replace with the index number of the tab.
The first tab has index 0, the second 1 and so on.

If the notes tab is the fourth tab in a form, the code will be

crmForm.all.tab3Tab.style.display = "none";

Tuesday, July 7, 2009

Microsoft CRM 4.0 Certification



Exam #: MB2-631

Exam name: Microsoft Dynamics CRM 4.0 Customization and Configuration Certification Exam

Training Materials:
8912: Customization and Configuration in Microsoft Dynamics CRM 4.0

Alternative link
8912: Customization and Configuration in Microsoft Dynamics CRM 4.0

Exam Topics

Configuring Your Deployment – 28%
Configuring Business Units
Configuring Security
Configuring Users and Teams
Configuring Organizational Settings
Configuring Multi-User Interface Language Packs
Configuring Currency Exchange Rates

Customizing Forms and Views – 12%
Customizing Forms
Customizing Views
Publishing Forms and View Changes

Customizing Entities and Attributes – 32%
Maintaining Custom Attributes
Maintaining Custom Entities
Maintaining Custom Entity Icons
Renaming Entities
Translating Customized Entity Labels

Customizing Relationships and Mappings– 20%
Relationship Concepts
1:N Relationship Behavior
Creating 1:N Relationships
Creating N:N Relationships
Entity Mappings

Maintaining Organizations– 8%
Core Concepts – Multi-tenancy and the Configuration DB
Managing Additional Organizations
Importing Organizations
Maintaining Servers and Licenses

Sample Questions:

MB2-631.pdf

MB2-631.vce

Alternative link:

MB2-631.pdf

MB2-631.vce

=======================================
Exam #: MB2-632

Exam name: Microsoft Dynamics CRM 4.0 Applications Certification Exam

Training Materials:
8913: Applications in Microsoft Dynamics CRM 4.0

Alternative link:

8913: Applications in Microsoft Dynamics CRM 4.0


Exam Topics

Microsoft Dynamics CRM Concepts – 34%

Understanding Microsoft Dynamics Software
Multi-lingual User Interface and Multi-currency
Customer-centered view
Using Microsoft Dynamics CRM for Office Outlook

Sales – 18%

Microsoft Dynamics CRM Sales Concepts
Opportunity Management
Managing Leads
Sales Order Processing

Marketing – 16%
Planning and Creating Marketing Campaigns
Managing Marketing Campaigns

Service Management – 18%
Managing Contracts
Managing Cases
Creating a Knowledgebase
Managing Service Queues

Service Scheduling – 14%
Understanding the Service Scheduling Life Cycle
Scheduling Services
Maintaining Users and Resources

Sample Questions:

MB2-632.pdf

MB2-632.vce

Alternative links:
MB2-632.pdf

MB2-632.vce

=======================================

Exam #: MB2-633

Exam name: Microsoft Dynamics CRM 4.0 Installation and Deployment Certification Exam

Training Materials:
8911: Installation and Deployment in Microsoft Dynamics CRM 4.0

Alternative link:
8911: Installation and Deployment in Microsoft Dynamics CRM 4.0

Exam Topics

Planning a Microsoft Dynamics CRM Implementation – 18%
Planning for Business Needs
Planning for Hardware
Planning for Software

Microsoft Dynamics CRM Installation – 24%
Understanding Installation Concepts
Understanding Server Roles
Understanding Security
Understanding the Software Installation Process

Microsoft Dynamics CRM E-mail Router – 12%
Microsoft Dynamics CRM E-mail Router Configuration Concepts
Configuring the E-mail Router

Microsoft Dynamics CRM for Microsoft Office Outlook – 20%
Installing the Outlook Client
Supporting the Outlook Client

Redeployment and Upgrading – 16%

Understanding the Redeployment Process
Understanding the Upgrade Process

Uninstalling and Repairing – 10%
Uninstalling Microsoft Dynamics CRM
Repairing Microsoft Dynamics CRM

Sample Questions:

MB2-633.pdf
MB2-633.vce

Alternative links:
MB2-633.pdf
MB2-633.vce

=======================================

Exam #: MB2-634

Exam name: MS CRM 4.0 Extending Microsoft Dynamics

Training Materials:
8969: Extending Microsoft Dynamics CRM 4.0
8912: Customization and Configuration in Microsoft Dynamics CRM 4.0

Alternative links:
8969: Extending Microsoft Dynamics CRM 4.0
8912: Customization and Configuration in Microsoft Dynamics CRM 4.0



Exam Topics

Extension Approach – 24%

Choosing Extension Technology
Licensing Requirements
Extending the Outlook Client
Security Considerations
Deployment Considerations

Web Service Programming – 24%
Connecting to CRM Web Services
Using CRM Data Types
Modifying Data
Querying Data
Using Requests and Response
Using Metadata
Exception Handling

Custom Workflow Activities – 10%Creating Custom Workflow Activities
Deploying Custom Workflow Activities
Troubleshooting Custom Workflow Activities

Developing Plug-ins – 16%
Creating Plug-ins
Deploying Plug-ins
Troubleshooting Plug-ins

Application Programming – 26%
Customizing Navigation
Adding Menus and Buttons
Using IFrames
Using the Form Object Model
Deploying ASP .Extensions

Sample Questions:

MB2-634.pdf

MB2-634.vce

Alternative links:

MB2-634.pdf
MB2-634.vce