Skip to main content

Posts

Showing posts from April, 2014

Catching a key stroke in AX 2012

Courtesy: http://www.doens.be/2010/03/catching-a-key-press/ When you want to catch a key-stroke on a form, you can override the method task() The default method will look like this: public int task ( int _taskId ) { int ret; ret = super ( _taskId ) ; // write you're code here return ret; } Now you just need to check the _taskId , to know witch key you have stroke. You can compare this withe the values from the Task-macro. // Task-ID values, to be used with formControl's // return value from the method task() //--------------------------------------------------------   #define. taskF1 ( 257 ) #define. taskCtrlQ ( 264 ) #define. taskEnter ( 288 ) #define. taskShiftEnter ( 307 ) #define. taskNew ( 260 ) #define. taskSave ( 272 )   #define. taskShortCutMenuKey ( 519 ) #define. taskAlt ( 520 )   #define. taskCut ( 770 ) #define. taskCopy ( 771 ) #define. taskPaste ( 772 )   #define. taskDeleteKey ( 773 ) #define. tas...

Barcode printing and scanning ax 2012 | Useful links & material

I came across client's requirement to integrate barcode scanner and printer with AX in their production process. So inventory in (pick list generation) was done using barcode scanner, and at the end of each process (RAF journal) production sticker is generated with Item id and its batch number. First of all, le tme tell you that barcode scanner is just like an external keyboard attached to system, its drive gets auto-installed in windows (I tried on windows 7). As soon as driver gets installed yoou can test the scanner by opening a notepad and scanning some barcode, which will input contained information on notepad. Same would be the case in AX. You just need to place cursor on a field and scan the barcode. No integration tool required whatsoever. So it's pretty simple and easy. I used custom code to generate code39 barcode, and added a table field (with EDT barcodeStr) to save barcode string having item and batch number separated by % symbol, so I might be able to parse ...