Tag: dynamics crm tutorial

MB2-877 MICROSOFT DYNAMICS 365 FOR FIELD SERVICE MODULE 1 TOPIC – Configure additional options

This is the 5th blog of this series, before this I have created a blog on the topic “Configure bookable resources”  from Module 1 which you can check here :MB2-877 MICROSOFT DYNAMICS 365 FOR FIELD SERVICE MODULE 1 TOPIC – CONFIGURE BOOKABLE RESOURCES

In this blog we will cover up the topic from the module 1 “Configure additional options

  1. Configure territories and organizational units
    You can create territories for your resources in field service.Now, remember that traditionally when you’re using territories with Dynamics 365, you’re really just dealing with one territory per resource.  But in this situation, a resource might service multiple territories.  So I do have the capabilities to add multiple territories in here based upon my specific situation. To add a territory go from field service > Field Service Settings  > Territory :
    Click on “Add new territory” and fill out below information such as “name” and manager which is optional:

    Once you save and close this territory now you can go and assign this to your resource by following below steps. Open Resource and click on “Related” Tab and select “Resource territory.” Finally say add a new resource territory which will help you to use the recently created territory:

    Save and close:

    Organizational Units.
    Below are the main points on organization units before we configure them:
    a. They are Different from Business Units

    b. Organizational units represent how your consulting company categorizes its different businesses.

    c. Each Organizational Unit can have Latitude and Longitude define to assist in the scheduling process.

    To Configure an orgnizational units go from field service > Resource Scheduling >  Organization Units and click on add new organization unit:

    Add below information and save and close. Later you associated this with a resource:

  2. Identify skills types
    Now when you are setting up your resource you might want a placeholder to say this resource has this skill i,e a consultant or technician etc.  To Define a skill or characteristic for a resource  go From Field Service > Resource Scheduling > Resource Skill and click on New > Add required field such as name of the skill and select the type as “Skill” > click on save and close:

    Post this this, it will be available to be associated to the resource. from your resource click on ” Field Service” Tab and in the “Resource Characterstics” Subgrid , click on New. Look for the skill that we have created and click on Save:

  3. Configure characteristics and skills & Configure proficiency models below are useful points about characteristics/Skill:
    a. Skills / Characteristics are used to define areas in which resources are proficient

    Can be broken into two types:

    • Skill
    • Certification

     b. Used with proficiency models to denote a specific skill level in an area.

     c. Proficiency model is look up to additional values can be added or removed.

    Before configuring Characteristics and skills we will first have to define a proficiency model as this is linked to a skill. You can configure a new one but i am going to use standard out of the box rating model by going to field service > Resource Scheduling > Proficiency Model:

    Open the default existing model and you will field like min and max rating and also a sub grid below which actually tells the rating:

    Now if you want to lets say customize it and would like to add a new rating ‘Expert’ what you will have to do is first make the max rating to ‘4’ so that 4 rating can be added. To that and save the record and what it does it add 4 options to the  grid and ask you to enter the names for 4 rating:

    select each rating and edit the label and we are ready to go and configure a characteristic to do this follow the steps given in the 2nd step above ‘Identify a skill type’ wherein i have added a characteristic as ‘Technical Consultant’.  Now if you go to resource and add characteristic for it you will add the skill as ‘technical consultant’ and rating value as well which we defined.

    One Important Point : We have been talking about Characteristic & Skill alot but on the grounds these two are exactly the same so dont get confused.

  4. Implement resource roles and categories
    This option allows you to define what specific roles that a particular resource is going to play inside your organization.  few points:

    a. Define the role that a resource can play within an organizationb. Can be used for filtering on the Schedule Board

    c. Often used with Project Service Automation to define generic place holders for needed resources on projects

    To add a Resource Role/Category, go from field service > Resource Scheduling >  click on Resource Roles:

    add below information such as name, I have taken as ‘trainee‘ and other details such as utilization and Billing Type etc and click on save &  close:

    Now you will be able to associate this to a resource.

    One Important Point : We have been talking about Roles & Category alot but on the grounds these two are exactly the same so dont get confused.

  5. Explain differences between organizational units and business units They are very much different. The major difference between them is that a traditional business unit drives the security structure of you dynamics crm however an organizational unit is just a placeholder for categorization  of your business.
    That’s it for this blog, I will see in the last topic of this module in the next blog.


Handle Boolean/Two Option Fields In Scribe Data Migration/Bulk Update

I know many CRM developer get into Data migration or bulk update operation from CRM system to other external/CRM system.

I have gathered few useful tips while dealing with boolean fields as in how to check the value , reverse the value , use nested if with OR & AND conditions etc. I have categorised them into below and provided explanation & solution.

  1. Check Values from Source & Set New Value 

    To check value of a boolean field from source do this and set other value:

    IF(S1=1, 0 , 1)

    (Here i am checking if S1 field value is “1” which is “TRUE” then set the new value to “0” which is “FALSE” otherwise the default will be to “1”.)

  2. Check Combination of boolean fields and Set New Value

    To check the combination of values i.e If a=1, b=0 then set some new value, Do this:

    IF(AND(S1=1, S2=1), 0 , IF(AND(S1=0, S2=0),1 ))

    (here i am checking if S1=1 AND S2=1 then outcome should be “0”.
    please note: you can use “OR” operator as well as per your requirement.)

  3. Check If the value is Null or Any error in retrieving the value and set default value

    You might have to handle null values in the package, to do this:


    (here I am checking if S1 is null or any error then i am setting the value to TRUE otherwise FALSE.)

    you can also combine this with checking other values to such as if S1 =1 then 1 , S2=0 then 0 & if S2=Null then TRUE().

    IF(ISERROR(S1),TRUE(),IF(OR(S1 =1 ), 0,IF(OR(S1=0),1)))

    I hope this helps! I will try post help blog on other types of fields.

Error While Connecting To CRM Online Using Kingsway SSIS Connector


I have recently got this error when i was preparing an SSIS package for Dynamics CRM 365 Online and used Kingsway SSIS connector.



After digging in further this error is mainly caused by the request and reponse timings,So, when i checked i found out my system time was somehow 5 minutes ahead of the current time, hence the request going to CRM server was of a future time and hence this error showed up.

All i had to do is fix my system time. Sometimes even if your system time is fine, you might still get the error, In that scenario too try to change the time as 5 minutes less.


Once i did that -my organisation name popped up without any issue.


Hope this helps!



———- is not a valid status code for state code entity

Often you see this error in your plugin or Webapi actions when you trying to play with the status and status reasons in microsoft dyamics crm.

so, lets understand this.

Suppose i have below status and status reasons:


as you can see there is a set of status reason you can only combine with and “Active” Statecode and some with “Inactive” statecode.

So ,if you have a status reason which belongs to an active statecode but you use it with an inactive statecode and vice versa, you will be presented with this error.

and in the error first line you can actually see what optionset value it is talking about.

i hope this helps.


Color Subgrid in Microsoft Dynamics CRM 365

Microsoft dynamics CRM is definitely turning colorful and interesting(has been always to me but in terms of look and feel). Recently subgrid’s in CRM have taken a full swing be in terms of editing them or looking colorful.

I tried something with my dynamics crm 365 trial and this is how it looks :


