Category Archives: Microsoft Dynamics 365 CE

Broadcast announcements in Dynamics 365

Here is next blog on how to create and broadcast announcements to an entire Dynamics 365 CE organization.

Circulate information quickly to a wide set of users at one go by using Announcements in model-driven apps in Dynamics 365, such as Dynamics 365 Sales and Customer Service. Announcements can also serve as message boards, where you can post topics of your interest that you wish to share.

These settings can be found in the Power Platform admin center by going to Environments > [select an environment] > Settings > Data management > Announcements.

Make sure you have the System Administrator or System Customizer security role or equivalent permissions to update the setting.

Create an announcement

  1. Select an environment and go to Settings > Data management > Announcements.
  • On the command bar, select New.
  • Fill in the information, as required.
  • Title (required) – Type a title for the announcement that clearly and unambiguously states the purpose and nature of the announcement.
  • Body (required) – Type the text for the announcement that you want to broadcast.
  • More Information URL (optional) – Type the address of the website that provides detailed information about the announcement.
  • Expiration Date (optional) – Type the date on which you want to stop the broadcast and the announcement should expire.
Note You cannot edit/extend this date after expiry. Model-driven apps in Dynamics 365 deletes the announcement after the expiration date.

Once you are done, choose Save or Save and Close to begin the broadcast.

Broadcast an announcement

Make the announcements available to other users in your organization by using web resources and dashboards.

Create a web resource

  1. In a text editor, type the following code, and save the file as “announcementsondashboard.htm”.

HTML Copy

<html>
<body>
<script type="text/javascript">window.location.href="/home/homepage/home_news.aspx?pagemode=iframe";</script>
</body>
</html>
  • Go to Settings > Customizations > Customize the System.
  • Under Components, select Web Resources > New.
  • Type the name as “announcements” and display name as “Announcements”.
  • In the Type drop-down list, select Web Page (HTML).
  • In the Upload File box, choose Browse and select the “announcementsondashboard.htm” file that you created earlier.
  • Select Save.
  • Add this new web resource to any existing or new dashboard. I have added this to Customer Service Representative Dashboard, and you can see that in the below image.

How to Download a template for data import in Dynamics 365 CE

Here is the quick tip on how to download a template for data import in Dynamics 365 CE.

Some of the customers will be storing the data in spreadsheets, databases, or other systems. They need to import the data into Dynamics 365 Customer Engagement so they can keep track of all your customer information in one place.

They can use the templates for importing many types of records, such as accounts, leads, or cases records into Dynamics 365 CE. There is a complete list in the Templates for Data Import wizard.

  1. Make sure you have the System Administrator security role or equivalent permissions.
  2. Go to Settings > Data Management.
  3. Choose Templates for Data Import.
  • In the Templates for Data Import dialog box, it will list all the entities in the Dynamics 365 CE choose the record type(entity) that you want to download the template for, and then select Download.
  • Select the entity and click on Download. It will download the template in your machine. In this template customers can fill the data and import the data into the Dynamics 365 CE using Data import Wizard.

I hope this blog post helps you. If you are interested to know more on this topic then, I encourage you to check out my blog on this.

How to create Email Signature and use it in Dynamics 365 CE

Here is a quick tip on how to create the email signature and use it in Dynamics 365 CE.

Below are the steps to create the email signature.

Goto Settings > Templates > Email Signatures

Click on new button to create new email signature

Enter your signature and click on save & close

Now, you will be able to see your email signature as below.

Next, I will show you how to insert the signature in email.

Goto Activities -> Click on New email

Please provide the subject and email content. Once you are done click on Insert Signature as below.

Please select the required email signature from the list.

Now you will be able to see your signature in your email.

I hope this blog post helps you. If you are interested to know more on this topic then, I encourage you to check out my blog on this.

ALM – Power Platform – Copy Azure DevOps Build/Release to New Project

Here is my next video on “Tips & Tricks in ALM with PowerApps Build Tools”.

Please do subscribe my channel.

In this video, I have explained how to Copy Azure DevOps Build/Release Pipeline to New Project.

Here is the link for my course on Power Platform – ALM Fundamentals https://powerspark.newzenler.com/

ALM- How to create Service Connection for the PowerApps Build Tools

In this blog, we will see how to create the service connection for PowerApps Build Tools.

Pre-requisite: Azure DevOps

The service endpoint for the source and the target environment that you want to export and import the solution to. For example, https://powerappsbuildtools.crm.dynamics.com. Service endpoints can be defined under Service Connections -> Generic Service Connection in Project Settings.

Navigate to Project Settings -> Service connections -> Click on New service connection.

Select Generic in Service connection

Provide the below details for the generic service connection as follows:

  • Username – Username for connecting to the endpoint
  • Server URL – example. https://powerappsbuildtools.crm.dynamics.com
  • Password – Password/Token Key for connecting to the endpoint
  • Service connection name  – Give the service connection as meaningful name.
  • Description (optional)
  • Security – Grant access permission to all pipelines – Enable

NOTE: MFA is not yet available. May be in the upcoming release Microsoft will add MFA to the service connection.

Once the above step is done, you will see your service connection in the list. You could add multiple other connections to various other environments.

Once the connection is established, you will be able to see this service connection in the PowerApps Build tools task like exporting and importing the solution as follows:

I hope this helps. If you have any challenges in creating “service connection”then please feel free to reach me out to me I am also always happy to assist you on your queries.

If you are interested in this topic and would like to do some further self-study, I encourage you to check out my blog on this.

PCF Control- Video Attachment Control

In this blog, we will see how we can upload the video attachments into D365 using the Video Attachment Control – PCF Control.

The VideoAttachmentControl is used to upload any kind of video file which is of mp4 format as of now. It also lets you have a live preview of the video file uploaded and the files are stored in D365 as notes (Annotation).

Scenario – Once the field technician completes his work in the field, he can capture and upload the completed work as video. Without visiting the site inspector can play the video and review it.

Here is the reference link for the solution files and the source code.

Solution –https://github.com/DharanidharanBalasubramaniam/Video-Attachment-Control/tree/master/Solution

Source Code – https://github.com/DharanidharanBalasubramaniam/Video-Attachment-Control

How to configure:

  1. Import the solution “Solution_managed.zip” into your D365 instance.
  2. If you wanted to add “Video Uploader” to Case, open the Case entity’s, Main form in edit mode.
  3. Create a new field or choose any field which is of type Single Line of Text. For demo, I have created a new field called, description and I will be using this field.
  4. Open the field and click on the “Controls” link.

. Click on “Add Control”, select “Video Uploader”.

6. Check Web, Phone and Tablet radio buttons to get it loaded in all the three devices.

Once the above step is done then you can save and publish the case form. Now, you will be able to see the Video attachment control in your case form as below:

I hope this helps. If you have any challenges in adding “Video Uploader” then please feel free to reach me out to me I am also always happy to assist you on your queries.

If you are interested in this topic and would like to do some further self-study I encourage you to check out my blog on this.

ALM – Power Platform – Tips & Tricks -1.Using secrets from Azure Key Vault in a pipeline

I have started my new series of videos “Tips & Tricks in ALM with PowerApps Build Tools” staring this week.

Please do subscribe my channel.

In this video, I have explained how to use the secrets from the azure key vault in VSTS Build & Release definition.

Here is the link for Power Platform – ALM Fundamentals https://powerspark.newzenler.com/

Powershell scripts to export and import the Dynamics 365 CE solution

In this blog, we will see how to export and import the Dynamics 365 CE solution using the PowerShell script.

In my PowerShell script, I am using Microsoft.Xrm.Data.Powershell.

InstallRequiredModule

This function will check for this module (Microsoft.Xrm.Data.Powershell) in your machine. if not present then it will install this module

EstablishCRMConnection

This function will establish the connection to the CRM by passing the Dynamics 365 CE instance URL, username and password.

