Posts

Showing posts from February, 2019

Get product variant in AX 2012 (X++)

Image
Get product variant in AX 2012 (X++)  Product variants are setup for product master to distinguish between the same product with respect to size, colors etc. For example, Bi-Cycle is the product master and its size and color can be different which are its variant. Product variant can be seen from: Product information management > Common > Released product Select any item and click on Released product variants. These variants can be fetched using following code through X++. Using Query Build Datasource: Query query =            new Query(); QueryBuildDataSource     qbds, qbdsDim; QueryRun                qr; InventDim                 InventDim; ItemId                   itemId  =  "10001" ; qbds = query.addDataSource( tableNum (InventD...

Create multi select company lookup in report dialogue using X++

Image
Create multi select company lookup in dialogue using X++ Let’s say we have a requirement to show multi select lookup on report dialogue box. Steps: 1) Create CONTRACT class with a company parameter in it. 2)   Create  UI BUILDER  Class to make multi select company lookup 3)   Get selected companies in Report DP class Let’s put some lights on the above steps. Assuming that we know the basic concepts of SysOperationFramework. Create CONTRACT class with a company parameter in it. Adding  SysOperationContractProcessingAttribute  in contract class will use controls modified in UI Builder class. Use LIST as a data type as we can have multiple selected companies. Code: [ DataContractAttribute,    SysOperationContractProcessingAttribute( classStr (TestReportUIBuilder)) ] class TestReporContract {      List     legalEntity; } Now add new method for company parame...