Skip to main content

Posts

Showing posts from November, 2017

Import References for SSRS Report user Control in Enterprise portal axapta

Following Import References  are required in using section for Creating SSRS Report user Control in Enterprise portal axapta using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.DataVisualization.Charting; using System.Web.UI.WebControls; using Microsoft.Dynamics.Framework.Portal.UI.WebControls; using Microsoft.Dynamics.Framework.Portal.UI.WebControls.WebParts; using System.Diagnostics; using Microsoft.Dynamics.AX.Framework.Reporting.Shared; using Microsoft.Dynamics.Framework.BusinessConnector.Session; using Microsoft.Dynamics.AX.Framework.Portal.Data; using Microsoft.Dynamics.Framework.Portal.CommonControls; using System.Globalization; using Microsoft.Dynamics.AX.Framework.Services.Client; using Microsoft.Dynamics.Framework.Portal; using Microsoft.Dynamics.Framework.Portal.UI; using Proxy = Microsoft.Dynamics.Framework.BusinessConnector.Proxy; ...

Add Financial dimension Lookup at Enterprise portal in Axapta

To Add Financial dimension Lookup at Enterprise portal in Axapta you can to help with below code. protected void BusinessSector_LookUp(object sender, AxLookupEventArgs e) { //Getcurrent user to filter record based on current user String usr = WindowsIdentity.GetCurrent().Name; int pos = usr.IndexOf('\\'); usr = pos != -1 ? usr.Substring(pos + 1) : usr; AxLookup lookup = (AxLookup)sender; // Create the lookup data set. The respective table will be used. Proxy.SysDataSetBuilder sysDataSetBuilder; sysDataSetBuilder = Proxy.SysDataSetBuilder.constructLookupDataSet(AxSession.AxaptaAdapter, TableMetadata.TableNum(AxSession, "DimensionFinancialTag")); // Set the generated data set as the lookup data set. lookup.LookupDataSet = new DataSet(AxSession, sysDataSetBuilder.toDataSet()); using (Proxy.Query query = lookup.LookupDataSet.DataSetViews[0].MasterDataSource.query...

X++ code to print sales invoice on printer directly

Below is the X++ code to print sales invoice on printer directly. Args salesArgs = new Args(); SalesInvoiceContract salesInvoiceContract; SalesInvoiceController controller; SrsReportRunImpl srsReportRunImpl; str fileName; CustInvoiceJour custInvoiceJour;// = _args.record(); select custInvoiceJour where custInvoiceJour.InvoiceId=="INV_00000009"; salesArgs.record(custInvoiceJour); controller = new SrsReportRunController(); salesInvoiceContract = new SalesInvoiceContract(); controller.parmReportName(ssrsReportStr(SalesInvoice,Report)); controller.parmShowDialog(false); controller.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::Printer); // controller.parmReportContract().parmPrintSettings().printerName(@"\\espprn03\Follow Me - MFP"); salesInvoiceContract.parmRecordId(custInvoiceJour.RecId); // Record id must be passed otherwise the report wi...

Ax 2012 Form Development,User control,Role centers,Citrix lookup issues

Simple form development using multiple tables How to create role center in Ax 2012 Custom lookup issue On citrix client How to create User control on EP website

Enable disable sales Invoice,Confirmation,packing slip and Picking list button in Ax 2012

Sometimes we need to enable disable button in Sales order form then you can apply your code in below method in SalesTableType class \Classes\SalesTableType\canConfirmationBeUpdated \Classes\SalesTableType\canInvoiceBeUpdated \Classes\SalesTableType\canPackingslipBeUpdated \Classes\SalesTableType\canPickingListBeUpdated For sales order list page you can refer below method. \Classes\SalesTableListPageInteraction\setButtonEnabled

Add custom Lookup for Employee id in Ax 2012

To Add customLookup for Employee id in Ax 2012 you can try below code sample in datasource filed of the form. You can add data method to lookup easily to get the name of the employee. Here HcmWorker is a master table of employee and personnel number and name is the field of Hcmworker table. SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(HcmWorker),_formControl); Query query = new Query(); QueryBuildDataSource queryBuildDataSource = query.addDataSource(tableNum(HcmWorker)); queryBuildDataSource.addRange(fieldnum(HcmWorker,Tester)).value(queryvalue(Noyes::Yes)); sysTableLookup.addLookupfield(fieldNum(HcmWorker,PersonnelNumber)); sysTableLookup.addLookupMethod(tableMethodStr(HcmWorker,Name)); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup();