Saturday, December 24, 2011

Error in Management Reporter: "The request for data from Microsoft Dynamics AX failed. Provider query name: LedgerMRBalanceRequestQueryBuilder"

Issue:
When generating a YTD Balance sheet in Management Reporter (MR) for AX 2012, we were seeing an error being thrown and the report did not run.

The error: “The request for data from Microsoft Dynamics AX failed. Provider query name: LedgerMRBalanceRequestQueryBuilder.”

We checked the appropriate permissions to all folders that MR must access but we were still getting the issue.

The error was isolated to that one specific report as we could run other reports without issue.
Cause:
The report had a significant amount of data in it and it was causing the query to fail.

Workaround:
Breaking down the report into smaller sections allow the users to run the report without hitting this issue.

Resolution:
This was an MS product issue.  Thankfully, the helpful staff in Fargo was able to resolve it and push out the resolution out in the new AX2012 MR provider Service pack.  Download it from customersource/partnersource to resolve this issue.  The name of the update is
'Microsoft Dynamics AX 2012 Provider for Service Pack 2'
Name of the file you will be downloading: AX2012Provider.zip

Hope this helps!!

Tuesday, December 20, 2011

Run static method through X++ code

The following is code that will allow you to run a static method using two strings and a container. You need to assert and revert permissions around doing this but it allows you to dynamically run a static method without knowing what the method is.  This is good for frameworks.
  • _className     = the string name of the AX AOT Class name.
  • _methodName = the string name of the method from the AX AOT Class above.
  • _params           = the container which has the variables, [parameter 1, parameter 2, etc]. 
// Start DAX code
// From parameters:
ClassName _className
MethodName _methodName
Container _params;
// From method variables
Container               result;
DictClass               dictClass;
;

// This code will run the static method
executePermission = new ExecutePermission();
executePermission.assert();

dictClass = new DictClass(className2Id(_className));
result = dictClass.callStatic(_methodName, _params);

CodeAccessPermission::revertAssert();
// End DAX code

This code is dynamic and powerful.  Enjoy!

Monday, December 19, 2011

How to get to AOT in AX 2012 (Application object tree)

I was asked this question by someone who was a 3 year seasoned application AX person recently. This person knew enough AX development to be dangerous but was not a developer.  He never claimed to know dev but in talking with him, he knew his stuff.  Which brings me to the question that was asked, "How do you get to the AOT in AX 2012?  It doesn't look like you can anymore".  

I was kind of confused at how the person did not know the answer but then, after talking a bit, realized they would only access the AOT through the AX toolbar. I actually met 2 other people who I know did the same thing.  In AX 2012, the IDE is actually a whole seperate workspace in contrast to previous versions of AX which were all tiled together.  With this new configuration, that button is gone (or moved. I don't know. I never use it...).

Getting to the AOT is as easy as hitting Ctrl+D as long as your user rights permit it.  I could put up screenshots and get into the details but I think everyone who is involved in AX knows that the easiest way is the best way. Just hit Ctrl+D when you are in your AX instance and, BLAMMO!, a new instance/workspace of AX with the AOT will appear to you like a magic genie in a bottle. 

Easier and faster than ordering room service...  Enjoy!

AX 2012 WCF Error: 'The specified client configuration does not contain valid WCF settings'

I hit the following error while working in AX 2012: 'The specified client configuration does not contain valid WCF settings' (Figure 1 below).  This seemed to happen all over the place when specfic actions were done. Didn't care or have enough time to pin point what.  The actions were pretty varied and seemed almost random.  Try running the On Hand Inventory report...

This error was only encountered in AX 2012.  It is because of an issue with a new feature in the AX configuration file that needs to be fixed through the configuration utility.  Do the following to fix the issue:
  1. Open the .axc where this issue was being seen in the Microsoft Dynamics AX Configuration Utility.
  2. Click on the 'Connection' tab
  3. Click on the 'Refresh' button and wait for the proces to complete.
  4. Click on the 'Configure Services' button'
  5. You will now see the info message in Figure 2. Click 'Ok'
  6. You will now see the info message in Figure 3. Click 'Yes'
  7. You will now see the info message in Figure 4. Wait for the process to finish.
  8. You will now see the info message in Figure 5. Click 'Ok'
  9. A new window for Microsoft Service Configuration Editor will appear (Figure 6 below).  You can close this screen.
  10. Save this configuration
  11. Open the config file and verify there is an XML section of the file (Figure 7 below).
  12. Replace the config file in all the user's desktop with the new one.
Figure 1 - The error at hand...
Figure 2 - Clicking 'Configure Services' will give this information. Click 'Ok'

Figure 3 - Clicking 'Ok' in Figure 2 gives this message. Click 'Yes'
Figure 4 - Clicking 'Yes' in Figure 3 will show this process window.  Wait for it to finish
Figure 5 - Once Figure 4's process is complete, this information is presented. Click 'Ok'
Figure 6 - This pops up at the end of the process.  Just close out of it.
Figure 7 - This is what opening the new .axc file looks like after running that process.

Monday, November 14, 2011

AX 2012 for Retail POS development

As I stated in one of my previous posts, the AX for Retail solution is highly customizable. There is not a lot out there on the web about it but there should be. While I am not so much of a technical person anymore (just by title...), I will still do a bunch of mods in this solution to make sure I know my stuff.

A functional consultant that knows the technical aspects of things is an extremely valuable resource and I can assure you that I will stay current with tech to keep that badge.

I'll post some stuff on here as I do it to keep people informed of my adventures.

Here is one great blog post about retail POS development that I've found helpful.  I hope you will, too.  I hope to come out with one that is equally as helpful that people will come to as well...

http://blog.rahulsharma.in/2011/09/dynamics-ax-for-retail-pos-development.html

AX 2012 for Retail history summary and how it got to where it is today

Microsoft had two primary Point of Sale (POS) solutions in their Dynamics software stack: Retail Management System (RMS) and POS 2009.  These solutions were great for cash and carry retail operations that had a few locations and could handle a fair amount of volume without a problem.  They handled all of their backoffice functionality in smaller accounting solutions like Quickbooks and PeachTree to name a few. 

For larger companies, Microsoft's Dynamics AX (Axapta) solution was the obvious choice for their backoffice applications as these smaller accounting solutions were not capabale of sustaining their operations. The issue with these POS products and larger corporations is that they were developed for smaller operations out of the box (OOTB).  The major selling point of large scale ERP's are their abilites to centralize managment of all operations into a single location.  These products had to be adapted for larger companies via third party integrations like ToIncrease's Retail Chain Management (RCM) or Blue Horseshoe's Retail Operations Bridge (ROB) interfaces (for example) in order to integrate RMS to the AX system.
There were two issues with this solution: 1) Not a OOTB integration with a lot of effort in upgrading  and 2) RMS was not a flexible application to allow major customizations like AX was able to.

