Unified Service Desk 3.2.0 released

You can download Unified Service Desk 3.2.0 Version Package Deployer and Executables from the below links,

Name Size Download Link Description
Dynamics365-USD-3.2.0.886-PackageDeployer.exe 86.8 MB Click here USD Package Deployer to install solution components in CRM
Dynamics365-USD-3.2.0.886-amd64.exe 81.4 MB Click here 64 bit USD client
Dynamics365-USD-3.2.0.886-i386.exe 81.4 MB Click here 32 bit USD Client

Click here to see “What’s new in Unified Service Desk 3.2.0

Download CRM 365 V9.X Tools using PowerShell

Follow the below steps to download the Tools,

Step 1: Create a folder in D Drive and name it as “Dynamics_365_Development_Tools

Step 2: Click on Windows, search for Windows PowerShell and open it.

Windows Powershell

Step 3: Type the below command to change the directory.

cd D:\Dynamics_365_Development_Tools

and press Enter.

Windows Powershell Command to Change Directory

Step 4: Copy & Paste the below PowerShell script in PowerShell Window to download tools from Nuget.

$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

Press Enter.

Step 5: Below Tools will be downloaded to D:\Dynamics_365_Development_Tools\Tools Folder.

Development Tools

To get the latest version of these tools, repeat these steps.

Hope you have successfully downloaded Tools from NuGet using Powershell script :):):)

Visual Studio and the .NET Framework for Dynamics 365 CRM Online V9.X

The .NET SDK assemblies for Dynamics 365 (online) are built on .NET Framework 4.5.2.

You can use Visual Studio to build your managed code applications using .NET Framework 4.5.2 or later.

Important

You should build any custom client applications using Microsoft .NET Framework 4.6.2 or later. Starting with the Dynamics 365 (online), version 9.0, only applications using Transport Level Security (TLS) 1.2 or better security will be allowed to connect. TLS 1.2 is not the default protocol used by .NET Framework 4.5.2, but it is in .NET Framework 4.6.2.

Enforcement of this higher standard for security will only be applied to Dynamics 365 (online), version 9.0 at this time. If your clients are designed to connect to any version or deployment type you can prepare by re-compiling the application to use .NET Framework 4.6.2. 

Tip

When installing .NET Framework 4.6.2 on your development computer, be sure to install the developer pack and not just the run-time. This will enable the 4.6.2 framework to be chosen in the New Project dialog box of Visual Studio and in the target framework drop-down menu of the project’s properties.

You can use a Visual Studio Community edition for development.

Step by Step to connect Dynamics 365 CRM Online V9.X using C# Console Application

Follow the below steps,

Step 1: Open Visual Studio and Click on New Project. Click on Visual C# and select Console Application.

Give Name to the Project and click on OK.

Connect to Dynamics 365 Online - Step1 Open Visual Studio

Step 2: Goto Visual Studio Tools -> NuGet Package Manager and click on Package Manger Console.

Connect to Dynamics 365 Online - Step2 Open Package Manager Console

Step 3: In Package Manager Console, Copy & Paste the below command to get the required CRM SDK Dlls and press Enter.

Click here to know the Latest version of the CRM Dlls.

Install-Package Microsoft.CrmSdk.CoreTools -Version 9.0.0.7

Connect to Dynamics 365 Online - Step3 Install CRM SDK Core Tools

Step 4: Latest CRM SDK Dlls are installed in the project’s bin\coretools folder. You can also see the success message in Package Manager Console.

Connect to Dynamics 365 Online - Step4 Add CRM SDK Core Tools to VS Project

Step 5: Right Click on References and navigate to bin\coretools folder.

Add the below Dlls to the Visual Studio project.

Microsoft.Crm.Sdk.Proxy.dll

Microsoft.Xrm.Sdk.dll

Connect to Dynamics 365 Online - Step5 Add CRM and Xrm SDK Dlls

And also add the below and click on OK,

System.Runtime.Serialization

System.ServiceModel

Connect to Dynamics 365 Online - Step5 Add Runtime and Service Model References

Step 6: Add the below namespaces.

using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Client;
using Microsoft.Crm.Sdk.Messages;
using System.Net;
using System.ServiceModel.Description;

Connect to Dynamics 365 Online - Step6 Add Namespaces

Step 7: Copy and Paste the below Code in Main method.

IOrganizationService organizationService = null;

