Post InventJournal by X++ code
I have faced the problem to post InventJournal from code. I found a possible solution. Here is a job, that demonstrate this solution: static void JobInventJournalPost(Args _args) {...
View ArticleWMS movement by X++ code
Here is a simple method to move a quantity of items from one WMSlocation to an other. void createPostTransferJournal(ItemID _itemId, Qty _qty, WMSLocationId _from, WMSLocationId _to) {...
View ArticleShutDown AX by code
Here is a click-method that close the AX client without any furher prompts. void clicked() { info info; SysGlobalCache cache = appl.globalCache(); ; super();...
View ArticleChange form header by code
element.design().caption(strfmt(‘%1 – %2′,"Receiption",VendTable::find(PurchTable.OrderAccount).Name));
View ArticleOverride the event methods on dialog controls in Dynamics AX
I found info here: http://dynamicsaxsolutionsworld.blogspot.dk/2010/12/override-event-methods-on-dialog.html In generally most of the Form control events (Modifying Field, Cursor movements, Focusing...
View ArticleSet text in form window header
element.design().caption(strfmt(‘%1 – %2′,"Vendor",VendTable::find(PurchTable.OrderAccount).Name));
View ArticleHow to pick and post packing slip by code
Found here http://blogs.bojensen.eu/?p=945 See here how to register a new InventPick and post a packingslip static void PickAndPackingSlip( InventtransId _InventtransId = "XXXXX",...
View ArticleHow to prevent user to leave a form – Set form modal
AX does not provide the possibility of making a form modal. I found the following code, that solved the problem For any form (not dialogue) possible do so… but this it is necessary to use only as...
View ArticleAX 2012 Creating report with report Data provider [RDP] as data source
Report Data provider [RDP] as data source type in data set – SSRS reports [Dynamics ax 2012] I am excited to share this new source of data[RDP] for the dataset..We all know in the older version, for a...
View ArticleHow to Build QueryRanges
queryBuildDataSource = query.dataSourceTable(tablenum(CustPackingSlipTrans)); if(deliveryDateFrom && deliveryDateTo) { queryBuildRange =...
View ArticleImport from csv
static void GITS_ESH_CleanupCustomer(Args _args) { CustTable custTable; CustTable tmplCustTable; DirpartyTable dirpartyTable; DirpartyTable...
View ArticleAdding code templates/shortcuts in AX 2012
If you’ve got any blocks of code that you use frequently, e.g. specific comment blocks, you can very easily add code short cuts in AX 2012 to auto-insert the them in to your X++ code. For example you...
View ArticleAxEditorAdvanced–an extension to so called XPP Editor in Dynamics AX
Short Description: AxEditor Advanced is a little Extension of the so called XPP Editor in Dynamics AX. It allows you to perform EditorScripts or AxEditorAdvanced AddIns with Shortkey. AxAdvancedEditor...
View ArticleHow to disable AutoComplete functionality on controls
In this article: http://tech.alirazazaidi.com/how-to-disable-autocomplete-functionality-on-controls-dynamics-ax/ i found this: How to disable autocomplete functionality on Form Control in dynamics Ax....
View ArticleSplit up string
List strSplit(str _stringToSplit, str _delimiters) { List list = new List(Types::String); int oldPos = 1; int pos; int strLength = strLen(_stringToSplit); do { pos =...
View ArticleHow to debug Windows Script Host, VBScript, and JScript files
To debug WSH scripts in Microsoft Visual InterDev, the Microsoft Script Debugger, or any other debugger, use the following command-line syntax to start the script: wscript.exe //d <path to WSH...
View ArticleGet next PurchID from Number Sequence through X++
Get the Number Sequence through X++ //This following code to get the number sequece by using code. //this following example describe to get purchID and ProjJournalID ProjJournalTable _projJournalTable;...
View ArticleCreate and post Inventory Movement Journal by X++ code
Following is the sample job to show how we can create and post movement journal by making use of available api’s in the Dynamics AX. static void createMovJournal(Args _args) { InventJournalTable...
View ArticleMarking Inventory by x++ code
I found several samples that solved the problem in AX2009. At last I found the following code: static void testXppMarking(Args _args) { InventTrans issueInventTrans; TmpInventTransMark...
View ArticleShow changed fields in a record or row
How to compare a record with the origin record static void changedFields(Common _rec) { Common recOrig; DictTable dictTable; DictField dictField; SysDictField...
View Article