Archive for the ‘Development’ Category
Monday, February 18th, 2008
We start out in the PurchTable form where we, by clicking a button, calls a class with the help of a menu item. The menu item has been given the datasource PurchTable.
The called class updates the record that was selected in the PurchTable, but when this is done the user cannot see the changes without pressing F5 or restarting the form completely. The method FO_doRefresh() does a refresh on the PurchTable Form.
(more…)
Tags: args, caller, ClassIdGet, ClassNum, formHasMethod, Refresh, tableId, tableNum
Posted in Development, Dynamics AX, Dynamics AX 4.0 | 2 Comments »
Wednesday, February 13th, 2008
In Dynamics AX it is possible to select multiple records in any form, well at least you can if more than one record is visible. This example describes a simple way to handle the selected records before doing something with or to them. In this example we have a clicked-method on a button. If, and only if, the new field “newField” on our table “TestTable” is set on all the selected records, then the super() is run.
(more…)
Tags: getFirst, multiple, records, strfmt
Posted in Axapta 3.0, Development, Dynamics AX, Dynamics AX 4.0 | No Comments »
Friday, January 25th, 2008
This is some basic things you can do with the WinAPI class.
(more…)
Tags: deleteFile, fileExists, folderExists, winapi
Posted in Development, Dynamics AX, Dynamics AX 4.0 | 2 Comments »
Thursday, December 13th, 2007
The editor in Axapta is as easy to extend as the rest environment. If you check the class EditorScripts, you see a list of methods which is standard. In this example we add a little script which marks your inputed extra code. We always mark all added or changed code, to make it easier to see afterwards what’s added and what’s standard. By doing this it is also makes it very easy to search for all code related to a certain project. This code is an example of what we all use several times a day.
(more…)
Posted in Axapta 3.0, Development, Dynamics AX, Dynamics AX 4.0 | 3 Comments »
Wednesday, December 12th, 2007
When you want a grid in a form to be updated on a regular basis (so your users always see latest information), you need to add a timer to your form. You need two things. A timer method and a initial call to it when the form starts.
(more…)
Posted in Development, Dynamics AX, Dynamics AX 4.0 | 1 Comment »
Tuesday, December 11th, 2007
Found this blog entry made by Kamal. The entry explains how to use the SysInfoAction classes. I played around with this classes and found out that you can get pretty specific when referring the user to the source of the info message.
This is a simple job that produces an info box that gives the user the option to open a form and edit a specific field on a specific record:
(more…)
Tags: info, infolog, SysInfoAction, SysInfoAction_FormRun
Posted in Development, Dynamics AX, Dynamics AX 4.0 | No Comments »
Friday, November 30th, 2007
I have recently done some modifications that required certain data that was very time demanding to enter manually in Dynamics Ax. This data was also needed in a number of different companies which meant that I had to enter this data several times.
Because I’m against all that is time consuming I created a script that only require that I enter my data once and then lets me copy this data to the other companies.
(more…)
Posted in Development, Dynamics AX, Dynamics AX 4.0 | No Comments »
Tuesday, November 27th, 2007
When working in forms and using display methods, sometimes they have a tendency to slow down the form to the degree that makes you wonder if it’s worth it at all. This is when cacheAddMethod comes in handy.
When using cacheAddMethod we place the method in memory, the effect of this is that the method only runs once when the form loads and then every time we switch between records. This instead of display methods normal behavior, which means it runs every time all the time.
For the cacheAddMethod to do what it’s supposed to we need it to run when the form starts up. If we have created the display method “OurTestMethod” on table SalesTable we want to place the call to cacheAddMethod in the init method on the form datasource SalesTable.
(more…)
Tags: CacheAddMethod, cacheCalculateMethod, datasource
Posted in Development, Dynamics AX, Dynamics AX 4.0 | 1 Comment »
Thursday, November 22nd, 2007
This little script creates an Excel .CSV (text) file of complete Data
Dictionary of current Axapta environment. Handy when you need
to have a collected list of all tables and there fields with types etc.
(more…)
Posted in Development, Dynamics AX, Dynamics AX 4.0 | 1 Comment »
Monday, November 19th, 2007
The class inventOnhand is very useful when retrieving inventory information for a specific item.
If we want to get the sum of an item for all warehouses and all configurations:
(more…)
Tags: availOrdered, availPhysical, InventOnhand, physicalInvent, reservOrdered, reservPhysical
Posted in Development, Dynamics AX, Dynamics AX 4.0 | No Comments »