<img src="https://secure.leadforensics.com/133892.png" alt="" style="display:none;">

 

The challenge

I recently got a requirement from a Microsoft customer engagement (Dynamics 365) client to manage publishing (export/import) of solutions among diffrent environments (from Dev to Test, QA and PROD). The client wanted to restirct use of PowerApps admin center and CRM for solution publishing. The need arised becuase the client was enterprise and CRM was intergral part for their sales and services operations and they needed to track what has been implemented, who implemented, changes and fixes with existing and new solutions. On top if it, they wanted a new application for solution publishing like, with a single click they are able to publish it to other CRM environments. After some discussions they wanted the application to be more interactive and responsive so that they can see the publishing results and be notified, applicaiton can be accesible from anywhere, any device, be able to share securely with other departments in the organization (Office Groups).

The Solution

No question, PowerApps was the way to go for application as per their requirment, but next question was how we going to automate crm solution deployment among crm instances. Well there are others solution available but thanks to Power Platform Build Tools for DevOps which solves our automatic solution deployment with source control. They are also helpful for versioning and deploying PCF controls for future. After quick demo of Build Tools to client we agree on making and defining new Build and release pipelines for CRM Test, QA and PROD instances with funtionality of Continuous deployment trigger (means whenver we have new build aritcraft a release pipeline will trigger and deploy solution except for PROD which needs approval first).

But next challange was how we going to queue the builds for CRM deloyments, here Azure DevOps API comes to rescue us, which come as .Net Client Libraries and  Rest API flavors. Just to save time (demo) I go with .Net client libraries with PAT authentication method but you can read this document for token authentication. PAT is also helpful in restircting access to DevOPs Project. Please note in appsetting.json the CollUrl refers to url of your devops organization (https://dev.azure.com/{yourorganization}).

 But how do we use Azure DevOps API directly into our application that was a challange and what if we want to use this Azure DevOps API in our existing application in way we want, how we can do that. So I decided to wrapp the DevOps API into our own ASP.Net Core 3.1 WebAPI and later expose this as Custom Connector into organiation, so our PowerApp can use it. Why we build our own WebAPI becuase we have some internal operations to perform along with solution deployment for example, notifications in Jira or DevOPs workitems linked to story or parent workitems and attachemnts etc.

Here is the plain source code of WebAPI (controllers for Build Operations and WorkItems).

Please note here, if I just barely need to call pipeline from any application, then that is possible through some webhook like Azure function or Power automate but as I mentioned we want our application to be more interactive and responsive that is why it is exposed as Rest API. Here is simple screenshot of our PowerApps Custom Connector based on our WebAPI controllers.

The Application (PowerApp):

Enough talking, time to show what we have done so far. Here I will just show screen shots of PowerApp with sequence number and WebAPI operation behind. Please note the screen shot contains dummy data just for understanding what happenings.

Now we have DevOps project and pipelines selected, now it is time to select a solution and deploy it to one or more CRM instances.

Now next screen will show the status and logs of executing pipeline.Please notethe screen below shows end result but in reality the result will be displayed as long as the pipeline executes. For example the status changes from Queued -> InProgess -> Completed/Failed. I use timer control to fetch status as the pipeline executes. I recommend use of PowerAppsConcurrentfunction if you want stablity in http requests and then loading result in controls in a sequence.

Here is link for very basic Azure Pipelines for Dynamic365. YAML. Just to give you an idea to start and you can customize according to your needs.

Azure Pipelines for Dynamic365

Finally my goal for this post is just to share my experience and sure, there are endless possibilities with DevOps API as you queue any type of pipelines for open source frameworks and technologies (non microsoft) not even from jsut from PowerApp.

Feel free to contact me if you need any informaiton about technology we use so far and feel free to use source code of WebAPI on github. even you can extend it to your needs, there are lot of functions I have not mentioned here.

Happy CRMING and DevOps 😊

 

Abonner på bloggen!

Diskuter dette innlegget

Tips til lesing

Landskapet markedsførere opererer i gjennomgår dramatiske forandringer som en konsekvens av AI-revolusjonen vi opplever i dag. Samtidig er kundenes forventninger stadig i endring. Hvordan kan kunstig intelligens og maskinlæring hjelpe deg som markedsfører med å navigere i denne nye virkeligheten og effektivt nå dine kommunikasjons- og konverteringsmål?
We are constantly maturing as consumers in digital sales channels and place higher demands on good user experiences. Therefore, we have developed a health check where we map the quality of user experiences and the user-friendliness of e-commerce solutions.
It is always great to find ways to enhance our productivity and creativity. One such way is by integrating ourselves with advanced technologies like GPT (Generative Pre-trained Transformer). I am going to share my journey of working alongside GPT as a team, focusing on how it has added and increased my abilities and helped me deliver on various work tasks. I am sharing examples of how I use GPT throughout the day and the process I follow to become one with GPT. I have built my own GPT co-pilot setup with various Python applications and integrations, bringing automation to the next level. But all the examples below can be executed without any such extra automation setup.
Er du klar for å la kunstig intelligens skrive møtereferatene og epostene dine? Det kan du nemlig gjøre nå.
Welcome to the exhilarating world of the AI revolution! In this blog series we will dive deep into the most relevant and fascinating topics to help you achieve great results with AI for your business. Lately, AI has been dominating the headlines, creating a whirlwind of buzz that's hard to keep up with. In this first blog we are giving a quick insight to the current status!
right-arrow share search phone phone-filled menu filter envelope envelope-filled close checkmark caret-down arrow-up arrow-right arrow-left arrow-down