Yurii Rasskazov has ported Tabax on Ax4 see here:
Axapta programming blog: practical HOWTOs: How to make Dynamics AX interface more user friendly with Tabax?
Microsoft Dynamics Ax developer's blog
Friday, September 22, 2006
Tuesday, September 12, 2006
[ann] Sidax 0.3.6 -- X++ calculator; Go component
Download from axaptapedia
X++ calculator -- evaluate X++ expression or run X++ statement

Go component -- enter component name and choose concrete component from list. You can enter path like "\Data Dictionary\Tables\VendTransOpen"
X++ calculator -- evaluate X++ expression or run X++ statement

Go component -- enter component name and choose concrete component from list. You can enter path like "\Data Dictionary\Tables\VendTransOpen"

Wednesday, September 06, 2006
Wednesday, August 30, 2006
AOT VSS Integration

Just uploaded the project for integration Visual SourceSafe with Axapta to store AOT items.
We've used it for our current projects and it help us to find what and why changes was made.
I think it will be good to use something other than VSS, and it can be done - tool is based on the abstract classes, but now i have only VSS implementation.
Friday, August 25, 2006
GenerateParmMethods extension v2.beta
Just uploaded small fixes to the extension.
Read about the anges at axaptapedia, then download it if you like
Read about the anges at axaptapedia, then download it if you like
Saturday, July 15, 2006
ATTN!!! SQL Injection possibility when using literals in queries
I've found a huge security hole in Ax 3.0 SP 4 + MS SQL Server (i don't know about other versions, but i think it is possible with other versions too)
If you have the following database connection options switched on, users can execute any SQL Server query using user defined filter.
So switch off:
Dont't use forceLiteras in production environment.
It can affect performance but will protect your data
If you have the following database connection options switched on, users can execute any SQL Server query using user defined filter.
So switch off:
- Literals in join queries from forms and reports
- Literals in complex joins from X++
Dont't use forceLiteras in production environment.
It can affect performance but will protect your data
Thursday, July 06, 2006
On toolbars
Palle Algemark has recently posted about toolbars imitation in Ax:
Custom toolbars in AX,
Activating a custom toolbar
I have something to add:
Custom toolbars in AX,
Activating a custom toolbar
I have something to add:
- if you want to do something with selected AOT items - use LastAOTSelection class (it's an iterator for last selected AOT items)
- if you want to do something with active form: sit on timer, get last active form from info class (method setLastActivatedForm),remember it it's not your toolbar form and use remebered value on button clicks
Tuesday, May 23, 2006
Undocumented syntax: raw strings in X++
While reading the Fred Shen post Create a method in runtime i discovered the undocumented feature of X++: raw (or verbatim strings). If you place @ before " you can:
so
is equivalent to
so it is useful when you want to make methods or AOT pathes (BTW why Fred uses string for pathers ("\\Forms\\Address\\Data Sources\\Address\\Fields\\AddrRecId") instad of raw strings (@"\Forms\Address\Data Sources\Address\Fields\AddrRecId")
see also
- do not escape escaping characters
- make multiline string
so
str s=@"
test\test
";
is equivalent to
str s="\r\n";
s=s+" test\\test\r\n"
so it is useful when you want to make methods or AOT pathes (BTW why Fred uses string for pathers ("\\Forms\\Address\\Data Sources\\Address\\Fields\\AddrRecId") instad of raw strings (@"\Forms\Address\Data Sources\Address\Fields\AddrRecId")
see also
Sunday, May 14, 2006
ParserClass and KOAN
Just finished an article about a ParserClass and added the new tool named 'KOAN'. It shows the structure of X++ code and lets to play with ParserClass and ScannerClass easily.

Saturday, May 06, 2006
Sidax 0.3.5
Now you can download it (20k).
What is Sidax?
- if you press a small heart at the main menu you see only previously used menu items
- you can move you settings between databases (see 'about' tab)
- if you rightclick the project history you can delete projects from history nd copy names
- small visual improvements
What is Sidax?
Saturday, April 22, 2006
Feed to read
Axapta specific
- Axapta Blog - Helmut Wimmer,
Ax Developer from Austria - Axapta Knowledge Village -
full of press-releases but sometimes can be something useful - Axapta Lessons Learned -
the last post was in 2005, but worth to read - Axaptapedia - it is not a blog,
but contains recent changes feed. It contains information and nothing else. - dynamics-ax.blogspot -
it contain old useful posts but recent are dedicated to marketing opf something
called "to increase" - Dynamics AX Geek - contains some useful
info for ax devs - Harish Mohanbabu - Axapta MVP -
- some integesting posts. His homepage contains
lots of integresting things too. - msdn:mbs -
contains feed with recent articles at msnd about mbs products - Palle Algemark - Microsoft
developer from Ax team. Blog contains useful info - Solutions Monkey
- Microsoft employee blogging about MBS events. Not very useful, but interesting
Other
- .NET undocumented -
if you interested in .NET, Office and other Microsoft technologies, subscribe to this - Martin Fowler - OOP, TDD, XP
and other smart things - Joel - wise thoughts about software development,
hiring of programmers, merketing and so on
Tuesday, April 11, 2006
Monte Carlo profiling
Axapta profiler is useful, but very slow (it can make your code 30x slower when enabled). So sometimes i use the following trick (it is like Monte Carlo method in math):
PS. Maybe, I simply do not know how to deal with profiler well, but it is hard to me to estimate real timing from profiler output. Maybe anybody can provide some tips for this?
- run the job being profiled
- break it randomly and go to the debugger to see what is going on (Ctrl+Break then Shift+No)
- if you break often in some place, it can be hotspot
PS. Maybe, I simply do not know how to deal with profiler well, but it is hard to me to estimate real timing from profiler output. Maybe anybody can provide some tips for this?
Monday, April 10, 2006
Thursday, March 16, 2006
The magic semicolon
Example
This X++ code compiles well, but have Two potential errors:
static void test(Args _args)
{
int axcoder, axcoder1;
axcoder=1;
axcoder1=2;
}
This code is fragile. Try now to add the new type called 'axcoder'. Introduce a new class with the name 'axcoder', for example.
You will get a syntax error.
The problem is that designers of X++ decide to:
- allow variables and type with similar name (so it is not possible treate a type as a variable of the special type, lead to tableNum, classNum and other ...Num literals in X++, blocks to declare variables in any place of code and so on)
- do not lookahead deep enough to resolve this collision - so you and me we both able to decide that axcoder is not a class name here, but X++ parser does not (i am not sure its an easy task, but i think it is possible)
There is a common workaround for this situation: add an extra semicolon after the end of declarations like this:
static void test(Args _args)
{
int axcoder, axcoder1;
;
axcoder=1;
axcoder1=2;
}
Now the code compiles well. But this is not the end.
Try to introduce a new class with the name 'axcoder1'.
Oops! One more syntax error.
The cause is the same.
Now let's split multivariable declaration to two;
static void test(Args _args)
{
int axcoder;
int axcoder1;
;
axcoder=1;
axcoder1=2;
}
This compiles well.
Conclusion
X++ developers didn't copy java accurate enough. The decide to reinvent the wheel so X++ is sometimes ugly. It allows you to compile code which become brocen if anybody introduce the class with a special name. I have seen examples of such fragile code even in sys layer code (see \Classes\SysLookup\lookupTableFieldRelation for example).
There are simple rules to avoid such errors:
- don't use multivariable declarations
- insert extra semicolon after declarations end (but you can ommit it if the first non-declaration is a keyword for example return)
- dont use simple name for classes ('i', for example) which can be name of the variable in existing code
Note on style
I prefer to keep extra semicolon as the first character of line so it help to delimit internal fuction from the main function body:
void test()
{
void subFunction1()
{
// body of subFunction1
}
void subFunction2()
{
// body of subFunction1
}
;
// body of the main function
}
Saturday, March 04, 2006
Sidax 0.3.4 - user mode sidax
Changes in this version:
- Its now safe to run sidax by end users -- checks for access to menuitems added; check for development rights at start removed
- now you can setup project window titles and timings by editing the 'class declaration' section of sidax
- window tab reflect window title changes
- sidax now uses default menu of the user instead the main menu
Ideas: AxPath protocol
Imagine that you have an ability to create links to everything in axapta: forms, records, classes, busines objects (for example orders). You can insert that link in the web page or e-mail and your correspondent can click on this link and open the item you linked to from browser or email client. For example you open Purchase order 'P0002', click the 'copy link' button and send a letter with words "look at order P0002" and sombody who have received this message can simply click on the link to open this order.
This document describe proposal to introduce that kind of links read more..
This document describe proposal to introduce that kind of links read more..
COM in Axapta
Just published article in the Axaptapedia in answer to post in microsoft.public.axapta.programming
Wednesday, March 01, 2006
How to make Sidax autostart.
If you do this, Sidax will start, when you login Axapta.
Open class Info and modify the startupPost method. Replace yourUserID with the name you log in to Axapta.
Note: If you want to skip question, just remove:
Open class Info and modify the startupPost method. Replace yourUserID with the name you log in to Axapta.
/*
No SYS code must exist in this method
*/
void startupPost()
{
;
// ======== Sidax start: =============
// check for user ID and ask for confirmation
if(curUserId()=='yourUserID' && Box::yesNo('Run sidax?', DialogButton::Yes)==DialogButton::Yes)
{
// actually run sidax
TreeNode::findNode('\\Forms\\Sidax').AOTrun();
}
// ========== end of Sidax start =============
}
Note: If you want to skip question, just remove:
Box::yesNo('Run sidax?', DialogButton::Yes)==DialogButton::Yes)
Tuesday, February 28, 2006
Dynamics AX: Writing a report to file, through code
Dynamics AX: Writing a report to file, through code
The very usefull blog post about working with reports.
The very usefull blog post about working with reports.
Subscribe to:
Posts (Atom)