web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Accessing a specific order in Dynamics 365 F&O from Power BI

(4) ShareShare
ReportReport
Posted on by 11

Hello everyone,

 

I'm looking to integrate a link in Power BI that will allow me to access the details of an order directly in Dynamics 365 Finance & Operations.

 

Currently, when I try to view an order, I use the following URL:

 
https://[Dynamics365Instance].dynamics.com/?mi=SalesTableDetails&SalesId=[OrderNumber]
 

However, clicking on an order simply takes me to the unfiltered SalesTableListPage rather than directly showing the specific order details.

 

My objective is:

 

🔹 Either to directly access the details of a specific order,

🔹 Or, alternatively, to get to the list of orders with a filter applied to show the selected order.

 

I have findtwo potential approaches:

 

1-Manually Constructing a Filtered URL:

 
  • The idea is to build an URL that passes a JSON-formatted filter parameter. For instance, to filter by the order number (e.g., SalesOrderID) for the Sales Order table, the parameter might look like:

     
    {"Parameters":[{"DataSource":"SalesOrderTable","FieldValues":[{"Field":"SalesOrderID","Value":"[OrderNumber]"}]}]}
     The final URL could be:
  • https://[Dynamics365Instance].dynamics.com/?cmp=YourCompany&mi=display:SalesTableDetails&q=%7B%22Parameters%22%3A%5B%7B%22DataSource%22%3A%22SalesOrderTable%22%2C%22FieldValues%22%3A%5B%7B%22Field%22%3A%22SalesOrderID%22%2C%22Value%22%3A%22[OrderNumber]%22%7D%5D%7D%5D%7D
     
    2-Extracting the System-Generated Deep Link:
    • Dynamics 365 F&O has a built-in deep linking functionality that generates secure URLs using the UrlGenerator class in X++. This method creates links with parameters that are both URL-encoded and encrypted.

    • Here’s an example of an X++ snippet that generates such a link:

       
      class OrderDeeplinkGenerator
      {
          public static str generateDeeplink(str _orderNumber)
          {
              UrlHelper.UrlGenerator generator = new UrlHelper.UrlGenerator();
              System.Uri currentHost = new System.Uri(UrlUtility::getUrl());
      
              generator.HostUrl = currentHost.GetLeftPart(System.UriPartial::Authority);
              generator.Company = curext(); // Gets the current company context
              generator.MenuItemName = menuItemDisplayStr(SalesTableDetails); // Adjust to your menu item name
              generator.Partition = getCurrentPartition();
              generator.EncryptRequestQuery = true; // Enables encryption for security
      
              generator.RequestQueryParameterCollection.UpdateOrAddEntry(
                  formDataSourceStr(SalesOrderTable, SalesOrderTable),
                  fieldstr(SalesOrderTable, SalesOrderID),
                  _orderNumber
              );
      
              System.Uri fullURI = generator.GenerateFullUrl();
              return fullURI.AbsoluteUri;
          }
      }
       

Additionally an approach using Dataverse and virtual entities where you can create deep links without  X++ :

 

Thanks to Henrik Marx Larsen https://www.linkedin.com/pulse/deep-links-dynamics-365-finance-operations-records-using-larsen-d9zvf/

 

  • Using the D365F&O environment URL,

  • The schema name of the Dataverse virtual entity (

  • And the GUID of the record (retrieved by looking up the natural key).

An example deep link using this method looks like:

 
https://[Dynamics365Instance].dynamics.com/?cmp=usmf&mi=action:SysEntityNavigation&entityName=mserp_entassetmaintenancerequestv2entity&entityGuid=[RecordGUID]
 

However, it does require that you have access to Dataverse and that the virtual entities are configured properly in your environment. If you don't have Dataverse access, as i do, then this option might not be viable.


     

Has anyone found another approach that effectively enables direct access to a specific order (or a filtered order list) from Power BI? Any insights or suggestions would be greatly appreciated.

  May be there's a way to catch all Get Link in sales orders?

Categories:
I have the same question (0)
  • Suggested answer
    Holly Huffman Profile Picture
    6,530 Super User 2025 Season 2 on at
    Good morning, afternoon, or evening :) depending on your location!
    I see this was posted quite a while back - hoping you've resolved by now but incase not - here are some thoughts:
     
    1. Manually Constructing a Filtered URL
    You can build a URL with a JSON-formatted filter parameter to directly access the filtered order list or specific order details. Here's an example:
    Filtered URL Example:
    https://[Dynamics365Instance].dynamics.com/?cmp=YourCompany&mi=display:SalesTableDetails&q=%7B%22Parameters%22%3A%5B%7B%22DataSource%22%3A%22SalesOrderTable%22%2C%22FieldValues%22%3A%5B%7B%22Field%22%3A%22SalesOrderID%22%2C%22Value%22%3A%22[OrderNumber]%22%7D%5D%7D%5D%7D
    • Replace [Dynamics365Instance], YourCompany, and [OrderNumber] with your actual instance, company, and order number.
    • This approach works well for filtered lists but requires precise formatting of the JSON query.
     
    2. Using System-Generated Deep Links
    Dynamics 365 F&O supports deep linking via the UrlGenerator class in X++. This method generates secure, URL-encoded links to specific records.
    X++ Example:
    class OrderDeeplinkGenerator
    {
        public static str generateDeeplink(str _orderNumber)
        {
            UrlHelper.UrlGenerator generator = new UrlHelper.UrlGenerator();
            System.Uri currentHost = new System.Uri(UrlUtility::getUrl());

    generator.HostUrl = currentHost.GetLeftPart(System.UriPartial::Authority);
            generator.Company = curext(); // Current company context
            generator.MenuItemName = menuItemDisplayStr(SalesTableDetails); // Adjust menu item name
            generator.Partition = getCurrentPartition();
            generator.EncryptRequestQuery = true; // Enables encryption

    generator.RequestQueryParameterCollection.UpdateOrAddEntry(
                formDataSourceStr(SalesOrderTable, SalesOrderTable),
                fieldstr(SalesOrderTable, SalesOrderID),
                _orderNumber
            );

    System.Uri fullURI = generator.GenerateFullUrl();
            return fullURI.AbsoluteUri;
        }
    }
    • This method ensures secure and accurate links but requires development access to implement.
     
    3. Using Dataverse and Virtual Entities
    If your environment is integrated with Dataverse, you can leverage virtual entities to create deep links without X++.
    Example Deep Link:
    https://[Dynamics365Instance].dynamics.com/?cmp=usmf&mi=action:SysEntityNavigation&entityName=mserp_entassetmaintenancerequestv2entity&entityGuid=[RecordGUID]
    • Replace [Dynamics365Instance], usmf, and [RecordGUID] with your instance, company, and record GUID.
    • This approach requires Dataverse access and proper configuration of virtual entities.
     
    4. Capturing "Get Link" URLs
    Dynamics 365 F&O provides a "Get Link" feature for records. You can use this to generate URLs for specific orders:
    1. Navigate to the Sales Order in Dynamics 365.
    2. Use the "Get Link" option under the "Share" menu.
    3. Copy the generated URL and use it in Power BI.
     
    5. Automating URL Generation in Power BI
    To streamline the process:
    • Use Power Query in Power BI to dynamically construct URLs for each order based on the format you need.
    • Add a calculated column in your dataset that generates the URL for each order.
     
     
    Hope this helps!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans