Thursday, June 21, 2012

Create Dependent Option Set__using JavaScript

By using below Java Script, you can create a Dependent Option set in CRM 2011 form. To do this please follow below steps.

Step 1: Create two Option set field (1. Brand [new_brand], 2. Product [new_product] ) in CRM form with below details.



Step 2: Place those field in the form.

Step 3: Create a new Java script Web Resource with two different function in it, one for form OnLoad and other for OnChange event of parent Option set.

To know, how to create a new Java Script Web Resource in CRM 2011, find my previous article: Work With Java Script Web Resource


/* Code for Form onload Event */
function formload() {
    var ctrl_product = Xrm.Page.ui.controls.get("new_product");
    var product = Xrm.Page.data.entity.attributes.get("new_product");
    var productval = product.getValue();
    if (productval == null) {
        ctrl_product.setDisabled(true);
    }
    else {
        ctrl_product.setDisabled(false);
        var currentVal = Xrm.Page.data.entity.attributes.get("new_product").getValue();
        onchangecall();
        product.setValue(currentVal);
    }
}




/* Code for Option Set (new_brand) onchange Event */
function LoadDependentdata() {
    var myNewOption = document.createElement("option");
    var _brand = Xrm.Page.ui.controls.get("new_brand");
    var _product = Xrm.Page.ui.controls.get("new_product");
    _product.setDisabled(false);
    _product.clearOptions();
    var _brandval = Xrm.Page.data.entity.attributes.get("new_brand").getValue();
    if (_brandval != null) {
        switch (_brandval) {
            case 100000000:
                myNewOption.value = 100000000;
                myNewOption.text = "Unicorn";
                _product.addOption(myNewOption);

                myNewOption.value = 100000001;
                myNewOption.text = "CBR 250 R";
                _product.addOption(myNewOption);

                myNewOption.value = 100000002;
                myNewOption.text = "CBR 150 R";
                _product.addOption(myNewOption);

                myNewOption.value = 100000003;
                myNewOption.text = "Dazzler";
                _product.addOption(myNewOption);

                myNewOption.value = 100000004;
                myNewOption.text = "Shine";
                _product.addOption(myNewOption);

                break;

            case 100000001:

                myNewOption.value = 100000005;
                myNewOption.text = "CBZ Xtreme";
                _product.addOption(myNewOption);

                myNewOption.value = 100000006;
                myNewOption.text = "Splendor";
                _product.addOption(myNewOption);

                myNewOption.value = 100000007;
                myNewOption.text = "Hunk";
                _product.addOption(myNewOption);

                break;

            case 100000002:
                myNewOption.value = 100000008;
                myNewOption.text = "Pulsur 220";
                _product.addOption(myNewOption);

                myNewOption.value = 100000009;
                myNewOption.text = "Pulsur 180";
                _product.addOption(myNewOption);

                myNewOption.value = 100000010;
                myNewOption.text = "Pulsur 150";
                _product.addOption(myNewOption);

                myNewOption.value = 100000011;
                myNewOption.text = "Discover";
                _product.addOption(myNewOption);

                break;

            case 100000003:
                myNewOption.value = 100000012;
                myNewOption.text = "Apache 180";
                _product.addOption(myNewOption);

                myNewOption.value = 100000013;
                myNewOption.text = "Apache 160";
                _product.addOption(myNewOption);

                break;
            default:
                _product.setDisabled(true);
                return null;
        }
    }
}



Step 4: Call the formload() function in Entity Form onload event and call LoadDependentdata() function in onchange event of Brand (new_brand) option set.



Now open the CRM form in runtime and you can see that as per your selection in Brand Option set, Product Option set is populating data accordingly.


*** Thank You ***


Work with Java Script Web resource

For this I have created a simple Hello World program with Java Script. Just follow below steps.
1. From you CRM environment goto Settings > Customization > Customize the system
2. go to Web Resource.

3. Create a New Web Resource.
4. Give the name, Display Name and Description of the web resource. Select Script (Jscript) as the type of web resource. Then Click on the Text Editor Button.



5. Write a simple Hello World function.
                              function firstprogram(){
                                           alert("Hello World");
                               } 

6. Now, we have to call the JavaScript function from the form load event of Account form. 
7. Navigate to Account main form and open it

                                 


8. Select the Form Properties from the ribbon.



9. In the form properties first we have to add a new Form Libraries. To do this click on Add and then select the web resource we have just created.
10. Then in the Event Handler section write the function name of the JavaScript and click on OK.



11. Then click on, Save > Publish > Save & Close.
12. Now from work place if we click Account > New to open any New Account form, the script will execute and show an alert with "Hello World". 

*** Thank You ***




Wednesday, January 25, 2012

CRM 2011 Import DataWizard - Part:1

The Import Data Wizard has been enhanced in Microsoft Dynamics CRM 2011. It takes some of the functionality from the CRM 4.0 DMM (Data Migration Manager), as well as adding some new features.