As many in the AX industry know, AX is VERY customizable.  With this customization power comes great customization responsibility.  As an observation, the larger a corporation was, the more unique requirements their business contained.  This created an obvious limitation of using these solutions as they were not very customizable.  To note, they did not need to be and they did their job extremely well.

In order to bridge these two gaps, Microsoft purchased LS Retail POS and ToIncrease's RCM in order to develope their own, highly integrated, highly customizable POS end-to-end solution for their larger clients.  From this came AX 2009 for Retail.  This was a great product and everyone instantly saw that every implementation had customizations.  I have yet to hear of a single solution that was 100% OOTB.  This was by design as one size does not fit all.

Microsoft will soon release in the third quarter of 2012 (tentative), the AX 2012 for Retail feature pack.  This is currently in the TAP process at the moment.

This is obviously just a high level history of how AX for Retail came to be.  I left some stuff out and may have been too broad in some areas so please comment below if you can help add to this.  I'm always interested to learn the background of stuff...

Tuesday, November 8, 2011

Allow a single user name to log into a server without taking over a session

The following should be used very carefully. I thought I would write about it since it helped me out of a tight situation a few times.
An example of where I used this: There is a third party application running at a client site and it doesn't seem to work for any other user except for the administrator account on that machine.  The client wants to get in there and start using the program but the vendor is unavailable to assist at the moment.  By allowing multiple people to log into the single administrator account, it helps progress move forward.  THIS IS NOT IDEAL FOR A LIVE ENVIRONMENT.

A note to people making config changes: PLEASE TEST YOUR CHANGES.  DO NOT ASSUME THIS WILL JUST WORK SINCE I SAID SO.  This is a VERY important step and seperates the posers experts and the real experts that know better.

The following is for Remote Desktop Services (RDS).  Microsoft (MS) rebranded Terminal Services (TS) as RDS.  This process can be done with any user that has privileges to do this and it affects all users logging into that server.

Step 1 - Navigate to 'Remote Desktop Session Host Configuration'
To get here, go to: Start -> Administrative Tools -> Remote Desktop Services -> 'Remote Desktop Session Host Configuration' (See Figure 1 below)

Step 2 - Uncheck the 'Restrict each user to a single session' box.
Once in Remote Desktop Session Host Configuration, under the 'Edit Settings' section, look at the options in the General option.  The third one down should read 'Yes' if you log into the server and immediately take over an active session.  Double click on this option and you will see the form in Figure 2 pop up.  Uncheck the 'Restrict each user to a single session' box and click Apply. 

Step 3 - Validate the changed setting
While keeping your current session open, open a new RDP session and log in as your current user.  If the new window opens a fresh instance on the server, you're all set!

Hope this helps!

Figure 1 - Navigate to 'Remote Desktop Session Host Configuration'

Figure 2 - Uncheck the 'Restrict each user to a single session