Microsoft_MVP_banner

Retrieving data from AX table in EP

Sometime we are in need of retrieving data from the tables which are not added in form’s datasource in EP page. To manipulate the data from tables other than datasource (in EP) or dataset (in AX), following code will work.

Accessing the URL of AxUrlMenuItem from AX into EP (Code behind)

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)      protected override void OnPreRender(EventArgs e)     {                // Get the URL for the webpage that referenced the current record                AxUrlMenuItem url = new AxUrlMenuItem(“EPSalesTableInfo”);                 // update the hyperlink to point to the URL         hpRecord.NavigateUrl = url.Url.ToString();        // you can use this URL to redirect to any page like        Response.Redirect(url.Url.ToString() + “&variable1=” +  stringvalue);            }

FaisalFareed@2025. All rights reserved

Design by T3chDesigns