Supported file types
The Import Data Wizard supports XML Spreadsheets (.xml), Simple Text (.csv or .txt), and multiple files (.zip). By default, the maximum size of a file is 8 MB, which means:
• Any .csv, .txt, or .xml file must not exceed 8 MB.

• Any individual file inside the .zip file must not exceed 8 MB and the total size of the .zip file, including the attachment folder, must not exceed 32 MB.


Single entity import
We will import Contact entity in this case. We will use Template for this import. To download the template, prepare the imported file and import to the system, follow below steps:


Step1: Download Template for Import
1. Under Workplace click on Contacts.


2. From the ribbon under Data group click on Import Data text under the button.
3. Select Download Template for Import.
4. In the File Download window click on Save.
5. This will save contact.xml file to your Hard Drive.


Step2: Prepare The XML File for Import 
1. Open the XML file using Microsoft Excel; you will see that each column corresponds to a field on the Contact main form. It also indicates (via bolded column text) all mandatory fields for the record.
2. You may notice that all mandatory fields are bold text. So make sure that these fields have valid data for importing. You also see a unique identifier data type (lookup) on the Spreadsheet call: Owner. Owner is a system mandatory field that appears in all user-owned entities. The owner data can be populated by the data import process—we don't need to fill in this field—so remove the Owner column.
3. Enter all details which you want with all the mandetory fields and save the file as contact.xml.


Step3: Import The XML File 
1. Under Workplace click on Contacts
2. From the ribbon under Data group click on Import Data button.

3. In the Import data Wizard Browse the recently created contact.xml file and click on Next.
4. In the Map Fields section Map Fields between Source Fields(XML file) with CRM Fields and Click on Next.
5. In Review Mapping Summary shows Success Message, click on Next.
6. Select Yes or No in the Allow Duplicates section and also check all other features in the Import Data Wizard window and Click on Submit.
7. This will create the New records which you have created in your contact.xml file.




****** Thank You ******

Friday, January 13, 2012

Enable and Disable a user in CRM 2011

To Disable a user which is created previously in your system follow below steps:

1.  From the side navigation click on Settings.



2.  Under System, click on Administration.



3.  In the Administration window, select Users.



4. A list of users will show in the window. Select one or more users who's you want to make Disable.
5.  Click on the  button from ribbon under Records group.
6.  A confirm window will open, Click OK to confirm.



7.  After this the user will be disabled, and not seen in the list. To see that recentlly disabled user, change the view to Disabled Users to see the effect.

After this that particular user not able to login to the system.

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

To Enable again a previously disabled user follow below steps:

1.  From the side navigation click on Settings.



2.  Under System, click on Administration.




3.  In the Administration window, select Users.



4. Change the view to Disable Users. A list of users will show in the window. Select one or more users who's you want to make Enable.

5. Click on the button from the ribbon under Records group.

6.  A confirm window will occur, click on OK to confirm the operation.


7.  The user will then remove from the Disabled User View and coming to the Enabled User View, that means the user is then Enabled.

8. Select the user name without opening it.


9. Click on button from ribbon under Actions group to send a new invitation for that re-enabled user.

N.B. Without this invitation the user will be enabled but not able to login to the system.




***** Thank You *****







Wednesday, January 11, 2012

Auto Numbering For CRM 2011


In several entities you can find that some numbers are unique and auto generated. By the auto-numbering feature of CRM 2011 we can change the Prefix and length of the suffix as we like. To do this please follows below steps:

1.    Go to Setting.

2.      Click on under System in entity navigation pane.

3.      Select Auto-Numbering option. (Auto-Numbering dialog box will appear).



4.      From here you can change the numbering format for entities like:
             a.       Contract (Transaction in this case, as I have changed the entity Contract to Transaction)
             b.      Cases
             c.       Articles
             d.      Quotes
             e.      Orders
             f.        Invoices
             g.   Campaigns



5.      For each entity you can change the Prefix as you like. (Maximum 3 Character).
6.      Number will remain unchanged.
7.      You also can change the suffix length (4/5/6) for each entity (except Articles).
8.      A preview will show you the final format of that auto-generate number after your changes.
9.      Click on OK.



***** Thank You *****

  

Tuesday, January 10, 2012

Add Currency to your CRM Organization

In your CRM organization you can add currency in two ways:
1. Add currency for a particular entity

Monday, January 9, 2012

Some Usefull Video for CRM 2011..............

Overview of MS CRM 2011


===================================================================
Adding a new entity(re saving and viewing the saved data.)



===================================================================
Activities in MS CRM 2011(saving and viewing saved data.)


===================================================================
Workflows(This will assist in creating a workflow to send emails when actions occur.)


===================================================================
Creating Reporting in MSCRM 2011


===================================================================
Outlook Integration


===================================================================
Microsoft Dynamics CRM 2011: Multiple Forms


===================================================================
Creating New Users in Microsoft Dynamics CRM 2011 Online

===================================================================
Using Mobile Express - Microsoft Dynamics CRM 2011


