web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 843

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
    RE: How do I get the sales order link?

    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
    843 on at
    RE: How do I get the sales order link?

    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
    RE: How do I get the sales order link?

    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

Responsible AI policies

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

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,922

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,922

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans