Posts

Showing posts from November, 2016
How to make Financial Dimensions Mandatory through X++ code Create a new class and create the methods -> Pre- or post evnet handler method and write the following code. After this go to the table -> methods-> validatewrite ->  New event handler subscription In my scenario, custinvoiceline is the table public static void FreeTxtValidateWrite(XppPrePostArgs _args) {     DimensionAttribute                  dimAttrDept,dimAttrClient,dimAttrDivision,dimAttrEmp,dimAttrIssue,dimAttrMaster,dimAttrMedia,dimAttrProduct,dimAttrProject;     DimensionAttributeValue             dimAttrValueDept,dimAttrValueClient,dimAttrValueDivision,dimAttrValueEmp,dimAttrValueIssue,dimAttrValueMaster,dimAttrValueMedia,                                         dimAttrValueProduct,dimAttrValuePro...
Inventory Counting When we create the Counting Journal, If quantity becomes Zero, then it will trigger the class called Class -> Method InventMov_Journal -> JournalPostTrans
How to Use List Enunumerator in AX 2012 For example if we have a data in the grid with some special character separator like (; ) we will use the following process. In my scenario i have a data like  Field Data ->       InventoryAdjustments;Transfers;IntercompanyTransferOrders In this Unbound control we have a data ->DMSPartnerBlockingTable_DMSTransactionType.valueStr(); NoYesId                                     isDealer; boolean                                     ret; List                                        list; ListEnumerator                              listEnumerator; str   ...
Multi Select Lookup in AX 2012 Form -> Methods -> Init For Multiselect Lookup we need to create one Unbound control in the Form. Before to this we need to create the Master Table to store the values which we need to get in the drop down for lookup in the Multiselect Control public void init() {     QueryRun                        locationQueryRun;     SysLookupMultiSelectCtrl msCtrlCust;     Query                           query = new Query();     QueryBuildDataSource        qbds;     super();     qbds = query.addDataSource(tableNum(DMSPartnerBlockingTransactionTypes));     qbds.fields().dynamic(NoYes::No);     qbds.fields().addField(fieldNum(DMSPartnerBlockingTransactionTypes,DMSTransactionType));     msCtrlCust = SysLookupMulti...
How to Join DataSources in the Lookup Methods and Passing Ranges Form -> Datasource -> Field -> Methods -> Lookup (Override method) public void lookup(FormControl _formControl, str _filterStr) {     Query                       query = new Query();     QueryBuildDataSource        queryBuildDataSource,queryBuildDataSource1;     QueryBuildRange             queryBuildRange,queryBuildRange1,queryBuildRange2,queryBuildRange3,queryBuildRange4;     SysTableLookup              sysTableLookup;     DmsAssociatedDealers        dmsAssociatedDealers;     DmsAssociatedPartners       dmsAssociatedPartners;     NoYesId                     isDealer;     RecId     ...
Lookup in AX 2012 and how to pass a Ranges At the Datasource -> Field -> Methods -> Lookup public void lookup(FormControl _formControl, str _filterStr) {     Query query = new Query();     QueryBuildDataSource queryBuildDataSource;     QueryBuildRange queryBuildRange;     SysTableLookup  sysTableLookup;     //super(_formControl, _filterStr);     sysTableLookup = SysTableLookup::newParameters(tableNum(DMSChannelTable), _formControl);                     queryBuildDataSource = query.addDataSource(tableNum(DMSChannelTable));     sysTableLookup.addLookupField(fieldNum(DMSChannelTable, ChannelCode));     sysTableLookup.addLookupField(fieldNum(DMSChannelTable, Country));     sysTableLookup.addLookupField(fieldNum(DMSChannelTable, DivisionCode));     queryBuildRange = queryBuildDataSource.addRange(fieldNum(DMSCha...
Ctrl + F5 issue in AX. Put this code after update element.task(2839);
Image
How to export Model Store Open Microsoft Dynamics AX Power Shell. Next go to the Specific drive, where AX is Installed. Type the following command in the Power shell. Export-axModelStore -File "Give the folder path " -Details