Tag Archives: M3

Using a M3 List Api for a single hit

For M3 we have different APIs, most used are probably the list and get APIs. But what if you have a mashup and what you need is in a list API? Well you could just as well use the list API and bind to the first returned item. Or in fact you configure the MIDataService to only return the first result in the list.

Assuming there is an exact match you will get the expected data back. Say that you want to list customers and you pass in Infor, if infor isn’t a valid customer the list API will return whatever customer that comes after alphabetically.

My example will have an entry field for the customer to search for and a button that will trigger the List Event. In a real scenario this would probably be replaced with an event from a standard M3 form, like a CurrentItemChanged on a list or a detail form. Continue reading

MIListPanel with Open Event

In this post I will use a MIListPanel in order to list customers and then add an open event that will open CRS610 for the selected customer.
I’ll start by getting the Bookmark for the program I want to open on the double click in the list.

1. Start the program and select to create a bookmark on the canvas.
2. Open the shortcut and make a copy of the URL. Continue reading

Calling M3 APIs in JScript on a Background Thread

In 9.1.3 we introduced a generic support for running any M3 API without having to create WS Stubs. If you are on a previous version you can still call a web service but it requires much more work including the use of Smart Office SDK. All calls to M3 APIs have to be done on a background thread!

There is simply no excuse for doing this the incorrect way. If you call the web service on the UI thread the entire UI will freeze for the time period that the call takes. In normal cases this will not be noticable but that does not matter. No calls to other servers on the UI thread.

Continue reading

Enable a button on a selected item

A few days ago I wrote a post about how to use the generic property setter in order to set IsEnabled on a button. I got the question how to do it in 9.1.2. Unfortunately the M3List does not expose the CurrentItem property in 9.1.2 so for M3Lists I have no solution. But for lists using the M3 APIS (MIListPanel) and the DataListPanel you have the option of checking the SelectedValue of the list and use a converter that will change a not null value to true.

My example has a list of Countries and a button that will be disabled unless a row in the list is selected. Continue reading

Enabling a button on CurrentItemChanged in a Mashup

One of the nice features in WordPress is that I can see what users search for on my blog. One of the searches last week was “xaml enable button after listpanel currentitemchanged”. In this case I think I know what the reader wanted to do so this post is about how to control IsEnabled on a button depending on the current item changed event. Continue reading

Personalizations in M3 – Manager

A few days ago I wrote about Personlizations in M3. What I forgot to mention is the Personalization Manager in M3. It’s an admin tool for managing personlizations for users and groups and for different servers installations. This is the tool to user for moving personlizations around, for example from a test environment to a production environment.

Personalizations in M3

Users can change panels in MForms to obtain personalized versions of the standard M3 panels. Examples of personalization are conditional styles, hyperlinks, tab order, label texts and JScripts. Personalization is done directly within MForms using dialogs and special edit mode panels. There is a Personalization menu available under the Tools menu and on the context menu for the panel that contains the available personalization options. Continue reading

Calling a SOAP based Web Service in a Mashup

New in Lawson Smart Office is the support for calling a web service in a Mashup. Now we did have REST support in 9.1.3 and using the template XML functionality it was possible to make a SOAP request to get data. What is new in 10.0.0 is the ability to point to a WSDL, call it and get the TYPED objects back. So you don’t work with XML, but the actual types that are described in the WSDL. How can you try this new feature?

You use one of the Data Service controls in your mashup. For example select Insert Control -> DataService -> DataListPanel. As a service type you can choose between REST, MI (M3 API) and WS. Now if you want to use M3 APS I would recommend the MIPanels but the access to M3 API is available as a Data Service as well. Continue reading

Testing M3 APIs

When you work with M3 APIs there are a few very useful resources available, one of them is MITest. MITest has been around for a while and it looks like this:

In Lawson Smart Office 9.1.3 we introduced a new way to call APIs using a grid application called MI-API-WS. This application uses the API repository meta data in a way we have not used it before. Continue reading

Using Bookmarks in M3

Bookmarks in M3 is a way to navigate into a specific form without having to go though the list. As it turns out Bookmarks is a key component to M3 Mashups. You configure a M3List or a M3DetailPanel with a bookmark. Not all programs support Bookmarks and even if the bookmark does work there might be issues when you try and open a detail form. In this post I will cover a way to test the bookmark and to analyze issue you might encounter when you build your M3 Mashups. Continue reading

Formatting dates and numbers in a Mashup

Lawson Smart Office comes with a set of converters developed for making formatting issues easier in Mashups. Much formatting can be done using StringFormat and this is standrad WPF. But if you want to use the M3 user’s format or if you want to surpress Zero there are converters that we have developed for you. Continue reading

Selecting the first row in a M3 list to trigger CurrentItemChanged

When you have a M3 list in a Mashup a common scenario is that you would like to have the first row selected so that any dependant mashup control can react to CurrentItemChanged.

This is for example a scenario when you open the Mashup from a panel with JScript so that you pass in a Customer id, CUNO. You want to load related information right away. This requirement is something that we will consider for future versions to have an option to say, ‘select first line on startup’.

But until then there is a workaround that involves using a JScript to set the selected item in the list. I’ll do an example with a mashup that loads CRS610 and reacts to CurrentItemChanged to load related data in a MIPanel. Continue reading