Posts

How to add custom lookup in Dynamics AX 2012 Through X++

How to add custom lookup in Dynamics AX 2012 Through X++ public void lookup(FormControl _formControl, str _filterStr) {         //super(_formControl, _filterStr);         Query                               query = new Query();         QueryBuildDataSource    queryBuildDataSource;         SysTableLookup               sysTableLookup;              sysTableLookup          = SysTableLookup::newParameters(tableNum(TableName), _formControl);         queryBuildDataSource    = query.addDataSource(tableNum(TableName));                  sysTableLookup.addLookupField(fieldNum( TableName , Field1));         s...

How to get inventory on-hand in Dynamics AX 2012 Through X++

How to get inventory on-hand in Dynamics AX 2012 Through X++     InventDim           inventDim;     InventDimParm   inventDimParm;     InventOnHand     inventOnHand;     inventDim.InventLocationId = "01";     inventDim.modifiedField(fieldNum(inventDim,InventLocationId));     inventDimParm.initFromInventDim(inventDim);     inventOnHand = InventOnHand::newItemDim("111001", inventDim, inventDimParm); inventOnhand.availPhysical();

How to update contact in Dynamics AX 2012 Through X++

How to update contact in Dynamics AX 2012 Through X++     DirPartyContactInfoView         dirPartyContactInfo;     DirParty                        dirParty;     LogisticsLocation               location;     VendTable                       vendTable   = VendTable::find("Vendor number");     container                       roles;       location = LogisticsLocation::create("Phone", false);     DirParty::addLocation(vendTable.Party, location.RecId, false, true);     dirParty = DirParty::constructFromCommon(vendTable);     dirPartyContactInfo.LocationName                = "Phone";   ...

How to update address in Dynamics AX 2012 Through X++

How to update address in Dynamics AX 2012 Through X++     DirPartyPostalAddressView       dirPartyPostalAddressView;     DirParty                        dirParty;      VendTable                       vendTable   = VendTable::find("Vendor number");       dirParty = DirParty::constructFromCommon(vendTable);     select dirPartyPostalAddressView where dirPartyPostalAddressView.Party == vendTable.Party  && dirPartyPostalAddressView.IsPrimary == true;     dirPartyPostalAddressView.CountryRegionId   = "Jor";     dirPartyPostalAddressView.ZipCode           = "11";     dirPartyPostalAddressView.Street            = "";     dirPartyPostalAddressView.City...

How to remove value from default dimension in Dynamics AX 2012 Through X++

How to remove value from default dimension in Dynamics AX 2012 Through X++ static void  removeValueDefaultDimension(Args _args) {     DimensionAttributeValueSetStorage   dimStorage;     DimensionAttribute                             dimAttr;     DimensionAttributeValue                    dimAttributeValue;     DimensionDefault                                defaultDimension;     SalesTable                                            salesTable  = SalesTable::find('1000210',true);     ttsBegin;     dimStorage            = DimensionAttributeValueSe...

How to create dialog in Dynamics AX 2012 Through X++

How to create dialog in Dynamics AX 2012 Through X++     Dialog                      dialog = new Dialog("dialog caption");     DialogField              fldInventJournalId;     InventJournalId        inventJournalId;     boolean                     result;           fldInventJournalId  = dialog.addField(extendedTypeStr(InventJournalId));       result = dialog.run();       if(result)     {         inventJournalId     = fldInventJournalId.value();               info(inventJournalId);     }

How to build a dynamic form in Dynamics AX 2012 Through X++

How to build a dynamic form in Dynamics AX 2012 Through X++         #Task         DictTable                                              dictTable;         Form                                                     form;         FormBuildDesign                                 formBuildDesign;         FormBuildDataSource                         formBuildDataSource;         FormBuildActionPaneControl             formBuil...