Quickly check if a flight is active in D365F&O production environments without using code or SQL.

When Microsoft changes the code in D365F&O environments in a way that can affect production behavior, they introduce a flight. A flight is a feature switch that controls whether new or existing behavior is used in the environment. These flights are typically active in older production environments to avoid disrupting normal business processes.

This week, I opened a high-severity ticket with Microsoft to activate a flight in both UAT and PROD environments, where I don’t have access to Visual Studio since these environments are managed by Microsoft. They quickly confirmed that the flight was active, but it didn’t resolve the issue in my environment. Since high-severity tickets are handled under pressure to be closed quickly, I needed a fast way to check if the flight was active—without deploying code or using SQL.

That’s when I thought of using Electronic Reporting to verify it.

Checking if a flight is active with ER

The process is very simple, and I’ll explain it step by step so that even if you’re unfamiliar with ER (Electronic Reporting), you can still follow along. I won’t go into detail about the purpose of each step because it’s beyond the scope of this post, and I’m not using the tool for its intended purpose. If you’re interested in learning more about ER, you can start with this guide.

First, navigate to the ER Workspace (marked in red). Make sure an active configuration provider other than Microsoft is available (marked in green). If there isn’t one, you can create a new provider in Configuration providers (marked in orange). Finally, click Reporting configurations (marked in pink).

In Configurations, we’ll create a new model. I’ll name it “TST FlightCheckerMod”. If you’re working in UAT or PROD, using a prefix like TST is a good practice to avoid confusing other users. However, the name is entirely up to you.

Now, select the newly created model and click Designer. If the correct name doesn’t appear (marked in green), simply reload the form.

Create a Root node, you can simply name it “Root”, for example. Once it’s created, you can go back.

Now, change the status of your model version to Complete.

Let’s add a Format extending from our model. I named it “TST_FlightCheckerForm”. For Format type, select Text, and for Data model definition, choose the “Root” node we created earlier. Finally, click Create Configuration.

Now, select the format you just created. Verify that the name is correct (marked in green), then click Designer.

Create a file node:

Give it a name, such as “File”, and leave everything else as it is.

Now, under File, add a String element. You can simply name it “String”.

Make sure the “Show details” button is selected (marked in green). Next, go to the Mapping section, click “Add root”, and select “Class”.

Now, select the “Global” class and name it “Global”. Leave everything else as default.

Let’s edit the formula for our String:

Add the following formula, replacing “[NAME_OF_THE_FLIGHT]” with the actual name of your flight:

IF(Global.isFlightEnabled("[NAME_OF_THE_FLIGHT]"), "Flight ON", "Flight OFF")

For example:

IF(Global.isFlightEnabled("EnableSharingOfValidStorageConnectionString"), "Flight ON", "Flight OFF")

Save the formula, go back, and click “Run”. In the save popup, select “OK”, and then confirm in the pane. A file will be exported, which will indicate whether the flight is active or not.

I’m not sure if this is the best way to check it. I couldn’t find any good and fast alternatives. But if you know a better solution, feel free to write a comment!


Posted

in

by

Tags:

Comments

6 responses to “Quickly check if a flight is active in D365F&O production environments without using code or SQL.”

  1. Adis Hodzic Avatar

    Hello,

    It didnt work for me, because when I ran it it said:
    “No model mapping exists for the ‘ FlightCheckerMod (Root)’ data model.”

    Also I think your formula is missing the “model”
    “IF(model.Global.isFlightEnabled(“EnableSharingOfValidStorageConnectionString”), “Flight ON”, “Flight OFF”)”

    1. Arcadi Burria Avatar

      Hi Adis! I think you put the class inside the model instead of the root, so when it runs fails because there is no mapping.

  2. NP Avatar
    NP

    What about get the source root as Table records – Table SysFlighting and print the full list out?

    1. Arcadi Burria Avatar

      Hi NP, I don’t think there is a table with all the flights. If it existed, there wouldn’t even be a need for the trick I explain in this post. I’m aware that there are some tables with certain flights, but I wasn’t able to find the ones I was looking for there.

  3. Florian Hopfner Avatar
    Florian Hopfner

    Thanks for the neat idea to quickly check the flight status.

    I had to remove the IF() statement from the formula, otherwise it would always give me “Flight OFF” as a result, even for flights were I know for sure that they are on. After removing it, I got the expected True/False results in the text file.

    1. Arcadi Burria Avatar

      Thanks Florian! that’s an unexpected behaviour, the first parameter should return a boolean, and based on this value return the second or third parameter (strings). But if it works for you now that’s great!

Leave a Reply

Your email address will not be published. Required fields are marked *