Before running the PowerShell scripts please make sure you have updated the below values.

$solutionName ="BuildAutomation"
$SolutionFilePath="C:\Users\DBALASU\Source\Workspaces\BuildAutomation\BuildAutomation.Solutions\BuildAutomation"
$CRMSourceUserName=""
$CRMSourcePassword=""
$CRMDestinationUserName=""
$CRMDestinationPassword=""
$CRMSourceUrl="https://instancename.crm.dynamics.com"
$CRMDestinationUrl="https://instancename.crm5.dynamics.com"
  1. $SolutionName – Name of the solution which you want to export the source instance.
  2. $SolutionFilePath – Desired folder path to export the solution
  3. $CRMSourceUserName – Username of the Dynamics 365 CE source instance
  4. $CRMDestinationUserName – Username of the Dynamics 365 CE destination instance
  5. $CRMDestinationPassword – Password of the Dynamics 365 CE destination instance
  6. $CRMDestinationPassword – Password of the Dynamics 365 CE source instance
  7. $CRMSourceUrl – URL of the Dynamics 365 CE source instance
  8. $CRMDestinationUrl – URL of the Dynamics 365 CE destination instance.

After updating the values in the below script, you can copy and paste in Windows PowerShell and run it. This will establish the connection to the Dynamics 365 CE source instance and export the solution mentioned and import it into the Dynamics 365 CE destination instance.

$solutionName ="BuildAutomation"
$SolutionFilePath="C:\Users\DBALASU\Source\Workspaces\BuildAutomation\BuildAutomation.Solutions\BuildAutomation"
$CRMSourceUserName=""
$CRMSourcePassword=""
$CRMDestinationUserName=""
$CRMDestinationPassword=""
$CRMSourceUrl="https://instancename.crm.dynamics.com"
$CRMDestinationUrl="https://instancename.crm5.dynamics.com"

Set-StrictMode -Version latest
function InstallRequiredModule{
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
$moduleName = “Microsoft.Xrm.Data.Powershell”
$moduleVersion = “2.7.2”
if (!(Get-Module -ListAvailable -Name $moduleName )) {
Write-host “Module Not found, installing now”
$moduleVersion
Install-Module -Name $moduleName -MinimumVersion $moduleVersion -Force
}
else
{
Write-host “Module Found”
}
}
function EstablishCRMConnection{
param(
[string]$CRMUserName,
[string]$CRMSecPasswd,
[string]$crmUrl)
Write-Host "UserId: $CRMUserName Password: $CRMSecPasswd CrmUrl: $crmUrl"
$CRMSecPasswdString = ConvertTo-SecureString -String $CRMSecPasswd -AsPlainText -Force
write-host "Creating credentials"
$Credentials = New-Object System.Management.Automation.PSCredential ($CRMUserName, $CRMSecPasswdString)
write-host "Credentials object created"
write-host "Establishing crm connection next"
$crm = Connect-CrmOnline -Credential $Credentials -ServerUrl $CrmUrl
write-host "Crm connection established"
return $crm
}

InstallRequiredModule

#Update Source CRM instance details below:
Write-Host "going to create source connection"
$CrmSourceConnectionString = EstablishCRMConnection -user "$CRMSourceUserName" -secpasswd "$CRMSourcePassword" -crmUrl "$CRMSourceUrl"
Write-Host "source connection created"
Set-CrmConnectionTimeout -conn $CrmSourceConnectionString -TimeoutInSeconds 1000

Write-Host "going to create destination connection"
$CrmSourceDestinationString = EstablishCRMConnection -user "$CRMDestinationUserName" -secpasswd "$CRMDestinationPassword" -crmUrl "$CRMDestinationUrl"
Write-Host "destination connection created"
Set-CrmConnectionTimeout -conn $CrmSourceDestinationString -TimeoutInSeconds 1000

Write-Host "Publishing Customizations in source environment"
Publish-CrmAllCustomization -conn $CrmSourceConnectionString
Write-Host "Publishing Completed in source environment."

