Search This Blog

Tuesday, July 25, 2017

Business Process stage onChange event

You can’t cancel the stage change using code in a handler for this event

//Put the below code in the onload function of the form
Xrm.Page.data.process.addOnStageChange(onStageChange); 


function onStageChange(ExecutionContextObj)
{
debugger;
alert(ExecutionContextObj.getEventArgs().getDirection()) // alerts "next" or "previous"
} 
This onStageChange method gets trigger when you click next or previous button. But it is not triggered when you click the link of the stage.

Thursday, July 13, 2017

Dynamics CRM SSRS report Visual studio version comparision


Panel
Description
Dynamics 365,2016
·         Microsoft Visual Studio 2015 and SQL Server Data Tools in Visual Studio 2015
·         Microsoft Visual Studio 2013 and Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2013
·         Microsoft Visual Studio 2012 and Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2012
·         Visual Studio 2010 and SQL Server Data Tools
·         To install SQL Server Data Tools, on the PC running Visual Studio 2010 go to the Microsoft SQL Server 2012 Express download page, download the following files appropriate to your CPU architecture and language:
·         ENU\x64\SQLEXPRADV_x64_ENU.exe
·         ENU\x86\SQLEXPRADV_x86_ENU.exe
·         Select the "SSDT" or "SQL Server Data Tools" installation.
2015
·         Microsoft Visual Studio 2012 and Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2012 

-- OR --
·         Visual Studio 2010 and SQL Server Data Tools
·         To install SQL Server Data Tools, on the PC running Visual Studio 2010 go to the Microsoft SQL Server 2012 Express download page, download the following files appropriate to your CPU architecture and language:
·         ENU\x64\SQLEXPRADV_x64_ENU.exe
·         ENU\x86\SQLEXPRADV_x86_ENU.exe
·         Select the "SSDT" or "SQL Server Data Tools" installation.
2013
The following components are required:
·         Business Intelligence Development Studio and Visual Studio 2008 Service Pack 1

-OR-

·         SQL Server Data Tools and Visual Studio 2010
·         On the Microsoft SQL Server 2012 Express download page, download the following files appropriate to your CPU architecture and language:
·         ENU\x64\SQLEXPRADV_x64_ENU.exe
·         ENU\x86\SQLEXPRADV_x86_ENU.exe
·         Select the "SSDT" or "SQL Server Data Tools" installation.
2011
The following components are required:
·         Business Intelligence Development Studio and Visual Studio 2008 Service Pack 1
-OR-
·         SQL Server Data Tools and Visual Studio 2010
·         From Microsoft SQL Server 2012 Express download page, download the following files appropriate to your CPU architecture and language:
·         ENU\x64\SQLEXPRADV_x64_ENU.exe
·         ENU\x86\SQLEXPRADV_x86_ENU.exe
·         Select the "SSDT" or "SQL Server Data Tools" installation.

Download Reporting extension for Dynamics 365, 2016

Download Reporting extension for Dynamics 2015

Download Reporting extension for Dynamics 2013

Download Reporting extension for Dynamics 2011


Wednesday, July 12, 2017

Dynamics CRM DateTime format filter in web API

Dynamics CRM DateTime format filter in web API:
function getODataUTCDateFilter(date) {
   var monthString;
   var rawMonth = (date.getUTCMonth() + 1).toString();
   if (rawMonth.length == 1) {
       monthString = "0" + rawMonth;
   }
   else { monthString = rawMonth; }
   var dateString;
   var rawDate = date.getUTCDate().toString();
   if (rawDate.length == 1) {
       dateString = "0" + rawDate;
   }
   else { dateString = rawDate; }
   var hourString = date.getUTCHours().toString();
   if (hourString.length == 1)
       hourString = "0" + hourString;
   var minuteString = date.getUTCMinutes().toString();
   if (minuteString.length == 1)
       minuteString = "0" + minuteString;
   var secondString = date.getUTCSeconds().toString();
   if (secondString.length == 1)
       secondString = "0" + secondString;
   var DateFilter = "datetime'";
   DateFilter += date.getUTCFullYear() + "-";
   DateFilter += monthString + "-";
   DateFilter += dateString;
   DateFilter += "T" + hourString + ":";
   DateFilter += minuteString + ":";
   DateFilter += secondString + "Z'";
   return DateFilter;
}

"IN" operation in fetch XML on Lookup control AddPresearch

"IN" operation in fetch XML on Lookup control AddPresearch


In the account lookup filter two(n of account) account name:
<filter type='and'>

<condition attribute='name' operator='in'>
<value>Test</value>
<value>ABCD</value>
</condition>

</filter>

Enable and Disable controls inside a tab


 Enable / Disable a Section

function sectiondisable(sectionname, disablestatus) {
    var ctrlName = Xrm.Page.ui.controls.get();
    for (var i in ctrlName) {
        var ctrl = ctrlName[i];
        if (ctrl.getParent() == null)
            continue;
        var ctrlSection = ctrl.getParent().getName();
        if (ctrlSection == sectionname) {
            ctrl.setDisabled(disablestatus);
        }
    }
}


 Enable / Disable a Tab
function tabdisable(tabname, disablestatus) {
    var tab = Xrm.Page.ui.tabs.get(tabname);
    if (tab == null)
        return;
    else {
        var tabsections = tab.sections.get();
        for (var i in tabsections) {
            var secname = tabsections[i].getName();
            sectiondisable(secname, disablestatus);
        }
    }
}