Simple Move Control Script

Here’s a quick and easy script to simply move a control on the panel, it takes the control name and new positions as the arguments.

Continue reading

Posted in Development, M3 / MoveX, Misc | 2 Comments

Heads Up – Windows 10 Anniversary Update and Smart Office JScripts

Microsoft has recently started rolling out the Windows 10 Anniversary Update – which is great, however it does cause an issue with Smart Office and JScripts.

Smart Office will download the .js from the server, it will go through some of the compile phases, however it doesn’t produce the final .dll which Smart Office attempts to load and generates an exception similar to this:

MForms.Render.RenderEngine.PostRender Failed to run scripts
System.IO.FileNotFoundException: Could not load file or assembly <path to .dll>

and of-course the script doesn’t run. If you are using precompiled .dlls directly, then they work without issue.

Infor released Smart Office hotfix 17 for 10.2.1 last week which looks like it has resolved the issue. Once applied Smart Office will show a version of

Posted in Development, M3 / MoveX | 6 Comments


A while ago I was looking at standardising some of the debugging information applications I wrote would output, and on a reasonably regular basis I’d want to verify data my code was passing to APIs, especially if there was an error on the call.

It was during the search that I came across the ToLogString() method on the MIRecord.

Continue reading

Posted in Development, M3 / MoveX | Leave a comment

Virtual Fields and Time

I’ve been working on a project recently where we create a relationship between records in MWS070 and other data without code. One of the key fields is the RGTM, the record time. If you look at RGTM in MWS070 then you’ll notice it is rather helpfully formatted to HH:mm, in the database however it is formatted as HHmmss – this creates a problem when we want to create that relationship.

This is really a post to illustrate that you can do some really funky stuff with virtual fields – very easily.

Continue reading

Posted in M3 / MoveX | Leave a comment

M3 Business Engine and Grid Monitoring

A wee while ago I posted about some monitoring scripts that I wrote which also provide trending – but I was pretty slack and never got around to posting them, here they are. 🙂

This is a little light on the details but it should at least provide people with some ideas on how to achieve some fairly comprehensive monitoring for free.  There is a lot that can be done to automate the deployment of this – but it’s a project for another day and there is a lot in this post as it is.

Note, I’ve only used these scripts on M3 13.2 and 13.3

If you do intend to use these scripts and modify or enhance them, then I ask that you provide the enhancements so everyone can benefit.  I’ll be looking at setting up a github page to make it easier.

We have a combination of Perl and Powershell scripts and for convenience I’ve created a Linux VM which has an ftp server, rrdtool and the Perl packages that the scripts use. SUSE provide some neat tools which allows you to build a JeOS low foot print Linux distro.

You can retrieve the VM from and search for M3 Monitoring

The default the username is root, the password is linux (something you should change when you install :-)), it’s also set up for DHCP, again something that you may want to change.

And then use the scripts from this post which I drop in the the /root directory.

Continue reading

Posted in M3 / MoveX, Monitoring | 2 Comments

Usernames and the Beauty of LDAP


As part of a project to standardise our network I’ve needed to change our authentication source from Novells eDirectory to Microsofts Active Directory and along with this change, standardise our user naming scheme. There are a number of challenges in doing this, but due to the flexibility that seems to be inherent in most LDAP based authentication implementations, I was able to make that change without staff being any the wiser.

So I have a couple of challenges

  • Usernames in AD are different to the M3 usernames in MNS150
  • Deadline to remove eDirectory
  • Limited hours of work – I work part time at IFL, and tend to be booked pretty solidly with other customers.

With a relatively compressed timeline we go with my favourite methodology, multiple minimal changes for minimal disruption.

The usernames in AD are different to the M3 usernames in MNS150. To reduce impact and due to some other more visible changes for staff, I don’t want to have to rebuild the security in M3 as part of this technical change – I want them to authenticate with their old usernames until I have capacity to deal with anything that might get missed from a security or output perspective within M3.

As I mentioned in my opening paragraph, most LDAP authentication implementations I’ve come across are pretty flexible – you can usually define the LDAP attribute that will be used to define the ‘username’ – often you can also check multiple fields, so for our reverse proxy I used to check the CN and Mail attributes for the ‘username’.
The LDAPSession Provider is no exception, we have the User ID Attribute field which defines which LDAP Attribute we will look for

And as you can see I’ve nominated the comment LDAP attribute, typically you would use the sAMAccountName in an AD environment.

Against the AD user, I just populate the comment field with the MNS150 name as below

For some users, the sAMAccountName will be the same as the comment, for others they will be different until I embark upon cleaning up the MNS150 users – but at that point I can do it on a user by user basis over however long I choose.

Note: that while this works for a traditional M3 software stack, I haven’t investigated the impact of peripheral products like DAF, and Mingle – so though I would expect to be able to do something similar with those products, it may not work.

My plan becomes

  1. Populate the Comment attribute for all M3 users in AD with their MNS150 username
  2. Point the authentication at AD rather than eDir
    For staff whose MNS150 records don’t match their AD username
    1. Set up a new user in MNS150 matching their AD username
    2. Set up their M3 rights for the new MNS150 username
    3. Set up their outputs
    4. Quietly ask them to log in with the same username they log in to their computers
  3. Once all staff have transitioned, change the LDAPSession Provider to point back to SAMAccountName, and clear the comment field from each user

From an IFL perspective, this meant the cutover happened one evening and people logged in the following morning without knowing anything had happened. It also meant that I could easily swap between the two authentication sources with a couple of changes to settings on the LDAP Session Provider – rollback becomes an easy 5 minute job.

When I embark on step 3, I will be able to change an individual users ‘Comment’ attribute to be the same as their AD Username and ask them to use that to log in to M3 going forward.

Posted in M3 / MoveX, Misc | 2 Comments

H5 – Requesting, Requested, RequestCompleted Events

Recently a customer tasked me with creating some scripts – the kicker, they wanted both Smart Office and H5 versions of the scripts.

The original scope for the scripts was pretty simple, so creating them wasn’t an issue – but as scope changed I encountered an issue – I needed to be able to cancel the Next event. As we’ve been able to do this since I started scripting with ISO, I figured that this wouldn’t be an issue – but it warranted some investigation before I committed.

Some quick checks of H5 and I couldn’t find the Requesting/Requested/RequestCompleted events – not so good. So I flicked an email off to one of the friendly ISO developers and was told that it had been recently added. The customer was running MUA, but I had another customer running Checking on the later version, I could see the following:

Which is a promising sign, digging a little deeper we find…

So I can be pretty confident that the later version has the functionality.

Cue the paranoia…just how do the events work under the H5 client? I didn’t want to assume, so I threw together a script to test the behaviour and sure that it worked just as it does on ISO.

See the script at the end of the post – but it will output the following.

The interesting thing that I noted was even though I appeared to be unsubscribing from the events, they would still fire until the panel was closed. If I commented out the unsubscription, then I would get multiple notifications. I’m not sure if this is working as designed, or I’m not unsubscribing correctly or I have found a bug – I’ve yet to get myself psychologically prepared to ask the question of support 🙂

Though customers are definitely conscious of Infors implied client direction, the H5 client development doesn’t have the maturity of Smart Office which is highlighted nicely by the only recent introduction of these events. And there has been many little things like determining which panel and program which just don’t seem as readily accessible – things which I often use extensively when I have scripts that run against multiple programs / panels.

That being said, the development tools within browsers make it a damn-sight easier to figure out what is going on – which if very attractive. And as I have mentioned in a previous post, there has been definite effort to make the development transition as painless as possible (and provides nice clues as to what is going on in ISO).

Anyways – in the screenshot below I have attached my script and have the browser development tools turned on so I can see the console output.

And finally the script itself…

**	Name:	jbc_TestRequest.js
**	Panel:	any
**	Description:
**		this script demonstrates the requesting/requested/requestcompleted events
**	Written by:
**		Scott Campbell (
**	History:
**	20160427	SAC		* started

var jbc_TestRequest = new function ()
	var gController;
	var gDebug;
    this.Init = function(scriptArgs)
        var host = scriptArgs.controller.ParentWindow;
        var args = scriptArgs.args;
        var el = scriptArgs.elem;
        gDebug = scriptArgs.debug;
		gController = scriptArgs.controller;
        var content = cont.RenderEngine.Content;
        gDebug.WriteLine("jbc_TestRequest script was called");
		gController.Requesting.On(function (e) { this.onRequesting(e); });
		gController.Requested.On(function (e) { this.onRequested(e); });
		gController.RequestCompleted.On(function (e) { this.onRequestCompleted(e); });
    onRequesting = function (e) 
        gDebug.WriteLine("onRequesting was called");
		// comment out the line below to allow other events to fire
		//e.cancel = true;
    onRequested = function (e) 
        gDebug.WriteLine("onRequested was called");
    onRequestCompleted = function (e) 
        gDebug.WriteLine("onRequestCompleted was called"); (e) { this.onRequesting(e); }); (e) { this.onRequested(e); }); (e) { this.onRequestCompleted(e); });
Posted in H5 Client | 2 Comments

the Poormans M3 Benchmarking and Monitoring

I have a fascination with graphs – in particular graphs that map things like performance and health.

Graphs are typically my number one go-to for troubleshooting…and I’m going to provide some anecdotes, as I know there are people in the past that have questioned what they see as an unhealthy preoccupation in gathering needless data. 🙂

Todays post will build upon my previous two posts around the Poormans M3 monitoring ( and  and we shall discuss a Linux virtual machine that I have built up which will monitor for down events in M3 and also provide long term trending graphs.

The scripts and access to the VM will follow later – given there have been some conversations around this recently, I thought I’d get the post out before I’ve finished all of the tweaks.

The Gathering of Needless and Trivial Data

As mentioned above, graphs tend to be my go-to for troubleshooting – they can immediately point you in the right direction of a problem, warn you of an impending problem, or reduce the probability of something you’re measuring being the issue.

But before we can do that, we need data. The time investment in getting this data can be hard to justify, and I’ve battle on many occasions to get buy-in from staff and managers about the importance of that data – even if it may not be used for a long period of time or ever. Typically, I ended up building my monitoring whenever I had a free few minutes.

So, below are a couple of anecdotes where having the data saved a lot of time and it helps to break up a rather dry article 🙂

Continue reading

Posted in Monitoring | 5 Comments

Vanilla M3 – at last!

IFL have shed the shackles of modifications. We have been mod free for nearly two weeks with no issues.

Continue reading

Posted in Development, Misc | 5 Comments


What on earth is Smart Cache?

Though we never SQL data in to the database, some of you may have come across instances where you are err… directly updating the database with your favourite tool, and yet nothing changes in Smart Office. I never ran across this with DB2 on an AS400, only Windows with SQL Server so far.

Several months ago, when making some significant changes to some existing processes for one of my customers we had need to mass update records as we were embarking on testing. The interesting thing that we came across was, we would execute the SQL statement and we would then looking in Smart Office to verify the data had indeed changed. It didn’t, we’d have the bounce the environment to get M3 to recognise the changes.

Continue reading

Posted in How Far is Too Far?, M3 / MoveX, Misc | 14 Comments