Tag Archives: Dynamics 365

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.

Dynamics 365 Set Parent Child relationship from Correct Sub grid (Relationship)

Let us consider we have two entities. Entity A (Parent entity) and Entity B (child entity). I have created two lookup of entity A in entity B. Now we will have two associated sub grids of Entity B in Entity A. Whenever I tried a new entity B record (child record) from entity A (parent record) using the associated sub grid add button, it’s auto populating both the lookup fields of entity A in entity B record.

For this scenario, the easiest way is just to remove the field mapping. But the problem is when you want to try to delete one of the mapping, CRM platform won’t allow us to do it. Error details are as follows:

Then the only way to achieve our scenario is by customization only and here are my steps to solve it:

It’s not always recommended to customize the OOB button. So, in this case we can achieve this scenario by adding a custom button.

Create a html resource using the below code:

<!DOCTYPE html>
 <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
 <meta charset="utf-8" />
 <title>Entity B Record</title>
 .btnSubmit {
 background-color:rgba(0, 0, 0, 1) !important;
 height: 24px;
 font-family: Segoe UI;
 font-size: 12px;
 color: rgb(255,255,255);
 border: 1px solid rgba(0, 120, 215, 1.0);
 background-image: none;
 margin-top: 10px;
 width: auto !important;
 min-width: 80px;
 white-space: nowrap;
 function openEntityBRecord () {
 var recordId = window.parent.Xrm.Page.data.entity.getId();
 var fullName = window.parent.Xrm.Page.data.entity.attributes.get("fullname").getValue();
 var entityFormOptions = {};
 entityFormOptions["entityName"] = "plc_associatedpriorityservice";
 entityFormOptions["openInNewWindow"] = true;
 var formParameters = {};
 formParameters["EntityA1id"] = recordId;
 formParameters["EntityA1name"] = fullName;
 Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
 function(success) {
 function(error) {
 <input style="float:right;" type="button" class="btnSubmit" id="btnSubmit" name="btnSubmit" value="Add Entity B Record" onclick="openEntityBRecord();">

Then go to form Editor of Entity A and insert a web resource just above the first associated sub grid. When finished, publish all customization and you can try the result.

Now the “Add Entity B Record” button will appear above the first associated sub grid in Entity A(parent) record.

Similar in the same way we need to do it for second associated sub grid.

Also, we need to hide the OOB Add button form both the sub grids by using the below code:

 var hideSubgridAddBtn = function(primaryEntityName) {
         if (primaryEntityName == “entityname”)
             return false;
             return true

Add the above method to the one JavaScript library and we need to add a enable rule to the OOB button and call the above method “hideSubgridAddBtn” from the above newly created JavaScript library.

Once done, publish all the customization and you can try the result. It will set only the first lookup of entity A in entity B record.