Wednesday, 25 April 2018

D365 CRM Solution Import - The element 'savedquery' has incomplete content -List of possible elements expected: 'LocalizedNames'



Error: 
The import file is invalid. XSD validation failed with the following error: 'The element 'savedquery' has incomplete content. List of possible elements expected: 'LocalizedNames'.'.


Background: 
When a MSCRM solution import fails at system views with "XSD schema validation failed" error 

Root Cause:
When a system view columns/filter/description is modified and added to solution. Sometimes solution export engine excludes the view(savedquery) name. I have noticed this in project service related views.

Fix:
  • Log into the environment where the solution is exported from and open the solution. 
  • Rename the view with some temporary name, then save and publish.
  • Again change the name back to it original state, then save and publish
  • Export again and re-import into destination

D365 CRM - Solution Import - Error occurred while fetching the report - SSRS



Solution Import Error:
Error occurred while fetching the report.

Background:
When a MSCRM solution import fails at reports and the error is something like "Error occurred while fetching the report"

Root Cause:
SSRS server is not up and running or having some issue. The same should also affect execution of reports in that instance. 

Thursday, 29 March 2018

{Know-how}D365 v9 Javascript - ConfirmDialog with custom labels

Below is a quick code snippet and output that can be used for customized confirm dialog

Code Snippet:
 var dialogLabelAndText = { confirmButtonLabel: "Proceed", cancelButtonLabel: "Clear & Exit", text: "This is a Confirmation Dialog", title: "Dialog" };  
   var dialogOptions = { height: 200, width: 450 };  
   Xrm.Navigation.openConfirmDialog(dialogLabelAndText, dialogOptions).then(  
     function (success) {  
       if (success.confirmed)  
         Xrm.Navigation.openAlertDialog({ confirmButtonLabel: "Yes", text: "Process completed!" });  
       else  
         Xrm.Navigation.openAlertDialog({ confirmButtonLabel: "Yes", text: "Exit and Clear Process!" });  
     });  

Output:

Thursday, 15 February 2018

D365 CRM V9 - Plugin Registration tool/SSRS/XRMToolbox connection error - Console App connection Error - TLS1.2


Wanted to pen down this for long time, but with latest info I have, it made perfect sense to share with our community regarding the recent connection errors

What is the issue?
When we try to connect to D365 V9 from Plugin registration tool, the connection fails without any proper error and loops back to organization selection screen or login screen.


What is the root cause? TLS1.2 is used in D365 V9 and older versions of TLS are not supported!
 Well document root cause available here
Some more info around TLS1.2


Available Fixes:
There can be multiple fixes to this issue, simplest one is install the latest version if available but that not an option right now.

Fix1: Get the latest version of Plugin Registration Tool my friend

The following fixes will also work with Console App/SSRS report authoring Extensions and I prefer the registry fix which seems permanent. Somehow XRMToolbox works only with registry fix.

Fix 2:This works only when fiddler is running(Temp Fix)

Note: Need Telerik Fiddler to be installed in the machine
  1. Open Fiddler
  2. Go to Tools in menubar => then select Options or Telerik Fiddler options 
  3. Open HTTPS Tab and look for the highlighted region in below image
  4. If it is missing TLS1.2, add the same by clicking it and save

