public static str generateFTILink(RecId _invoiceIdentifier, DataAreaId _dataAreaId)
{
//gets the generator instance
var generator = new Microsoft.Dynamics.AX.Framework.Utilities.UrlHelper.UrlGenerator();
var currentHost = new System.Uri(UrlUtility::getUrl());
generator.HostUrl = currentHost.GetLeftPart(System.UriPartial::Authority);
generator.Company = _dataAreaId;
generator.MenuItemName = menuItemDisplayStr(CustFreeInvoiceListPage);
generator.Partition = getCurrentPartition();
generator.PageType = FormViewOption::Details;
var requestQueryParameterCollection = generator.RequestQueryParameterCollection;
requestQueryParameterCollection.AddRequestQueryParameter(
formDataSourceStr(CustFreeInvoice, CustInvoiceTable),
'RecId', int642Str(_invoiceIdentifier));
System.Uri fullURI = generator.GenerateFullUrl();
// to get the encoded URI, use the following code
return fullURI.AbsoluteUri;
}
This blog is contains coding reference related to Microsoft AX 2012 and D365 finance and operations and Power platform
Thursday, October 2, 2025
Generate custom URL D365 FO
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment