Too many forms – Dynamics AX 2012 error

by Joe Brewer on May 24, 2014

Recently I had an issue with a customer who is using Microsoft Dynamics AX 2012 where users were experiencing the dreaded "too many forms" error. If you have experienced this issue you will know that the only way to stop it is to restart the AX client. Restarting the client, however only gets rid of the error for a short period of time.

Searching the net for information doesn't give much information on what can cause the error. One post from the awesome art of creation blog has some good information though. Especially for explaining how to monitor the user objects using windows task manager.

The "too many forms" error was unfortunately not caused by a missing super() call in a form, however the customer was happy to monitor the task manager whilst testing. I was pretty surprised at this as the people testing thought that this was incredibly tedious. However, the testers managed to narrow down where the problematic code was, and I was able to track down and sort the issue.

The issue was with third party code, as you would probably expect, but it wasn't written by me :)

The problem was essentially that a function was written that returned an object, but was called with out assigning the value to a variable. The main method of the SalesFormLetter class had been overridden to return the local salesFormLetter variable. The users only had to use this class a handful of times before getting the error and having to restart the client.

If you are getting this error, I would recommend getting your testers to monitor the task manager whilst testing. It may annoy them as it significantly slows down their testing, but will make it easier to narrow down the code that is causing it. When you have the form, class or whatever seems to have the issue, check out any customisations in that area.

{ 0 comments }

I'm currently in need of a wordpress plugin for mapping domains to subdomains for a site that uses cloudflare, and so want to put some thoughts together on the kind of options I would want/need to do this.

There are a number of wordpress plugins that already map domains, but none of them work well with cloudflare. This is because the mapped domain needs to be setup with a cloudflare account, and the current plugins all require a DNS A record to point directly at the server that is hosting wordpress. The new plugin would need to use the modified sunrise.php file that either of these plugins use to serve the correct blog content depending on which domain name the server receives.

The plugin would need to either create an entry for a website at cloudflare and create a DNS A record that points to the wordpress server, or notify the network admin so that the records could be setup manually. Ideally this would happen automatically using cloudflare's API - A network admin setup screen would need to hold the following details:

  • Server IP to use for the DNS A record
  • Cloudflare API credentials
  • Cloudflare account type to use
  • Cloudflare nameservers - to let the user know what nameservers to use

The details would be stored in network options so that they are available for all blogs.

Cloudflare has different options that can be applied to websites in a single account. It is free to add a website and use the basic options, but if you want to use SSL, Image optimization, better caching and other goodies, then it is $20 for the first website and $5 for subsequent websites. For the multisite installation that I run I want to have different levels of membership - a basic option costing $7 that doesnt allow domain mapping, and a more advanced that does allow domain mapping. I already use the cloudflare plugin that adds DNS CNAME records each time a blog is created, and I have the main blog on the on the plan that allows SSL so that all domains can use SSL. I want all mapped domains to use SSL as well. My first thought about making this work is to have two plugins - one to hold the details in the list above which is only visible to network admin, and a second plugin that can be enabled based on the user's membership level so that they can enter their mapped domain name.

Since the user would be giving up DNS editing, there should be basic options for adding DNS records in the user's control panel for things like MX, TXT etc.

Each time a user requests to map a domain name, or add a DNS record, an entry should be added to a single table that holds the blog id, DNS record information and date requested. This table could then be polled for new records that need to be entered into cloudflare using the API, or cloudflare could be manually be updated by viewing the list of changes in network admin.

Anyone got any other ideas or thoughts?

{ 0 comments }

Updates for the wordpress affiliate link cloaker plugin

July 7, 2012

It’s been nearly a year since my last post, and many months since the plugin last had any updates. This post outlines the new features in version 1.00.03: Removing data from the redirect log The way that the plugin works out how many redirects there are for each address is by logging each redirect and […]

Read the full article →

Affiliate link cloaker WordPress plugin

July 11, 2011

Affiliate link cloaker is a free WordPress plugin that can geo target cloaked affiliate links. This plugin has the capability to generate a link like http://www.brewsterware.com/recommends/amazon and have visitors from the USA click on the link and get sent to www.amazon.com, visitors from the UK sent to www.amazon.co.uk and so on. In addition to this, […]

Read the full article →

Region detect wordpress plugin

May 22, 2011

Region detect is a plugin for WordPress that detects the country that the current visitor is browsing from. It can display the country to the user; something like: Hello visitor from %%COUNTRYNAME%% This is done by using the codes %%COUNTRYCOD E%% and %%COUNTRYNAM E%% in your posts (take out the spaces). The plugin makes the […]

Read the full article →