Fix 3: Copied from Microsoft Article(Suggested fix - Needs Machine Restart)

  • Manually disable RC4 in TLS on systems running .NET Framework 3.5
    The following steps are primarily for customers running .NET Framework 3.5 on Windows 10 (or on Windows Server Technical Preview 3), for which an update is not available. However, for customer running .NET Framework 3.5 on all earlier affected operating systems, the manual steps serve as an optional alternative to installing the available update.
    Note These steps require the use of Registry Editor. Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or view the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe.
    1. Create a text file named strongcrypto35-enable.reg that contains the following text:
      For 32-bit applications on 32-bit systems and 64-bit applications on x64-based systems:
         [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
         "SchUseStrongCrypto"=dword:00000001
      
      For 32-bit applications on x64-based systems:
          [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727]
          "SchUseStrongCrypto"=dword:00000001
      
    2. Run regedit.exe.
    3. In Registry Editor, click the File menu and then click Import.
    4. Navigate to and select the strongcrypto35-enable.reg file that you created in the first step. (Note If your file is not listed where you expect it to be, ensure that it has not been automatically given a .txt file extension, or change the dialog’s file extension parameters to All Files).
    5. Click Open and then click OK
    6. Exit Registry Editor and restart the system.
  • Manually disable RC4 in TLS on systems running .NET Framework 4.5/4.5.1/4.5.2
    Despite the fact that an update is available for systems running .NET Framework 4.5/4.5.1/4.5.2, the following steps are primarily for customers with .NET Framework 4.5/4.5.1/4.5.2 applications running on systems with .NET Framework 4.6 present. For customers running only .NET Framework 4.5, 4.5.1, or 4.5.2, the manual steps serve as an optional alternative to installing the available update.
    Note These steps require the use of Registry Editor. Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or view the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe.
    1. Create a text file named strongcrypto4-enable.reg that contains the following text:
      For 32-bit applications on 32-bit systems and 64-bit applications on x64-based systems:
          HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319
          "SchUseStrongCrypto"=dword:00000001
      
      For 32-bit applications on x64-based systems:
          HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319
          "SchUseStrongCrypto"=dword:00000001
      
    2. Run regedit.exe.
    3. In Registry Editor, click the File menu and then click Import.
    4. Navigate to and select the strongcrypto4-enable.reg file that you created in the first step. (Note If your file is not listed where you expect it to be, ensure that it has not been automatically given a .txt file extension, or change the dialog’s file extension parameters to All Files).
    5. Click Open and then click OK
    6. Exit Registry Editor and restart the system.


Wednesday, 14 February 2018

D365 CRM V9 Troubleshooting TLS1.2 - SSRS report connectivity Error - Report Authoring Extensions

Recently I had to develop an FetchXML SSRS report and found that I was not able to connect to D365 CRM V9 from Visual studio. I have faced a similar issue with Plugin registration tool and the same was sorted with latest version of Visual Studio. But I couldn't find any latest version of Report authoring extensions. Planned to write a quick blog to help fellow developers

What is the issue?
When we try to connect to D365 V9 from visual studio using report authoring extensions, the connection fails without any proper error and loops back to organization selection screen or login screen.


What is the root cause? TLS1.2 is used in D365 V9 and older versions are not supported!
 Well document root cause available here
Some more info around TLS1.2

Available Fixes:
There can be multiple fixes to this issue, simplest one is install the latest version if available but that not an option right now.

The fixes will also work with Plugin registration tool/Console/XRMtoolbox

Fix 1: This works only when fiddler is running

Note: Need Telerik Fiddler to be installed in the machine
  1. Open Fiddler
  2. Go to Tools in menubar => then select Options or Telerik Fiddler options 
  3. Open HTTPS Tab and look for the highlighted region in below image
  4. If it is missing TLS1.2, add the same by clicking it and save

Fix 2: Copied from Microsoft Article(Suggested fix)

  • Manually disable RC4 in TLS on systems running .NET Framework 3.5
    The following steps are primarily for customers running .NET Framework 3.5 on Windows 10 (or on Windows Server Technical Preview 3), for which an update is not available. However, for customer running .NET Framework 3.5 on all earlier affected operating systems, the manual steps serve as an optional alternative to installing the available update.
    Note These steps require the use of Registry Editor. Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or view the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe.
    1. Create a text file named strongcrypto35-enable.reg that contains the following text:
      For 32-bit applications on 32-bit systems and 64-bit applications on x64-based systems:
         [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
         "SchUseStrongCrypto"=dword:00000001
      
      For 32-bit applications on x64-based systems:
          [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727]
          "SchUseStrongCrypto"=dword:00000001
      
    2. Run regedit.exe.
    3. In Registry Editor, click the File menu and then click Import.
    4. Navigate to and select the strongcrypto35-enable.reg file that you created in the first step. (Note If your file is not listed where you expect it to be, ensure that it has not been automatically given a .txt file extension, or change the dialog’s file extension parameters to All Files).
    5. Click Open and then click OK
    6. Exit Registry Editor and restart the system.
  • Manually disable RC4 in TLS on systems running .NET Framework 4.5/4.5.1/4.5.2
    Despite the fact that an update is available for systems running .NET Framework 4.5/4.5.1/4.5.2, the following steps are primarily for customers with .NET Framework 4.5/4.5.1/4.5.2 applications running on systems with .NET Framework 4.6 present. For customers running only .NET Framework 4.5, 4.5.1, or 4.5.2, the manual steps serve as an optional alternative to installing the available update.
    Note These steps require the use of Registry Editor. Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or view the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe.
    1. Create a text file named strongcrypto4-enable.reg that contains the following text:
      For 32-bit applications on 32-bit systems and 64-bit applications on x64-based systems:
          HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319
          "SchUseStrongCrypto"=dword:00000001
      
      For 32-bit applications on x64-based systems:
          HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319
          "SchUseStrongCrypto"=dword:00000001
      
    2. Run regedit.exe.
    3. In Registry Editor, click the File menu and then click Import.
    4. Navigate to and select the strongcrypto4-enable.reg file that you created in the first step. (Note If your file is not listed where you expect it to be, ensure that it has not been automatically given a .txt file extension, or change the dialog’s file extension parameters to All Files).
    5. Click Open and then click OK
    6. Exit Registry Editor and restart the system.


Contact Form

Name

Email *

Message *