I’m waiting for a database export when it occurred to me that I haven’t discussed the Customer Extension table which is really terrible as I’ve been using it for quite a while and it is awesome!
The customer extension table APIs allow us to store data within M3 that M3 doesn’t have fields with. There are some fantastic examples in the net change reports where it is combined with the native M3 events to populate data based on different events automatically, and of-course we can use them through the APIs to store additional data. We can also incorporate these values in to the new style ListViews without any code!
The APIs provided are quick and easy to use.
This post is to provide a Jscript which allows you to add a TextBox to a panel and it will store the data from the TextBox in the customer extension table – how often do people want to do that? 🙂
There are many ways to extract data from the APIs in M3, but often you need information that isn’t provided via the native APIs or the native APIs purely don’t exist for the table you want to query.
But over the years there have been a number of ways that you can extract data natively from the APIs without expensive mods or using webservices. The methods to do this can seem a little convoluted and had some shortcomings where you can quickly run out of sort orders on popular tables in the older versions of M3, but by the nature of the native methods we enforce good practices of using indexes. I typically make a concerted effort to use these APIs rather than webservice calls as they tend to be quicker, and require less configuration outside of the M3BE.
We have 3 different ways I’m aware of to set up custom data extraction via the APIs and this post provides a rough and ready run through of them.
MNS185 – M3 Browse Definition. Open
CMS010 – M3 Information Browser Category. Open
Something that I don’t see talked about very often is the Event Based Alerts built in to M3, it’s a cheap, quick and easy way to notify people that something happened within M3.
We of-course have the options of using e-Collaborator or ION, but that feels a little heavy handed for a number of tasks.
This is a quick rough guide on how we can create a lightweight event that will notify us when the full description of an item changes.
Programs we will use:
CMS045 – M3 Event Subscription. Open
CMS047 – M3 Event Based Alerts. Open
CRS111 – M3 e-mail Address. Open
CRS427 – M3 Application Message E-mail Param. Open
CRS424 – M3 Settings – Application Messages
CRS420 – M3 Application Message. Open
MNS051 – M3 Subsystem Job. Open
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.
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 10.2.1.0.169.
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.
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.