try
 {
 ClientCredentials clientCredentials = new ClientCredentials();
 clientCredentials.UserName.UserName = "<ProvideUserName>@<ProvideYourOrgName>.onmicrosoft.com";
 clientCredentials.UserName.Password = "<ProvideYourPassword>";

// For Dynamics 365 Customer Engagement V9.X, set Security Protocol as TLS12
 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
// Get the URL from CRM, Navigate to Settings -> Customizations -> Developer Resources
// Copy and Paste Organization Service Endpoint Address URL
organizationService = (IOrganizationService)new OrganizationServiceProxy(new Uri("https://<ProvideYourOrgName>.api.<CRMRegion>.dynamics.com/XRMServices/2011/Organization.svc"),
 null, clientCredentials, null);

if (organizationService != null)
 {
 Guid userid = ((WhoAmIResponse)organizationService.Execute(new WhoAmIRequest())).UserId;

if (userid != Guid.Empty)
 {
 Console.WriteLine("Connection Established Successfully...");
 }
 }
 else
 {
 Console.WriteLine("Failed to Established Connection!!!");
 }
 }
 catch (Exception ex)
 {
 Console.WriteLine("Exception caught - " + ex.Message); 
 }
 Console.ReadKey();

Step 8: Right click on the solution and build it. If build is succeeded, Run the application to see the below Message.

Connect to Dynamics 365 Online - Success Message

Note:

Problem: If you face any build issues like the below, while building the project, then use the below solution and resolve it.

Connect to Dynamics 365 Online - Step8 Build issues

Solution: Follow the below steps to resolve the problem.

  1. Change the Project’s Dot Net Framework from 4.5 to 4.5.2, this change is required because latest CRM SDK Dlls needs the 4.5.2 version of Dot Net Framework.

Connect to Dynamics 365 Online - .Net Framework 4.5.2

2. Click on Yes and build the project.

Connect to Dynamics 365 Online - Target Framework Change Message

For more info Click here.

Hope you have successfully connected to Dynamics CRM Online Version 9.X :):):)

How to capture photo and update in Dynamics 365 for Phones App using Javascript CRM Online V9.X?

captureImage invokes the device camera to capture an image

Syntax:

Xrm.Device.captureImage(imageOptions).then(successCallback, errorCallback)

Parameters:

Parameter Name Type Required Description
imageOptions Object No An object with the following attributes: – allowEdit: Indicates whether to edit the image before saving. Boolean. – height: Height of the image to capture. Number. – preferFrontCamera: Indicates whether to capture image using the front camera of the device. Boolean. – quality: Quality of the image file in percentage. Number. – width: Width of the image to capture. Number..
successCallback Function Yes A function to call when image is returned. A base64 encoded image object with the following attributes is passed to the function: – fileContent: Contents of the image file. String – fileName: Name of the image file. String. – fileSize: Size of the image file in KB. Number. – mimeType: Image file MIME type. String.
errorCallback Function Yes A function to call when the operation fails.

Return Value:

On success, returns a base64 encoded image object with the attributes specified earlier.

Note: This method is supported only for the mobile clients. (Dynamics 365 for Phones App in Tablet and Mobiles)

Example:

Capture Photo button is created on Account form and OnClick of the button below function CaptureImage configured.

function CaptureImage() {
 Xrm.Device.captureImage().then(
 function success(result) {
 // Update Image
 updateImage(Xrm.Page.data.entity.getId(), result.fileContent);
 },
 function (error) {
 // Show Error
 Xrm.Utility.alertDialog("Error :" + error.message, null);
 }
 );
}

// This function will update the Image to Account record
function UpdateImage(accountGuid, ImageContent) {
 // define the data to update a record
 var data =
 {
 "entityimage": ImageContent
 }
 // Update the record
 Xrm.WebApi.updateRecord("account", accountGuid, data).then(
 function success(result) {
 Xrm.Utility.alertDialog("Account Image updated", function () {
// Reload Account form to show the updated Image
 Xrm.Utility.openEntityForm(Xrm.Page.data.entity.getEntityName(), Xrm.Page.data.entity.getId());
 });
 },
 function (error) {
 Xrm.Utility.alertDialog("Error while updating Account Image : " + error.message, null);
 // handle error conditions
 }
 );
}

Output: 

1.Open Dynamics 365 for Phones App in Mobile or Tablet.

2.Navigate to Accounts and open any Account record.

3.Tap on Capture Photo button. System or Mobile Inbuilt Camera will be opened and click on Camera icon to capture the photo.

Capture Photo

4. Once photo is captured and saved, you will see the below message. Tap on OK to open the Account record to see the updated image.

Captured Image Updated Message

Hope you learned this new feature :):):)