Infor Technology

« | Main | »

Enabling a List View in a custom program

May 7, 2012

At Inforum 2012 several customers asked us to document how to enable a List View for a custom S3 form they have developed. As promised, here is a tutorial.

List Views display data normally shown on a form as a single record as a list of data from many records. It is the same data, just presented in a different way to facilitate more efficient navigation and management of the records. List Views are also valuable since you can export them to Excel, Outlook, Word, or even XML. You can even edit the records directly in the list for mass updates or edit them while viewing the list in Excel.  Enabling them in a custom form isn't hard, but it is technical, so the same programmer who created the custom form should ideally add this code as well.

So let’s take a finance form, tax code maintenance (TX02). If you wanted to manage all your tax codes as a list view you will first need to find the SELECT that will display the data you want to see in the list. SELECT’s are the way S3 identifies key data on a form. More on SELECTs is available in the Application Developer’s Workbench guide. For the Tax system you would find the $LAWDIR//txsrc/ file and search within it for the SELECT that reads and displays the records you want. In this case it looks like the “Tax Codes for Company” SELECT would work just fine. Its ID is TX-TAC-S-0001.

Now that you have found your SELECT you will need to edit the TX02.scr file is the same directory and add:


…to the screen definition.  Remember, some .scr files define several screens (.1, .2, .3, etc.) within them, so make sure you add it to the beginning of whatever screen number you need.  Example with the bolded text showing what was added:

*                            SCREEN   TX02  (1) *******************************************************************************

$FORM      TX021    S
$DELFCS    D $

You can also look at .scr files for screens that Lawson has already List View enabled for examples of how this is done. Now save that file and run the scrgen program from the command line to create the necessary files for Smart Office to read. Example:

scrgen <product line> TX TX02

Now open Lawson Smart Office and run the program. Make sure you have enabled List View screens under Show>Settings>S3 Transactions>Applications tab>”Use List to access application forms”. If you have recently opened TX02 before making your .scr change then you will need to run an IOS Cache Refresh command found in the Navigator widget under S3 Transaction>S3 Administration.

Here are some tips to remember:

• The SELECT you chose should show the same records available on the underlying screen. For example, if the screen shows only released invoices, then the list view should also show only released invoices. You will need to find (or create) a SELECT that has that condition.

• The SELECT you chose should at a minimum display the fields that are Keys on the underlying form. The user can always customize their List View to add more but it must at least have the minimum required keys for the form.

• Double clicking on a record in a List View MUST launch the underlying form and inquire automatically on that record. TEST FOR THIS. If it isn't working then there is something wrong with your List View.

• If you try to create a List View on a screen that has both header and detail records on it, you will only be able to successfully view the header fields in a list.

I hope that is helpful to everyone out there building custom programs for S3. If you need more info, sound off in the comments of this post.


Leave a Reply

Your email address will not be published. Required fields are marked *

About this Blog

The latest on Infor Technology

Copyright Notice

© Copyright . Infor. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Infor and with appropriate and specific direction to the original content.