Monday, November 23, 2020

Related Process Sessions in Dynamics 365 CRM UCI Mode

One of the missing feature in Dynamics 365 CRM UCI Mode was record related process sessions, due to which locating the process session was a bit lengthy process.

Good news is that Related Process Sessions are now available in UCI Mode. So now we can track process session from specific records.



Note - Please verify whether following components are on the form.


Happy Learning, LET'S SHARE !

Saturday, November 7, 2020

Setup CD using Release Pipeline for Azure Function (Part 5- Azure Function CI/CD)

Pre-requisites

Login to Azure Devops and open Project created in previous post.

1.      Create Pipeline

i) Click on “Releases” in the left navigation menu under “Pipelines” followed by “New Pipeline” button.


ii) We will see the following options on the release pipeline window. Select “Add an artifact”


iii) Select the source build pipeline and click “Add”

      

iv) Configure variables


v) Enable Continuous Deployment Trigger


vi) Add 2 Stages, Develop and Test and configure tasks. To add stages use “Add” button.


vii) Once the stages added, we need to configure tasks for both the stages. Search for template “Azure Functions for .Net” and click “Apply”.


Configure the task with FunctionApp name defined in the variables in step (iv).


Once the configuration completed for both the stages, release pipeline will be ready to use.

viii) To test release pipeline, let’s manually create a release for the previous build [Refer], to do this we need to click on “Create Release” button.


ix) Select the develop stage for manual trigger along with the source build artifacts and click “Create”

Note – This manual step is just for testing, in actuals, once you push code from visual studio your build pipeline will trigger followed by release pipeline thus creating a release automatically. There will be no manual release trigger.

x) Navigate to Releases to see recent release created.


Open the recent release to see the details of the stages. We see the develop stage triggered automatically and succeeded, this will deploy the FunctionApp to Dev resource group in azure.

In addition, we can see “Test” stage is queued, waiting for agent.


Once the agent is available, test stage is triggered, which will deploy the FunctionApp to QA resource group in azure.


Finally, we see, both the stages completed successfully, thus deploying the FunctionApp to both the resource groups “Dev” and “QA” from a single release trigger.


Hope this gives you clear picture of continuous deployment. This completes series Deploy Azure Function via Azure Devops CI/CD Pipelines.

Happy Learning, LET'S SHARE !

Friday, November 6, 2020

Continuous Integration using Azure Build Pipelines (Part 4- Azure Function CI/CD)

 1.      Clone Repository

Login to Azure Devops, open Project, go to Repos and click on “Clone”

Note – Here we are using the repository already created in the previous post


Pop up appears, select Visual Studio in IDE and it will auto redirect to visual studio proctor and opens Visual Studio where you can provide the local repo path and proceed with clone action.


2. Verify Repository Connection

After we clone the repository, we can see project connected to Azure Devops Git Repo under Team Explorer.


3. Add new Function App to the solution

Go to Add new Project, enter name of the project, select location and click “Ok”


4.      Check-in to Repo 
Once we create new project, we can see following files. Put comment and click “Commit All and sync”



Because of last step, following files pushed to remote master branch of the repository.


As we had configured Build Pipeline to trigger on master branch check-in, it will automatically trigger our Build Pipeline. To verify lets navigate to Pipelines from left menu and we see pipeline run is in progress.

Refer [Setup CI using Build Pipelines for Azure Function]



Click on the Pipeline to see the details, here we can see our last commit to the repository which triggered this pipeline.


To see further details, click on the commit record, here we can find details like

  • Repository
  • Branch
  • Start Time
  • Time Elapsed
  • Published Files – This is the Azure Function Zip File published to drop location.


To see further details, click on Agent Job, here we can find each step performed by the Agent.



Once all the steps executed successfully, we get a link to artifact, which contains our Function App in a zip format.


Note - Name of the file is 2.zip because we configured the Name using build Id and we initiated second build. You can give any name of your choice with unique build identifier.


With this, we completed Continuous Integration using Build Pipelines, in the next post we will see about Continuous Deployment using Release Pipelines. Lets move to Step 5.

Happy Learning, LET'S SHARE !

Thursday, November 5, 2020

Setup CI using Build Pipelines for Azure Function (Part 3- Azure Function CI/CD)

 1.      Open Project

Login to Azure Devops and open Project created in previous post.

2.      Create Pipeline

i) Click on “Pipelines” in the left navigation menu followed by “Create Pipeline” button.
 

ii) Pipeline Configuration Wizard will open up. Click on “Use the classic editor”

iii) Select the repository and branch to activate automated builds and click “Continue”.

We will use the Git repository highlighted in step 1.


iv) Search for template “Azure Functions for .Net” and click “Apply”.


v)  We see following predefined tasks in the template

·                  Build Project – This builds the checked-in azure function.

·                  Achieve Files – This creates a zip file of the azure function.

·                  Publish Artifact – This publish zip file to specific drop location. 

Click on Pipeline and provide name, agent pool and Agent Specification

Note – you can use latest agent “windows-2019” also here in example we are using the previous version.



