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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How do I get the sales order link?

(0) ShareShare
ReportReport
Posted on by 845

Hello colleagues,

I'm working with Power Automate flow and need to get the URL link to the sales order created?

What is the best way to do this?

I have started working with https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/user-interface/create-deep-links and I created the following code:

using Microsoft.Dynamics.AX.Framework.Utilities;

class DeepLinkTest
{
    public static void main(Args _args)
    {
        MenuItemNameDisplay menuItemName                = menuItemDisplayStr(SalesTable);  // customer form
        MenuItemType        menuItemtype                = MenuItemType::Display;
        str                 filterformDataSource        = formDataSourceStr(SalesTable, SalesTable);  // filer datasource
        str                 filterFormDataSourceField   = fieldStr(SalesTable, SalesId); // filter field

        UrlHelper.UrlGenerator generator = new UrlHelper.UrlGenerator();
        System.Uri currentHost = new System.Uri(UrlUtility::getUrl());
 
        generator.HostUrl = currentHost.GetLeftPart(System.UriPartial::Authority);
        generator.Company = curExt();
        generator.MenuItemName = menuItemName;
        generator.MenuItemType = menuItemtype;
        generator.Partition = getCurrentPartition();
        generator.EncryptRequestQuery = true;
        if(filterformDataSource)
        {
            UrlHelper.RequestQueryParameterCollection requestQueryParameterCollection;
 
            requestQueryParameterCollection = generator.RequestQueryParameterCollection;
            requestQueryParameterCollection.UpdateOrAddEntry(filterformDataSource, filterFormDataSourceField, "SalesId"); // applying filter
        }

        System.Uri fullURI = generator.GenerateFullUrl();
 
        Info(fullURI.AbsoluteUri); // getting deep link
    }

}

I need this URL in PowerAutomate flow, so can I put this link into a table so I can use it later?

Thanks.

I have the same question (0)
  • AnithaEswaran Profile Picture
    2,032 on at

    Hi,

    can you explain what are you trying to do here ?

    Are you trying to get the details of 'Sales order' which you create from PA?

  • Shooowtek Profile Picture
    845 on at

    I want to get the URL for the details of a sales order.

    I am creating a sales order using a Power Automate workflow, and then I want to send a confirmation email to the user with the URL of the created order.

  • AnithaEswaran Profile Picture
    2,032 on at

    This might be bit complicated. You need to encrypt while calling the URL

    devblog.sertanyaman.com/.../

    You can try other options of creating the sales order using standard entity and that would give the details of new sales order as it response.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 649

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 447 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 242 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans