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...
Posts
Showing posts from November, 2016
- Get link
- X
- Other Apps
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 ...
- Get link
- X
- Other Apps
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...
- Get link
- X
- Other Apps
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 ...
- Get link
- X
- Other Apps
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...