locked
how to find the mscrm version number through javascript RRS feed

  • Question

  • Dear all;

    i want to find out the mscrm version number like whether is mscrm 2011 of mscrm 4.0  through javascript in mscrm 

    Wednesday, September 25, 2013 1:40 PM

Answers

  • I didn't test but you need to check if a new function of CRM 2013 is available, something like this:

    var version = "";
    if (Xrm.Utility.alertDialog !== undefined) {
       // CRM 2013
       version = "CRM 2013";
    } else {
       // CRM 2011
       version = "CRM 2011";
    }


    My blog: www.crmanswers.net

    • Marked as answer by anwar_addi Wednesday, September 25, 2013 6:16 PM
    Wednesday, September 25, 2013 2:44 PM

All replies

  • You can check if Xrm object is defined:

    var version = "";
    if (Xrm !== undefined) {
       // CRM 2011 or CRM 2013
       version = "CRM 2011";
    } else {
       version = "CRM 4.0";
    }


    My blog: www.crmanswers.net

    Wednesday, September 25, 2013 2:05 PM
  • sorry it should be mscrm 2011 and 2013 not mscrm 4.0 how can i find that i am using mscrm 2011 or mscrm 2013
    Wednesday, September 25, 2013 2:19 PM
  • You can query the CRM_Server_Version key on registry: HKLM\Software\Microsoft\MSCRM


    Regards Faisal

    Wednesday, September 25, 2013 2:35 PM
  • I didn't test but you need to check if a new function of CRM 2013 is available, something like this:

    var version = "";
    if (Xrm.Utility.alertDialog !== undefined) {
       // CRM 2013
       version = "CRM 2013";
    } else {
       // CRM 2011
       version = "CRM 2011";
    }


    My blog: www.crmanswers.net

    • Marked as answer by anwar_addi Wednesday, September 25, 2013 6:16 PM
    Wednesday, September 25, 2013 2:44 PM