===================================================================
=======================***** Thank You *****=========================
===================================================================

Sunday, January 8, 2012

Microsoft Dynamics CRM document management with SharePoint


In CRM, there has been a constant need for a rich Document Management functionality as documents are commonly used in sales cycle and are associated with opportunities and quotes. Customers also associate documents with products and many other entities. In CRM4, the ability for associating documents with a record has been through attachments which have quite a few limitations. Attachments are a passive store which does not help in collaboration scenarios. Users really need to be able to access documents in context of a CRM record, add more documents, edit and share them.
In CRM2011, this problem is addressed. There is a option provide the ability to associate SharePoint Document locations to a CRM record and hence enabling the ability of accessing documents that are stored in SharePoint within the context of a CRM record. Users can:

a)      Create a new SharePoint location (folder) to start storing their documents in
b)      Use an existing SharePoint location where the documents are already stored.
In this project the Transaction entity is mapped with SharePoint, thus the document uploaded for each transaction can view through SharePoint also. For this purpose please follow below steps:
1. Go into the Settings area and click on  button.
2. Click on the Document Management settings link.



3. Select the entities (Transaction entity in this case) that you want to enable integration on.
4. Enter a SharePoint 2010 Site Collection URL where you have installed the CRM List component.
5. Click on Next.

6. The URL will get validated.
7. Click on Next.
8. Document Library creation happens here to speed up the end user experience. You might get the confirmation dialog based on the number of entities (One in this case) that you have selected on the 1st screen.
9. Once the creation is done, Click Finish
10. Now go to that particular entity records.
11.  open any one Particular record in edit mode.
12. In the window, from Left Navigation click on Documents under Common.
13. Now in the window we have the document Location for any particular Transaction to the SharePoint.

14. By clicking on the New button you can add any document or folder to the SharePoint document location.
15. To Add a folder click on New > Folder.
16. In the Popup window write the name of the folder and click on Save button.
17.Enter your username and password if the system asks you to enter.
18. You can find the folder is created. To create any documents in that folder double click on the folder name.
19. Again click on New > Document.
20. In the Add Document window, browse the file you want to upload.
21. Check the Destination Folder is already given.
22. Click on OK.
23. Now click on thebutton in the top of the list.
24. The SharePoint server will open for that particular Transaction with the document uploaded in CRM.  




***** Thank You *****


Wednesday, January 4, 2012

Create New User in CRM Organization.

To create more than one user in any CRM organization please follow below steps:

From the side navigation click on Settings.


Under System, click on Administration.



In the Administration window, select Users.


Click on New in the ribbon under Records group.



Add Users window is visible, select any of the Security Roles depend upon the user you want to create and then click on Next.



Enter First Name, Last Name and the email address(live ID) of that new user and click on Add. After that click on Next.



By selecting "Add New Users and send invitations now", click on Create New User.




Your New user is created. Invitation mail is send to the new user inbox. login to the system and Happy Working with CRM.



***** Thank You *****














Tuesday, January 3, 2012

Exporting & importing customizations from one CRM organization to another


For this purpose we have created two companies:
1. Company A
2. Company B
We have done some customization in  Company A, now we have to move all that customizations from  Company A  to  Company B. For this purpose please follow below steps:


Step1: 
1. Open  Company A  with proper credentials.
2. Settings > Customization > Customizations.

3. Click on Publishers.

4. Click New to create New Publisher. [N.B. To import / export customizations from one instance to another we need same type of publisher / same publisher.]

5. Write Name, Display Name and all other necessary details.

6. Click on Save & Close.



Step2: 
1. Settings > Customization > Customizations.

2. Click on Solution.

3. Click on New to create New Solution.

4. Write the solution Display Name, Name, Publisher, Version.

5. Click on Save.


Step3:
1. Click on Add Existing.

2. Click on Entity.

3. Select the entities where you have made any changes and want to move its properties to the new instance.

4. Click on OK

5. Select “Yes, include required components” and then click on OK.

6. You can find all the items related to selected entity are listed like below.

7. You can add any other existing items if you required or if you made any changes on those like Site Map (I need this one), Application ribbon, dashboard, report etc.

8. Click on Save.

9. Select all components and publish the solution.

10. Save & Close.




Step4:
1. Click on Publish All Customization.

2. Select the solution and click on Export.

3. In the Export window click on Publish All Customizations and click on Next.

4. Click on Next.

5. Click on Next.


6. With selecting unmanaged, click on Next.


7. Save the zip file.
 


 Step5:
1. After this we have a .zip file which we have to import to the new instance of CRM.
2. Login to another CRM company ( Company B) what we have.
3. Settings > Customization > Customizations.
4. Click on Solutions.


Step6:
1. Click on Import.
2. Browse the .zip file and click on Next.


3. Click on Next.


4. If the import wizard shows Successful message click on close.


5. Click Publish All Customizations.

6. After this if we sign-out and sign-in again to the Company B we can see the effects or all the customizations we have done in  Company A.



***** Thank You *****