Sometimes we need to change/append the URL defined on AXURLMenuitem in Dynamics AX 2012 in order to open different EP pages based on user selection. Here is the code to Create
the complete URL in code (based On eb Menu Items)
the complete URL in code (based On eb Menu Items)
protected override void
OnPreRender(EventArgs e)
{
//
Get the URL for the webpage that referenced the current record
Get the URL for the webpage that referenced the current record
AxUrlMenuItem url = new
AxUrlMenuItem(“EPSalesTableInfo”);
AxUrlMenuItem(“EPSalesTableInfo”);
//
update the hyperlink to point to the URL
update the hyperlink to point to the URL
hpRecord.NavigateUrl =
url.Url.ToString();
url.Url.ToString();
//
you can use this URL to redirect to any page like
you can use this URL to redirect to any page like
Response.Redirect(url.Url.ToString()
+ “&variable1=” + stringvalue);
+ “&variable1=” + stringvalue);
}