Archives / 2015 / September
  • Get Record Count in Microsoft Dynamics CRM

    Get Record count is a tool   Download from here.

    This tool run under the windows operating system, this tool is used to get the record count of the Dynamic CRM entities. Using this tool we can find

    1) Total Record Count Of the entity

    2) Owner wise Record count of the entity

    3) Status wise record count of the entity

    Why we should use this Tool:

    The advantages of this tool are

    • Status wise count
    • Owner wise count
    • Total count

     Total Record count: To know the record count of the entity Go to advanced find and we can see the count of the entity at left bottom corner. But if the count exceeds to 5000 it will show you 5000+, at that situation this tool will help you to give you the Total record count.

    Status wise count: Status wise count means, every record will have status in the entity. If user wants to know the status of each records that were present in the entity there is no proper way to get it. So in this scenario this GetRecordCount tool is developed to get the status wise record count.

    Owner wise Count: For each and every record there will be an owner for the particular record. If user wants to know the owner wise count it will be a long procedure to find through CRM, so this tool is developed to get the count easily.

    This tool also provides one more feature; simultaneously user can get the source and destination CRM count also. That means whenever user wants the count difference between two CRM s it is obtained by using this tool. Generally while doing migrations it is very helpful to know the amount of data migrated.

    How to use the Tool:

    In order to get the count first user need to login to the CRM. One needs to login with the credentials of CRM .Initially user needs to select the choice of the count to display, for only single CRM or for Source and Destination CRM. If user want to get the single CRM count select “single CRM” radio button or if user want source and destination CRM count select “Source and destination CRM” radio button.


    • After successful login a popup window appears as below.


    In this window there will be three check boxes “Total count”, ”Owner wise count” and “Status wise Count” .Count will be generated by selecting all the check boxes or else a single checkbox is selected in order to generate count or two checkboxes simultaneously.

    The entity choice Dropdown has two options “Selected Entities” and “All entities”.


    If “All Entities” option is selected, count for each and every record count will be generated in the CRM. And if “Selected Entities” is selected and by clicking on Get Count button another popup window will be open to select the entities of user choice..


    • Select the entities of user choice and click on OK button.
    • After the count is generated a message is displayed below as “Get Count” button.



    A popup window with an excel sheet is opened which contains record count. For each type of count it will generate separate tab.


  • Global Option Set in Microsoft CRM

    Option set is a type of field in an Entity. It shows set of Options. If an Option Set field is taken in the form it will be displayed as a drop-down list control. Sometimes we call Option sets as Pick lists. For Example in CRM4.0 we called Option set as Pick list.

    Option Sets are two types

    1) Global Option set

    2) Local Option set

    Global Option Set: Global Option Sets are used in one or more than one Entity. User can use it globally. If same option set field is required in two entities then there is no need of creating two option sets in two entities as only one option set can be created Globally and an user will be able to use it. This is the main use of Global Option set.

    Local Option Set: A Local Option Set is used within the Entity itself. This option set cannot be used for the other entity in the CRM.

    How to Create Global Option Set:

    Path: Go to > Microsoft CRM Home Page-> Main Settings – >Customizations – >Customize the System –> Default Solution- >Option Sets


    • In the above image an “Option Sets” is seen in default solution Components.
    • Click on Option Sets a pop window appears as follows.


    • In the above image Click on “New”.
    • After clicking on “New” button a popup window appears, all the required fields in that popup window need to be filled. See the below image


    • In the above window there are four fields that are required to be filled

    1) Display Name

    2) Name

    3) Label

    4) Value

    • After filling all those details click on “Save” and publish it.
    • It creates a new Option set. Now it can be used in any Entity in MS CRM.
    • A newly created Global option set is seen as below.


    How to use Global Option Set in Entities:

    • Go to default solution –> click on Entities select any entity (Ex: Account) – >click on fields and create a new Option set field.
    • Click on “New” button and a pop window appears as below.


    • In the above image an existing Option Set is used i.e. Global Option Set.
    • In the above image there is a field called “Use Existing Option Set” with two radio buttons displaying in red color.
    • Click on “Yes”. An “option set” with the combo box will be displayed. It contains all the Global Options Sets. Existing Global Option Set can be edited by using “Edit” button.
    • A required Global option set is selected from the drop down.In the above image we “Test Global Option set” is set as an option set for Account Entity.
    • That means “Test Account Option set” contains all the set of Options of the “Test Global Option Set”.
    • Finally click on “Save and Close” and add this option set field in the Account form and click on publish customizations.


    • An Option set can be seen in the record of Account Entity .
    • In the above image “TestAccountOptionset” Option set field contains three options i.e test1,test2,test3
    • These three options belong to “Test Global Option Set”. In this way a Global Option Sets can be used as a set of Options in a required Entity’s Option Set options.

    Create a Global Option Set By using C# Coding :

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.ServiceModel;

    using System.ServiceModel.Description;

    using Microsoft.Xrm.Sdk;

    using Microsoft.Xrm.Sdk.Client;

    using Microsoft.Xrm.Sdk.Metadata;

    using Microsoft.Xrm.Sdk.Query;

    using Microsoft.Xrm.Sdk.Discovery;

    using Microsoft.Xrm.Sdk.Messages;

    namespace GlobalOptionset


    public class GlobalOptionSetCreation


    IOrganizationService service = ServiceHelper.ServiceProxy;

    private const int _languageCode = 1033;

    private const String _optionSetName = "mtcem_testglobaloptionset";

    public void TestGlobalOptionSet()




    // Define the option set to create.

    OptionSetMetadata setupOptionSetMetadata = new OptionSetMetadata()


    Name = _optionSetName,

    DisplayName = new Label("Test Global Option Set", _languageCode),

    Description = new Label("An Example for Creating Global Option Set", _languageCode),

    IsGlobal = true,

    OptionSetType = OptionSetType.Picklist,

    // Give the list of Options

    Options =


    new OptionMetadata(new Label("Test1", _languageCode), null ),

    new OptionMetadata(new Label("Test2", _languageCode), null ),

    new OptionMetadata(new Label("Test3", _languageCode), null )



    CreateOptionSetRequest createOptionSetRequest = new CreateOptionSetRequest


    OptionSet = setupOptionSetMetadata



    Console.WriteLine("Global Option Set is created");


    // Catch any service fault exceptions that Microsoft Dynamics CRM throws.

    catch (FaultException<Microsoft.Xrm.Sdk.OrganizationServiceFault>)









    Microsoft Dynamics CRM can be personalized according to user’s requirements and preferences. For instance user can the set the login page to their preference as soon as they login in to the CRM. Many such options can be personalized such as Email, currency, date etc..


    • By clicking on options a window appears as below:



    • Default Pane: User can set the default page after logging into CRM. For example one can set as SALES from the drop down.
    • Default Tab: User can set the default tab for the selected pane. For example Accounts.
    • Records per page: Select the maximum number of records per page ranging from 25 to 250.
    • Advanced Find Mode: By default every time user open the query details are hidden. To see the query details every time, select Detailed.
    •  Time Zone: Time Zone can be set according to users region.
    •  Currency: Select the default currency value for every financial transaction.
    • Support High contrast Settings: By enabling this it increases the contrast levels of CRM display.



    Synchronize Microsoft Dynamics CRM items or with Outlook Exchange

    •  Filters: Synchronization between CRM and Dynamics CRM for outlook to choose the records.
    • Synchronized Fields: Synchronized fields can be viewed between CRM and Dynamics CRM for outlook.

    Manage your offline filters and take your information offline in CRM for Outlook

    •  Offline Filters: A set of data can be chosen to work with whenever user goes offline with dynamics CRM for outlook.





    • Default calendar: A default day, month, year can be selected for a calendar view.
    • Start and End Time: Start and end time has to be chosen to indicate the availability.








    Current Format; Shows the current region and its formats for Number, Currency, Time, and Date.


    Customize: Select this option to add new formats to Number, currency, Time, Short and Long date.


    Email Template



    Create and modify personal email templates: Create a New email template with a new date and signature, So that a user doesn’t have to enter repeatedly the same information whenever user sends an Email.




    Select whether other users can send email for you: Enable this to allow other Microsoft Dynamics CRM users to send email on your behalf.

    Caution: If a user choose this option, other Microsoft Dynamics CRM users will be able to send email messages with or without your knowledge that display you as the sender.

    Select the email messages to track in Microsoft Dynamics CRM: Select the email messages that automatically get tracked in CRM.

    • All Email Messages.
    • Email messages in response to CRM email.
    • Email messages from Leads,Accounts and contacts.
    • Email messages from CRM records that are email enabled.


    Automatically create records in Microsoft Dynamics CRM: Select this option to allow CRM to create leads or Accounts automatically from the information in tracked email messages.




    Select your error notification preference: Choose an option, as the error reports that occurs are shared with Microsoft for the improvements of products.

    • Ask me for permission to send an error report to Microsoft.
    • Automatically send report to Microsoft without asking me for permission.
    • Never send an error report to Microsoft about Microsoft Dynamics CRM.



    Select the language you prefer to see Microsoft Dynamics CRM displayed in:

    • Base Language: It is set during the installation of the CRM once it is set up it can’t be changed.
    • User Interface Language: Choose the language that has be displayed for labels and dialogue boxes in the CRM user interface.
    • Help Language: Select the language for help.


    Finally Click on OK

  • IMAGE FIELD IN Microsoft Dynamics CRM

    IMAGE FIELD IN Microsoft Dynamics CRM

    Sep 14 2015 11:23 AM

    Image field is a new feature in CRM 2015.Image fields are displayed for an entity for each record in the application. An entity can hold only one image for each record.

    An image can be set up only for Accounts and Contacts in system entities. And in custom entities it can be set up for entities to which an image is to be displayed.

    To upload a picture to the contact:

    • Navigate to sales -> Contacts


    • Click on the contact to which an image is to be uploaded


    • Click on the image a window appears as below:


    • Click on browse to select an image from the file.



    • Select am image from the file and click on Open.



    •  Finally click on OK


  • Date and Time Field in MS CRM 2015

    Here a new setting is introduced called “Behavior” for date/time fields in Dynamic CRM 2015, user can be able to set Date Time field with different time behaviors.

    You can see the below image.


    Following are the behaviors:

    • User Local
    • Date Only
    • Time-Zone Independent


    1. User Local:

    When the Date Time behavior is set as User Local and format is Date and Time then the time displayed will be as per the user time zone. For example you can find the below screen shots below.


    In the above screen shot for "Visit Date” field we have set the date and time behavior as “User Local”.

    So when this field is set it will be shown as per the user time zone settings as follows –



    In the above two screen shots you can find that the “Visit Date” field displays different time for both users because they both are from different time zones. This emulates the behavior of all date/time fields in Dynamics CRM prior to these new enhancements. All existing date/time fields in CRM are set as User Local by default. You will need to go and manually edit the behavior of the field if you would like it to behave as any of the following two behavior types.

    2. Date Only:

    For date only field since only date is displayed it has no effect of the user time zone. There is no time conversion done to show this value on CRM form. It is stored just as is entered and returned when requested.



    In the above two screen shots “Visit Date” field shows same date as 9/9/2015 but time is not showing.

    But here both the users are from different time zones but then still it is displaying same date. This is the use of “Date only” behavior.

    3. Time-Zone Independent:

    In below screen shot you can find that the values for “Visit Date” field which is given as Time-Zone independent behavior. It shows same date time for both users although they lie in different time zones.


    Note-1: When the behavior of a field is “Time-Zone Independent, “field values are displayed with no time zone conversion. The date and time values are stored and retrieved as specified in the UI and SDK. The behavior of this field can’t be changed once it’s saved.


    Note-2: All values for this field are currently stored in the UTC time zone format. If you change the behavior of the field, the value will no longer be converted to the current user’s local time zone. As a result some date and time values may change, you should review all the dependencies of this field, such as business rules, workflows, and calculated or rollup fields, to ensure that issues won’t occur.


    In the above two screen shots you can observe in the first screen shot we set as time zone (GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi format. And in the second screen shot we set time zone as (GMT-08:00) Pacific Time (US & Canada). Here we have to observe both users are in different places and using different time zones then also we get same date and time. So this is the use of Time-Zone Independent behavior.

    By using below Code we can retrieve the exact date and time of the Record. Here we using this code in plugin. According to your requirement you can use.

    DateTime EventDate = currentEntity.GetAttribureValue<DateTime>(“mtcem_visitdate”);

    Guid _userId;

    WhoAmIRequest systemUserRequest = new WhoAmIRequest();

    WhoAmIResponse systemUserResponse = (WhoAmIResponse)service.Execute(systemUserRequest);

    _userId = context.InitiatingUserId;

    WhoAmIRequest req = new WhoAmIRequest();

    WhoAmIResponse res = (WhoAmIResponse)service.Execute (req);

    RetrieveUserSettingsSystemUserRequest reqU = new RetrieveUserSettingsSystemUserRequest();

    reqU.ColumnSet = new ColumnSet(true);

    reqU.EntityId = _userId;

    RetrieveUserSettingsSystemUserResponse timeZone = (RetrieveUserSettingsSystemUserResponse)service.Execute(reqU);

    EventDate = EventDate.AddMinutes(-((int)timeZone.Entity["timezonebias"]));


    With these enhancements it would be a little easier to manage the date and time and avoid unnecessary conversions to get it to work.

Please Wait