Xml Archives - Aric Levin's Digital Transformation Blog http://aric.isite.dev/tag/xml/ Microsoft Dynamics 365, Power Platform and Azure Thu, 12 May 2022 04:03:42 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 Removing your Command Bar Unmanaged Active Layer in Model Driven Apps http://aric.isite.dev/dynamics/post/remove-commandbar-unmanaged-layer/ Wed, 15 Sep 2021 04:16:00 +0000 https://aric.isite.dev/index.php/2021/09/15/removing-your-command-bar-unmanaged-active-layer-in-model-driven-apps/ In the last few months I have been working on upgrading the customer´s unmanaged environments to managed. The customer had been working with unmanaged environments for about 5 years, and after joining, this has been one of the first things that I determined would be needed for this customer.

The post Removing your Command Bar Unmanaged Active Layer in Model Driven Apps appeared first on Aric Levin's Digital Transformation Blog.

]]>
In the last few months I have been working on upgrading the customer´s unmanaged environments to managed. The customer had been working with unmanaged environments for about 5 years, and after joining, this has been one of the first things that I determined would be needed for this customer.

The challenge was not so easy. We are still not fully managed in all the environments, but as a stepping stone, all environments with the exception of production are already managed and as we are working on a large migration, the final deployment is only a few months away.

After reading and watching the Microsoft blog and video on what they had to go through with Success Hub, I felt that my endeavor was not as complex. You can read the blog and see the video by clicking on the links below:

https://powerapps.microsoft.com/en-us/blog/how-a-microsoft-team-transitioned-from-unmanaged-to-managed-power-platform-solutions/

https://docs.microsoft.com/en-us/power-platform/alm/move-from-unmanaged-managed-alm

https://www.youtube.com/watch?v=3Uu5C9zkIjo (PowerCAT Live)

As with many of these special projects, there are sometimes blockers that you need to address with the functionality of your application. Ours was related to command bar customizations not being deployed from our development environment (unmanaged) to our QA environment (managed).
My apologies in advance for all the bluring, but this was the only way to get the screenshots.

The screenshots below show the difference between the functionality in our development and qa environments after the re-deployment of our managed solution to qa.

Command Bar UX - Dev Environment

Command Bar UX - Test Environment

As we saw this difference we wanted to go ahead and compare the Ribbon customization differences between the environments, and just as the UX had the differences, so did the commands themselves. It seemed like there was an enable rule missing in the qa environment that was not missing in the development environment. This was done of course using the Command Checker utility that can be invoked by adding the ribbondebug=true key/value to your query string
(ex: https://dev.crm.dynamics.com/main.aspx?appid=1234&forceUCI=1&ribbondebug=true&pagetype=entityrecord&etn=account&id=1234)

See image below for comparison

Command Bar Check - Dev Environment

Command Bar Checker - Test Environment

As with many of the know issues with managed solutions and customizations that do not get overwritten (we experienced this with cloud flows as well), the issue is usually when there is an Unmanaged Layer on top of a Managed layer, and then the customizations do not get overwritten.

When we clicked on the Command Checker, and selected the command that was not performing as expected (1), chose Command Properties (2) we can see the rules that were supposed to be enabled in this environment.

Command Bar Checker - Get to solution layers

The rule that we were expected was not visible. Clicking on the View command definitions solution layers (3) will display any layers that are being used for the command that we are looking at. The image below shows you the results that we saw when clicking on the link.

Command Bar Checker - Layers

In the Command checker solution layers pane, you can also select two layers and compare them to see the CommandDefinition code of the RibbonDiffXml.

Once we saw that there was an Unmanaged Layer (Active Layer) on top of our managed solution layer, the solution was pretty easy, but we required to do this in a few places.

The first thing is we created a new solution in our qa environment. We called this solution Command Bar Fixes, and added the table were we had to fix the customizations. When we added the table, we only selected Include table metadata from the options, and did not select any components. Image below:

Command Bar - Add Table to Solution (Table Metadata Only)

Our solution contained a single table with only the table metadata as shown below.

Command Bar - Export Table Metadata Solution

We then Export the solution. There should not really be a need to publish customizations before (as we have previously seen the results in the Command Checker), but if you are accustomed to this practice, do not change your ways…

Once we export the solution, we navigate to our downloads folder and extract the Command Bar Fixes solution. We open the newly created folder, and within the folder we open the customizations.xml file using an editor of our choice. The customizations.xml file should contain the table specific information as well as the Ribbon Diff Xml and other information about the table. The image below shows this file before we fix it.

Command Bar - Import Export Xml (Before Changes)

I collapsed the RibbonDiffXml containing all the commands, as these are not really relevant. We will go ahead and remove all of the inner Xml of the RibbonDiffXml section, and only leave the <RibbonDiffXml /> tag so that it looks like the image below.

Command Bar - Import Export Xml (After RibbonDiffXml removal)

We then save the changes, and select all the files that are in the extracted folder. Right click and select Send To, and Compressed Folder. We will reimport the newly created zip file.

Navigate back to the Maker portal, click on solutions and select import. In the browse panel, select the zip file that you just created containing the customizations.xml, solutions.xml and [Content_Types].xml.

Import the file and publish your changes. After this navigate back to the table were you experienced the issue and validate that the active layer is now gone and you only have the managed layer.

Hope this was helpful. It was painful for us to get the resolution, so maybe it will help some of you.

The post Removing your Command Bar Unmanaged Active Layer in Model Driven Apps appeared first on Aric Levin's Digital Transformation Blog.

]]>
Create Email a Link to Selected Records in KBArticle Grid View http://aric.isite.dev/dynamics/post/create-email-link-to-selected-records-in-kbarticle-view/ Tue, 15 Aug 2017 22:50:00 +0000 https://aric.isite.dev/index.php/2017/08/15/create-email-a-link-to-selected-records-in-kbarticle-grid-view/ Recently somebody asked, why does the KB Article home page view does not have an option to Email a Link to multiple records like a lot of the other entities do, In looking at the Ribbon Xml, we notice that is true and there is no Email a Link split button to display that, so we were looking at the best approach to implement this.

The post Create Email a Link to Selected Records in KBArticle Grid View appeared first on Aric Levin's Digital Transformation Blog.

]]>
Recently somebody asked, why does the KB Article home page view does not have an option to Email a Link to multiple records like a lot of the other entities do, In looking at the Ribbon Xml, we notice that is true and there is no Email a Link split button to display that, so we were looking at the best approach to implement this.

We will be cover an mixed way of doing this with Ribbon Workbench and customizing this with the Customizations.xml file that is part of the part of an export solution.

In order to get this working, the first thing that we need to do is take a look at how this is implemented in an entity that the Split button exists, such as the Contact or Account entity.

First we are going to create a new solution, and include only the Contact entity in it. You can include All Assets. Launch Ribbon Workbench, and then choose the solution that you just created.

Launch Ribbon Workbench

In the home page command bar of Ribbon Workbench, right click on the Email A Link button, and then select Customize Button. Repeat the same and select Customize Command. This will load all the button and customizations of the Email A Link button for the Contact Entity.

Click on the Xml tab in the solution area of Ribbon Workbench, and then click on the Refresh button. This will show you the Xml portion of your Email A Link button and command. Copy the Xml to a text editor, and do the follow steps:

  • Remove the Xml element line from the file
  • In the RibbonDiffXml section start tag, remove any namespaces, so that it only shows
  • Replace within the file all occurences of contact with kbarticle

You can close Ribbon Workbench. In your solutions area, create a new solution and add the KB Article Entity to the solution. Include All Assets. Export the solution as an unmanaged solution.

Extract the unmanaged solution that you created, and in the extracted folder open the customizations.xml file in a text editor. Navigate to the RibbonDiffXml section of the customizations file, and replace it with the RibbonDiffXml that you modified from what you copied from Ribbon Workbench. The following is a sample of the RibbonDiffXml section of the file:

