Custom Translations – the Easy Way

In many customer projects and products, I have built solutions for managing translations in Microsoft Dynamics 365 / CDS / CRM.
Sure, the metadata can be translated to show labels etc in the language of the user, but having a custom solution for translations ensures localized content for texts that are shown to the user from code or automation.

Continue reading “Custom Translations – the Easy Way”

Create view: Active Contacts in My State

Microsoft Dynamics 365 Customer Engagement and Common Data Service offer us the querying language FetchXML to retrieve data. Since this is the language used for views saved in the system, we can use FetchXML Builder for XrmToolBox to alter the features of views beyond what is possible using platform features, without making them unsupported.

Continue reading “Create view: Active Contacts in My State”

FetchXML Builder and Friends at D365UG Virtual Summer Camp

On August 7-9, the first ever Virtual Summer Camp for the Dynamics 365 platform will take place.

During this free event the D365UG offer some 30+ sessions with focus on Customer Service and Field/Project Service.

I will be doing one of a few cross vertical sessions, where I discuss and demonstrate some useful XrmToolBox tools that help customizers, administrators and users with information analysis and enhancing the capabilities of the system.

Below is a description of my session – enjoy and make sure you sign up! Click the link: D365UG Virtual Summer Camp

Continue reading “FetchXML Builder and Friends at D365UG Virtual Summer Camp”

FetchXML Builder for Microsoft Dynamics 365/CRM got an extreme makeover

 

The first release of FetchXML Builder for XrmToolBox in 2018 contains a major face-lift.

New year – new design! After more than three years since first release, the time has come to use all the feedback from issues on GitHub, comments on Twitter, and collected statistics to improve the UI. This article describes some of the major changes introduced with the first release of 2018.

Continue reading “FetchXML Builder for Microsoft Dynamics 365/CRM got an extreme makeover”

Integrating FetchXML Builder with other plugins

With the next release of FetchXML Builder for XrmToolBox it is possible for other tools to benefit from the UI FetchXML Builder offers to compose queries to be used for any purpose.

The MessageBus functionality introduced in pull request #101 of XrmToolBox makes it possible to communicate between plugins within the tool.
BDU-UseFXB1This is implemented in the Bulk Data Updater (currently available as beta in Cinteros’ set of tools for XrmToolBox at http://cinteros.xrmtoolbox.com) to be able to use FetchXML Builder to get the query to use when retrieving records to update.
Using the MessageBus, it is really easy to get FXB to do the work for you when you need a FetchXML string or a QueryExpression object in your plugin. When communicating with FXB, the argument passed between the plugins shall be an instance of FXBMessageBusArgument, which is a public class in the FXB assembly.  

Preparation

To prepare your plugins for integration, implement the IMessageBusHost interface in both source and target plugins.

    public partial class DataUpdater : PluginBase, IGitHubPlugin, IPayPalPlugin, IMessageBusHost

Sample call to start FXB

Clickin the button in the above image will execute the following code:

  var messageBusEventArgs = new MessageBusEventArgs("FetchXML Builder");
  messageBusEventArgs.TargetArgument = new FXBMessageBusArgument(FXBMessageBusRequest.FetchXML)
  {
    FetchXML = internalFetchXml
  };
  OnOutgoingMessage(this, messageBusEventArgs);

This will start FetchXML Builder with a new button in the toolbar – “Return FetchXML”. FXB will be initiated with the current FetchXML stored in the internalFetchXml variable in Bulk Data Updater.
BDU-UseFXB2

Sample method to receive query from FXB

When the return-button is clicked in FetchXML Builder, a similar MessageBus event is triggered in the calling plugin.

public void OnIncomingMessage(MessageBusEventArgs message)
{
    if (message.SourcePlugin == "FetchXML Builder" &&
        message.TargetArgument is FXBMessageBusArgument)
    {
        var fxbArg = (FXBMessageBusArgument)message.TargetArgument;
        internalFetchXml = fxbArg.FetchXML;
    }
}

The MessageBuEventArgs in this event now contains a TargetArgument of type FXBMessageBusArgument. Depending on the request that was made to FetchXML Builder, the argument till contain a FetchXML string or a QueryExpression object.
 

Timeline

When writing this blog, a public release of XrmToolBox and FetchXML Builder including MessageBus functionality is not yet available. Tanguy Touzard, author of XrmToolBox, plans to have this release available for the public “early May”. FetchXML Builder supporting this functionality will be available at the same time, or shortly after.
However:

This means that plugins with the need to use FXB to compose their queries can also be implemented now, to be able to release the plugins when the MessageBus framework is released to public. The easiest way to get the FXB interface is to download the draft release available at GitHub and reference the FXB assembly in your plugin.
 

Background

  • XrmToolBox is the toolkit to use to survive the everyday challenges for Microsoft Dynamics CRM administrators, customizers and developers. XrmToolBox can be downloaded from http://www.xrmtoolbox.com
  • FetchXML Builder is one of about 40 publicly available tools for XrmToolBox. FetxhXML Builder can be downloaded from http://fxb.xrmtoolbox.com
  • Bulk Data Updater is one of the tools for XrmToolBox from Cinteros AB currently in beta release. Cinteros toolkit can be downloaded from http://cinteros.xrmtoolbox.com

Note – if you would like to see an OData query string returned from FetchXML Builder, make sure you vote up issue #4 on GitHub!

Introduction to FetchXML Builder

FXB-659-white
FetchXML Builder for XrmToolBox is getting more and more attention and is now downloaded and used in most parts of the world. Current numbers indicate a total download count of about 1600, and top count for a single version is close to 400. So I figured it was probably time to write an introduction to the tool, though I have actually received very few questions about how to use it (is it really that intuitive and self-explanatory??) There is now a page on this blog dedicated to FetchXML Builder with brief information on how to use the tool and what features it offers. It begins like this:

This project aims to combine the good parts from Advanced Find and the View Editor in Microsoft Dynamics CRM, the FetchXml Tester and View Layout Replicator in XrmToolBox, and the retired Stunnware Tools to create a tool that will let you do all those things that otherwise have to be done manually.

Navigate to the introduction page using the navigation bar above, or click here: FetchXML Builder introduction To skip the introduction and go straight to the download page, click here: fxb.xrmtoolbox.com

Enjoy Your FetchXML’ing!