Thursday, 11 January 2018

D365 V9 CRM SDK - SDK is reborn as Developer Guide - No more SDK download!


Microsoft is coming up with quite a bunch of sensible updates/features everyday. With the evolution around Dynamics space, we tend to witness updates around most of the existing areas and now it includes CRM SDK, 

What happened to SDK? No more SDK downloads!

SDK and the related documentations are replaced by Developer Guide . Developer Guide is a part of  docs.microsoft.com now and has all the needed documentation. 


Makes sense, but what happened to Plugin registration and other tools, bin assemblies and Sample code? 

Don't worry, Everything is still available but as standalone downloads


Where are the the plugin registration and other tools(Plugin registration tool, CrmSvcUtil, Configuration migration, Solution Packager, Package deployer, etc.,)

They are available as NuGet and can be downloaded using power shell scripts. The steps are as follows 

For more info refer this page from Microsoft docs and the below steps are copied from the same,

  1. In your Windows Start menu, type Windows Powershell and open it.
  2. Navigate to the folder you want to install the tools to. For example if you want to install them in a devtools folder on your D drive, type cd D:\devtools.
  3. Copy and paste the following PowerShell script into the PowerShell window and press Enter.
    $sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
    $targetNugetExe = ".\nuget.exe"
    Remove-Item .\Tools -Force -Recurse -ErrorAction Ignore
    Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
    Set-Alias nuget $targetNugetExe -Scope Global -Verbose
    
    ##
    ##Download Plugin Registration Tool
    ##
    ./nuget install Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool -O .\Tools
    md .\Tools\PluginRegistration
    $prtFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool.'}
    move .\Tools\$prtFolder\tools\*.* .\Tools\PluginRegistration
    Remove-Item .\Tools\$prtFolder -Force -Recurse
    
    ##
    ##Download CoreTools
    ##
    ./nuget install  Microsoft.CrmSdk.CoreTools -O .\Tools
    md .\Tools\CoreTools
    $coreToolsFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.CoreTools.'}
    move .\Tools\$coreToolsFolder\content\bin\coretools\*.* .\Tools\CoreTools
    Remove-Item .\Tools\$coreToolsFolder -Force -Recurse
    
    ##
    ##Download Configuration Migration
    ##
    ./nuget install  Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf -O .\Tools
    md .\Tools\ConfigurationMigration
    $configMigFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf.'}
    move .\Tools\$configMigFolder\tools\*.* .\Tools\ConfigurationMigration
    Remove-Item .\Tools\$configMigFolder -Force -Recurse
    
    ##
    ##Download Package Deployer 
    ##
    ./nuget install  Microsoft.CrmSdk.XrmTooling.PackageDeployment.WPF -O .\Tools
    md .\Tools\PackageDeployment
    $pdFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.PackageDeployment.Wpf.'}
    move .\Tools\$pdFolder\tools\*.* .\Tools\PackageDeployment
    Remove-Item .\Tools\$pdFolder -Force -Recurse
    
    ##
    ##Remove NuGet.exe
    ##
    Remove-Item nuget.exe    
    
  4. You will find the tools in the following folders:
  • [Your folder]\Tools\ConfigurationMigration
  • [Your folder]\Tools\CoreTools
  • [Your folder]\Tools\PackageDeployment
  • [Your folder]\Tools\PluginRegistration
To get the latest version of these tools, repeat these steps.


Where are the Sample codes and projects? 

They are available in the following Microsoft docs URL



Where are the assemblies? 

Assemblies are a part of NuGet package like the dev tools. Refer here for NuGet info


Hope this helps!

Source and Reference: Microsoft docs

Monday, 8 January 2018

{Know-How}MSCRM D365 JS - show or hide section using display name or label


Code Snippet to show or hide a Section using display name

Function to show or hide section


ToggleSection = function (tabName, sectionName, isVisible) {
    var tabs = Xrm.Page.ui.tabs.get();
    for (var i in tabs) {
        var tab = tabs[i];
        if (tab.getLabel() === tabName) {
            var sections = tab.sections.get();
            for (var s in sections) {
                var section = sections[s];
                if (section.getLabel() === sectionName) {
                    section.setVisible(isVisible);
                }
            }
        }
    }
};

Usage
ToggleSection("AdminTab","SectionName",false); //Hide
ToggleSection("AdminTab","sectionName",true); //Show

Note: The labels are case sensitive

{Know-How}MSCRM D365 JS - show or hide Tab using display name or label


Code Snippet to show or hide a Tab using display name

Function to show or hide Tabs


ToggleTab = function (tabName,isVisible) { 
    var tabs = Xrm.Page.ui.tabs.get();
    for (var i in tabs) {
        var tab = tabs[i];
        if (tab.getLabel() === tabName) {
            tab.setVisible(isVisible); 
        }
    }
};

Usage
ToggleTab("TabName",false); //Hide
ToggleTab("TabName",true); //Show

Note: The labels are case sensitive

Wednesday, 13 December 2017

{Know-How} MSCRM JS - show or hide Navigation items using display name or Label



Code Snippet to show or hide a navigation using display name

Function to show or hide Navs
ToggleNavigationItem = function (navName,isVisible) {
    var navs = Xrm.Page.ui.navigation.items.get();
    for (var i in navs) {
        var nav = navs[i];
        if (nav.getLabel() === navName) {
            nav.setVisible(isVisible);
        }
    }
};

Usage
ToggleNavigationItem("Accounts",false); //Hide
ToggleNavigationItem("Accounts",true); //Show

Note: The labels are case sensitive

Thursday, 2 November 2017

CRM 2016/15/13 to D365 - Data Migration - Issues with Business process flows and workarounds



Recently I have done few migration projects from CRM 2016 or older version to D365 v9.

Due to the Business process flow architectural update in v9, we have faced few hurdles. Suddenly the blogger inside me wanted to document the same 😈

Here is the Killer error message that occurs while create and update

"The traversed path should end with the new active stage"

What is the fix for the BPF while record create?

Issue anlysis:
Traversed path field is the culprit. This field contains the traversed stages in a business process flow. For some reason the process stages value in traversed path is not in sync with current business process stage hope this happens when we switch between process. This breaks the record create with error "The traversed path should end with the new active stage"

Fix:
Exclude/Unmap the field traversed path from migration and we should be good.

What is the fix for the BPF while record update?
Issue anlysis:
Once the record with BPF get into D365 V9, one more record will be created in related BPF entity for the processid in that record. After this, when we try to update the process via data integration it breaks with above error. This is due to the fact that a process change is not only related to stageid/processid fields and the same involves multiple related BPF entities.

Fix:
Before update clean-up the existing process in related BPF entities for the specific record and then update record.

Contact Form

Name

Email *

Message *