>
  
    "Mscrm.HomepageGrid.kbarticle.Send.CustomAction" Location="Mscrm.HomepageGrid.kbarticle.MainTab.Collaborate.Controls._children" Sequence="61">
      
        "Mscrm.SendShortcutSelected.AlwaysEnabled" Id="Mscrm.HomepageGrid.kbarticle.Send" Image32by32="/_imgs/ribbon/SendShortcut_32.png" Image16by16="/_imgs/ribbon/EmailLink_16.png" LabelText="$Resources:Ribbon.HomepageGrid.Record.Shortcut.Send" Sequence="61" TemplateAlias="o2" ToolTipTitle="$Resources:Ribbon.HomepageGrid.Record.Shortcut.Send" ToolTipDescription="$Resources:Mscrm_HomepageGrid_Other_MainTab_ExportData_Send_ToolTipDescription" ModernImage="EmailLink">
“Mscrm.HomepageGrid.kbarticle.Send.Menu”> “Mscrm.HomepageGrid.kbarticle.Send.MenuSection” Sequence=“10” DisplayMode=“Menu16”> “Mscrm.HomepageGrid.kbarticle.Send.MenuSection.Controls”>
        
      
    
  
  
    "Mscrm.Templates" />
  
  
    "Mscrm.SendShortcutSelected.AlwaysEnabled">
      
        "Mscrm.Enabled" />
        "Mscrm.IsValidForHierarchyView" />
      
      
        "Mscrm.HideOnModern" />
      
      
        "Mscrm.CommandBarActions.sendSelectedRecordsUrl" Library="/_static/_common/scripts/CommandBarActions.js">
          "true" />
          "SelectedControlSelectedItemReferences" />
          "SelectedEntityTypeCode" />
        
      
    
  
  
    
    
      "Mscrm.HideOnModern">
        "Modern" InvertResult="true" />
      
    
    
      "Mscrm.Enabled">
        "Mscrm.CommandBarActions.alwaysEnabled" Library="/_static/_common/scripts/CommandBarActions.js" />
      
      "Mscrm.IsValidForHierarchyView">
        "Mscrm.CommandBarActions.isValidForHierarchyView" Library="/_static/_common/scripts/CommandBarActions.js" />
      
    
  
  

Save your changes of the Customizations.xml file. Re-compress the extracted file, and import the created zip file into your solutions. Publish your changes.

Navigate to Articles, and you will see that the Email A Link button is visible and enabled on the form.

The post Create Email a Link to Selected Records in KBArticle Grid View appeared first on Aric Levin's Digital Transformation Blog.

]]>
CRM 2013 Notes Control Form Presentation http://aric.isite.dev/dynamics/post/crm_2013_notes_control_form_presentation/ Tue, 21 Jan 2014 00:49:00 +0000 https://aric.isite.dev/index.php/2014/01/21/crm-2013-notes-control-form-presentation/ CRM 2013 has a new feature that allows displaying Posts, Notes and Activities within a single control (using the Updated Forms). We can easily add this new control to the form by clicking on the Notes ribbon icon on the Insert Tab of the Form Customization.

The post CRM 2013 Notes Control Form Presentation appeared first on Aric Levin's Digital Transformation Blog.

]]>
CRM 2013 has a new feature that allows displaying Posts, Notes and Activities within a single control (using the Updated Forms). We can easily add this new control to the form by clicking on the Notes ribbon icon on the Insert Tab of the Form Customization.

It seems that the behavior of adding the Notes control is not always the same, as sometimes the control might display only Notes and sometimes it will display the Posts, Notes and Activities.

The solution as to what the control will display can be modified, by exporting the entity, and modifying the FormXml section of the Entity within the customizations.xml file. Within the FormXml section, under forms type = “main”/systemform there is an element called FormPresentation.

The value of FormPresentation can be either 0 or 1. If the value is 0, only the Notes section will appear (classic). If the value is 1, the Posts, Notes and Activities sections will appear (updated). Make the required changes, re-import your entity/solution and publish your customizations and your form will display the Notes control in the proper way.

The post CRM 2013 Notes Control Form Presentation appeared first on Aric Levin's Digital Transformation Blog.

]]>