Tag Archives: Logger

Improvements in JScript logging

Introduction

Since there is no way to debug a JScript in LSO developers have to use other means to find errors. This can include writing to the debug console in the Script Tool, writing to the Smart Office log file or the classic, showing dialog boxes.

In many cases you want to write both to the debug console for development purposes and to the log file for troubleshooting deployed scripts. One way to solve this is to create your own wrapper functions that does both these things and some of you have probably done this already. To make logging a bit easier from JScript we have added some new methods and properties to the ScriptDebugConsole class. First I will describe how a log wrapper function might be implemented and then how the new API methods can be used to remove the need for a wrapper function. Continue reading

Pressing KeyDown in a M3 list to load all rows

This post will cover something that you can do in JScript that is actaully on the edge of what you can but shouldn’t do. JScript is a great tool for doing small enhancements to M3 panels and S3 forms. However doning more advanced stuff requires a lot of experience. There are however a few tricks that you pick up along the way. In this post I’ll show you two useful things.

1. How to log to the Lawson Smart Office log file.
2. How to simulate pressing a key, in this case we will use page down.
3. How to run against your own local script instead of the central deployed onces. Continue reading