This is the highlight the affect of [SysEntryPointAttribute(true)]Switching this parameter to true means that you have to define the permission for all the tables that are used. Otherwise you will get a permission error. Leaving it to false (defau…
Read more →This is an address to save for searching Dynamics AX Help on Microsoft site.http://www.microsoft.com/dynamics/ax/websearch/websearchax.htm
Read more →Dynamics AX 2012 Excel Add-in – Tracking Dimensions Purpose: The purpose of this document is to illustrate how to work with Tracking Dimensions in Dynamics AX 2012 Excel Add-in. Challenge: Data model changes in Dynamics AX related to high nor…
Read more →In my post about UtcDateTime in Dynamics AX, I recently received a question about determining if a specific string is a valid UtcDateTime in X++.I've spent some time looking into it and could not find an available method that could be used for that.
Also, it was not really clear, which format should be called valid.
Anyhow, I have so far discovered 2 ways to do it in AX: the simple way, and MY way
They produce slightly different results however. Let me know if you find other ways.
The simple way is to use the intrinsic function str2datetime.
As you can see on MSDN, it supports a couple of input formats, and if you provide a non-date value, will just ignore it silently and return an empty value.
However, when working with DateTimeUtil methods, the expected format is yyyy-mm-ddThh:mm:ss
Continue reading….
SOURCE: http://kashperuk.blogspot.com
Just a very quick tip today, related to macros:
As you all know, there are multiple ways to define and use macros in X++.
For those that need a refresher, please look up the corresponding section on MSDN
(Direct link: http://msdn.microsoft.com/en-us/library/cc197107.aspx)
Below is a simple X++ job, that demonstrates an existing shortcoming in the #define command, and a possible workaround for this problem.
Continue reading….
SOURCE: http://kashperuk.blogspot.com
Long back i seen video on new improvements made to existing X++ Editor. Lot of features have been introduced to get look and feel of visual studio editor.
Among all, I am very much impressed with 'Inserting Code Snippets' feature.
- During coding in editor, if you want to create main method
- You will make use of template and select main method or construct
- But in 2012, just type main and click tab will insert main method prototype.
Th author made a nice video showing some code snippets.
Continue reading….
SOURCE: http://learnax.blogspot.com.au
I wrote this really cool job a year or two ago to solve a fairly common, specific problem. This job solves many more problems I never anticipated though.
The consulting company I worked for made it their best practice to make sure that every object they modified was in a project. Our “Customization” project…the problem here is that not ever developer consistently remembers to put every object in the project 100% of the time, so import/export between environments would sometimes be missing objects.
So I use the base layer compare tool via Tools>Development tools>Version update>Compare layers to create a project of the “CUS” layer (normally the VAR layer for me). This gets all of the objects modified in the CUS layer in one project. Then I set that in the #layerCompareProject macro, then add my projects I want to check against in the lower lines of code.
I’ve used this tool countless times to compare two projects. Another use I had was during an upgrade to Roll Up 7 from Roll Up 1. Somehow I had deleted a modification to an obscure table…this made me worried that I could have accidentally deleted other objects that I would have no idea about. To check this, I went into Live and created a layer compare project of the CUS layer, then went into my upgraded RU7 environment and made the same layer compare project. Then all I had to do was run the job and it output the objects that were missing.
I think it’s clever/fun the way I wrote it too using recursion to reflect on the AOT. It’s basic recursion for traversal.
/* How to use: Create a compare project of the layer you want to check and make it SHARED! MAKE IT SHARED MAKE IT SHARED MAKE IT SHARED Change the constant "layerCompareProject" to the name of the SHARED layer project you just created Modify the first line from the main body of the job to be the projects you're searching customProject = infoLog.projectRootNode().AOTfindChild('Shared').AOTfindChild('Customizations'); traverseAndUpdateMap (customProject.getRunNode().AOTiterator()); Just repeat those two lines to add more projects...it will update and search them */ static void ProjReflection(Args _args) { #define.layerCompareProject('CUS_Live') ProjectNode layerCompareProject; ProjectNode customProject; Map map = new Map(Types::String, Types::Integer); MapEnumerator enumerator; void traverseAndBuildMap(TreeNodeIterator _tni) { ProjectNode pn = _tni.next(); ; while (pn) { if (!pn.applObjectType()) { // Recursively traverse the project traverseAndBuildMap(pn.AOTiterator()); } else { // Fill the map with every object we found map.insert(pn.treeNodePath(), 0); } pn = _tni.next(); } } void traverseAndUpdateMap(TreeNodeIterator _tni) { ProjectNode pn = _tni.next(); ; while (pn) { if (!pn.applObjectType()) { // Recrusively traverse the project traverseAndUpdateMap(pn.AOTiterator()); } else { if (map.exists(pn.treeNodePath())) { // We found an object in a project that already exists in the map // ...mark it as found [1] map.insert(pn.treeNodePath(), 1); } } pn = _tni.next(); } } ; layerCompareProject = infoLog.projectRootNode().AOTfindChild('Shared').AOTfindChild(#layerCompareProject); traverseAndBuildMap(layerCompareProject.getRunNode().AOTiterator()); // Modify these lines to search projects customProject = infoLog.projectRootNode().AOTfindChild('Shared').AOTfindChild('Customization'); traverseAndUpdateMap (customProject.getRunNode().AOTiterator()); /* // Add more lines if you want to search more customProject = infoLog.projectRootNode().AOTfindChild('Shared').AOTfindChild('InstallProj'); traverseAndUpdateMap (customProject.getRunNode().AOTiterator()); customProject = infoLog.projectRootNode().AOTfindChild('Shared').AOTfindChild('BoltOn'); traverseAndUpdateMap (customProject.getRunNode().AOTiterator()); */ enumerator = map.getEnumerator(); info("The following objects from [" + #layerCompareProject + "] were not found in searched projects."); while (enumerator.moveNext()) { if (!enumerator.currentValue()) info(strfmt("%1", enumerator.currentKey())); } }
In a recent post, I talked about AX 2012 and Diving into BI Analytics as a starting point back into a series of post around The BI Story for AX 2012. The point of this series of post, is to drive understanding of the BI options in Dynamics AX, and ther…
Read more →I have a customer that gets a error every time the EventJobCUD-batch (Change Based Events) runs. They got the following error: After some reseach I found out that when 2 fields are changed at the same time, you go several times through the listChangedFieldsEnumerator (location \Classes\EventProcessorCUD\processUpdate) 1 2 3 4 5 6 7 8 9
Read more →The financial dimensions gives more deep analysis for transactions occurred on General Ledger accounts where it gives Controllership an analytical view on transaction occurred on Expenses Account for example he/she can analyze account balance according to financial dimensions assigned to Ledger Account. The posting mechanism of Financial Dimension in the purchasing process during reception (Product
Read more →