Now if i talk about above picture – it is actually a combination of Out of the box feature and UNSUPPORTED feature.

  1. The header of the subgrid can be configured to use any color by clicking on subgrid properties from form editor like below:color2.PNGto make the most of out of this color option you need to know the exact hexa/html code of the color, i used this website to get the code : http://htmlcolorcodes.com/colo3
  2. For the second feature i have actually used unsupported javascript below :
    function subGridOnload()
    var grid = $('#contactcasessgrid'); //Replace Grid name here
    if (grid == null)
    {                            // delay one second and try again.
    setTimeout(subGridOnload, 1000);
    if(grid[0] == undefined)
    // delay one second and try again.
    setTimeout(subGridOnload, 1000);
    if(grid[0].control == undefined)
    // delay one second and try again.
    setTimeout(subGridOnload, 1000);
    if(grid[0].control == null)
    // delay one second and try again.
    setTimeout(subGridOnload, 1000);
    if (grid[0].control.get_totalRecordCount() == -1)
    // delay one second and try again.
    setTimeout(subGridOnload, 1000);
    // logic Replace status names and colours as required
    $('#contactcasessgrid td').filter(function() {
    return $(this).text() == 'Resolved';
    }).closest('tr').css('background-color', 'Green');
    $('#contactcasessgrid td').filter(function() {
    return $(this).text() == 'Active';
    }).closest('tr').css('background-color', 'Red');

    As seen in the above code , i am assigning Green color to Resolved cases and Red color to Active cases on the subgrid.

    you can read any value in the subgrid and apply any color to it.

    hope this helps.


Learn Microsoft Dynamics CRM – Basics, Customization & Configuration


In office, while i am blogging or in dynamics community ; i always get this question that how a fresher can start learning CRM. Well let me tell you learning CRM is very easy since it is a Microsoft technology in which we have been living & using from our outlook to windows.

Well on internet ; information is pretty much distributed and in bits & pieces but i have collected the below information in sequence on how you  can you start from zero and go till 100 🙂

  1. First things first you should know what is CRM , well according to microsoft definition is :
             crm definition.PNG

    “CRM solutions streamline processes and increase profitability in your sales, marketing, and service divisions. A strong CRM solution is a multifaceted platform where everything crucial to developing, improving, and retaining your customer relationships is stored. Without the support of an integrated CRM solution, you may miss growth opportunities and lose revenue because you’re not maximizing your business relationships.”

  2. Next i would suggest you to see above everything in action :  https://www.chalkstreet.com/microsoft-dynamics-crm-tutorial    ,  https://mva.microsoft.com/en-us/training-courses/introduction-to-microsoft-dynamics-365-17593?l=J6OdOYtqD_906312570
  3. Once you have done this – i think you will be pretty much comfortable having your own CRM environment to get your hands dirty in, therefore go ahead and get your trial :https://trials.dynamics.com/
  4. Time to know how CRM can be available to you(to be technical “deployment options available in CRM”) :  https://www.powerobjects.com/2015/10/21/upgrading-crm-crm-online-vs-on-premises-finding-the-best-fit-for-your-organization/
  5. Once you understood all above, my suggestion for you is to now understand the core concepts which makes the whole CRM :


In this tutorial you will learn about what are the core components of  CRM like Entities , Fields, Forms, Business process flows etc. This blog also pretty much explains how you can customize the crm.

6. Now go though this blog and do same in your trial version :


i will talk about customizing, fields, forms , entities , charts, dashboards,solutions etc.

7. Security model – Now this is a major topic which you must understand very well without which it will be very difficult for you to master dynamics crm else you will be missing out on very small/minor things during your career


8. Now , one of the main features of crm is “Processes” , processes are the main component in CRM which helps you to perform actions based on your needs :

a. business rules :  http://www.inogic.com/blog/2016/12/business-rules-dynamics-365/

b. Workflows :  https://crmbook.powerobjects.com/system-administration/processes/workflows/

c.Plugins :  https://crmbook.powerobjects.com/extending-crm/plug-in-development-and-workflow-extensions/plug-ins/developing-a-plug-in/

9.Apart from it most of the stuff you would do through JavaScript which you coudnt  using business rule, mainly javascript is used to perform complex logics else i always recommend you to use business rules  :  https://www.youtube.com/watch?v=wxMB-cIQPUw


if you go through all of the above carefully , you will be in a position to work on dynamics crm confidently.

Please leave your comment if i have missed out anything major or you have any question, need guidance on any of the topics above.

happy crm learning, cheers!