A script requirement we recently heard of was to be able to show tooltips on cells in a M3 list and that the tooltip value should be retrieved using a MI-program. The specific requirement was to get the user name for list columns that contains M3 user IDs. The idea is to use this in M3 lists where the user ID is shown in a column but the user name is not part of the list. Continue reading
Tag Archives: M3 API
Validating M3 panels using JScript and MI programs before a request
The scenario for this post is to be able to verify something on a panel in a M3 program before a request is submitted to the M3 BE server. The validation in the example will be made using a MI program that is called asynchronously. The example is not a realistic case but it is easy to test and can be modified and generalized for real business cases. Note that the script is just an example and not intended for production use. 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.
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
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
You must be logged in to post a comment.