vi) 
To enable continuous integration click “Triggers” tab, check “Enable continuous Integration”, and define the branch filters. This helps to trigger our pipeline automatically when code checked-in to specific branch.
Click on “Save”



vii) Once we click on “Save”, pop up comes to select pipeline location, to save pipeline at root level click “Save” button.

Note - We can also add folder name to group similar pipelines. Here we are saving it to root level.




3.      Verify Build Pipeline

Go back to home and click “Pipelines” to see recently create pipeline.



Build Pipeline is ready, Lets move to Step 4.

Happy Learning, LET'S SHARE !

Wednesday, November 4, 2020

Create Azure Devops Project and Git Repository (Part 2- Azure Function CI/CD)

Prerequisite – Register Free on Azure Devops

Link - https://azure.microsoft.com/en-us/services/devops/

1.      Create a project

To create project, enter project name, type, version control and click on “Create Project”.

Project successfully created, open project.

2.      Create Repository

To create repository, click on “Repos” in the left navigation.

 

Then, select “New Repository” option from fly out menu.


Select Repository type, Repository name, add readme file and gitignore file for visual studio.

Then click on “Create”.

 

3.      Verify created Repository

Go back to “Repos” from the left navigation and we can see repo created with default master branch and two files added to it (readme and gitignore)


Our repository is ready, Lets move to Step 3.

Happy Learning, LET'S SHARE !

Tuesday, November 3, 2020

Create Function App in Azure Portal (Part 1- Azure Function CI/CD)

Introduction –

Here we will create 2 Azure functions, 1 for Dev Environment and 1 for QA Environment.

1)   Go to https://portal.azure.com/ and click on create new Resource and select Function App.


2. Provide mandatory values and click on “Review and Create” button.

Note – If we do not have resource group already created we can create from “create new” button and it will be auto populated as value.


3. Function App successfully created along with dependent resources for Dev Environment.


4. Repeat step 1 and step 2 to create FunctionApp in QA Environment also. We will have Function App successfully created along with dependent resources.


All set, we have created Function App in both the environments. Lets move to Step 2.

Happy Learning, LET'S SHARE !

Monday, November 2, 2020

Create and Deploy Azure Function via Azure Devops CI/CD Pipelines

What is covered in this series?

  •     Create Azure Function in Azure Portal
  •     Create Project and Git Repository
  •     Setup Build Pipeline in Azure Devops
  •     Continuous Integration using Build Pipelines
  •     Setup Continuous Deployment using Release Pipeline

Environments– Let us assume we have two environments dev and test (resource groups) and we have to deploy Function Apps to both the environments through Azure Devops Continuous Integration and Deployment Pipelines.

1)     Create Azure Function in Azure Portal –

This is the first step; here we will add the 2 azure functions in azure portal in each environment dev and test.

 To complete this, follow Step 1.

2)     Create Project and Git Repository

This is the second step; here we will create azure Devops project and create a repository to which our function app will be added later.

 To complete this, follow Step 2.

3)      Setup Build Pipeline in Azure Devops-

This is the third step; here we will configure the build pipeline, which will enable continuous Integration for the code synced to repository.

 To complete this, follow Step 3.

4)     Continuous Integration using Build Pipelines

This is the forth step; here we will add azure function to project using visual studio and sync to repository, which will in turn trigger the build pipeline and thus create an artifact containing our function app. This artifact will be further used by release pipeline to deliver continuous deployment.

To complete this, follow Step 4.

5)     Setup Release Pipeline and Create Release in Azure Devops-

This is the fifth and last step; here is will configure the release pipeline, which will enable continuous deployment for the latest build generated by build pipeline in step 4. Thus resulting in deployment of our function app to both the environments “dev” and “test”.

To complete this, follow Step 5.

Hope this might have given step by step insights to the completed CI/CD process using Azure Pipelines. 

Happy Learning, LET'S SHARE ! 

Sunday, October 11, 2020

Lack of Information in Error Log File UCI Form

Many times, it happens that we get an error or exception message while working on the Dynamics 365 UCI form.

So, to get more information related to the error we download the Log File.

Now at this point of time we struggle to find the information related to error while working on the UCI form.

Below is the comparison between an exception error that will come between UCI form and Classic form.

The reason why I am showing this comparison is because when we download the error Log File on both of the form, we don't find plenty of information in the Log File downloaded on the UCI form.

But in the Classic form we find enough information.

Below is the comparison of generated Log file between UCI form and Classic form.

Above screenshot contains the error related to the external assembly registered i.e. “Newtonsoft.Json”.

Note:  Due to the SANDBOX isolation mode in all MS CRM online versions, registering an external assembly require Merging. Refer: Merger External Assemblies.

Solution

An alternate solution is to enable Trace log and read the error from Plug-in Trace log.

1. Go to Setting -> Administration->System Settings.

2. Go to Customazation and select Exception.

After doing this, whenever we get any Exception, we can go to Plug-in Trace Log and see the error record.

3. Go to Settings -> Plug-in Trace Log.
4. Open the record.

Below is the last Exception Record that was created when we get an Exception error on my screen.

After opening above record we get enough detail as we were getting in Classic forms.


Happy Learning, LET'S SHARE !

Popular Posts