Write-Host "Exporting Solution"
Export-CrmSolution -conn $CrmSourceConnectionString -SolutionName "$solutionName" -SolutionFilePath "$SolutionFilePath" -SolutionZipFileName "$solutionName.zip" 
Write-host "Solution Exported."

Write-host "Importing Solution"
Import-CrmSolution -conn $CrmSourceDestinationString -SolutionFilePath "$SolutionFilePath\$solutionName.zip"
Write-host "Solution Imported"

Write-Host "Publishing Customizations in destination environment"
Publish-CrmAllCustomization -conn $CrmSourceDestinationString
Write-Host "Publishing Completed in destination environment"

I hope this helps.

If you are interested in this topic and would like to do some further self-study I encourage you to check out my blog on this.

CI/CD & Test Automation for Dynamics 365 in Azure DevOps/VSTS -Part 5 – Master Data Deployment

In my previous blog, I wrote about how to set up a gated check-in, In this blog, we will see how to move the master data from source to target instance using our CI/CD pipeline.

Generally, we use the configuration migration tool to move the master data across multiple environments and organizations. Configuration data is used to define custom functionality in model-driven apps in Dynamics 365, such as Dynamics 365 Sales and Customer Service, and is typically stored in custom entities. Configuration data is different from end-user data (account, contacts, and so on). A typical example of configuration data is what you define in the Unified Service Desk for Dynamics 365 to configure a customized call center agent application. The Unified Service Desk entities, along with the configuration data that is stored in the entities, define an agent application.

Note: Disable plug-ins before exporting data and then re-enable them on the target system after the import is complete for all the entities or selected entities.

Master data/Configuration data deployment

undefinedDefine the schema of the source data to be exported: The schema file (.xml) contains information about the data that you want to export such as the entities, attributes, relationships, definition of the uniqueness of the data, and whether the plug-ins should be disabled before exporting the data.

undefinedUse the schema to export data: Use the schema file to export the data into a .zip file that contains the data and the schema of the exported data.

undefinedImport the exported data: Use the exported data (.zip file) to import into the target environment. The data import is done in multiple passes to first import the foundation data while queuing up the dependent data, and then import the dependent data in the subsequent passes to handle any data dependencies or linkages.

Instead of moving it manually we are going to automate this above process using Azure DevOps.

Pre-requisites

  • Please make sure the latest configuration.xml(generated using DataMigrationUtility.exe tool) is generated and placed in the desired input location.
  • Please make sure we have updated the variables (correct connection string, CRM username, CRM password) in both the VSTS build and release definition.               

VSTS Build Definition

We have to create a separate Build Definition for moving the master data from source to target instance. Once the solution movement is done this below build definition should trigger.

In my previous blog, I have explained how to create a new build definition. Please refer to that for creating a new build definition.

What will do – It will connect to the source instance and export the master data using the configuration.xml and push it to artifacts repository

In this Build Definition we have used the following MSCRM Build Tools tasks:

  • MSCRM Tool Installer – Installs the Dynamics 365 tools required by all of the tasks
  • MSCRM Export config migration data – Exports data from a CRM instance using a Configuration Migration schema file (How to prepare configuration schema file).

You have to update the connection string variable name and select the configuration.xml input location.

  • Publish build artifacts – Publish build artifacts to Azure Pipelines

Release Definition

Once the above definition gets succeded, this Release Definition will trigger automatically and performs the following tasks:

  • MSCRM Tool Installer – Installs the Dynamics 365 tools required by all of the tasks
  • MSCRM Import config migration data – Import data exported using Configuration Migration Tool into a CRM instance

You have to update the connection string variable name and select the exported data zip from the artifacts repository(drop).

This will import the master data/configuration data into our Dynamics Online sandbox instance.

In my next blog, we will see how to integrate the unit testing framework with the VSTS Build definition.

If you are interested in this topic and would like to do some further self-study I encourage you to check out my blog on this.

« Older Entries Recent Entries »