Author Archives: Karin Portillo

About Karin Portillo

Principal Software Architect, User Platform, Infor Sweden AB

Creating your own windows with JScript

When working with JScript you might want to open a new window. There are a few different ways that this can be done and today I’ll share how to create a new window that is visible in the taskbar and how to open a modal window. Modal means that you cannot access any other Smart Office functionality such as the QuickNote widget or data in a form as the modal window is the only currently active window placed above all other windows. A modal window is a graphical control element subordinate to an application’s main window which creates a mode where the main window can’t be used. The modal window is a child window that requires users to interact with it before it can return to operating the parent application, thus preventing the workflow on the application main window. This is great for some cases but can also be frustrating.

Background

Some of the concepts when working with windows in Smart Office is IInstanceHost – which represents the contract to an application host window. Then if a window is visible in the TaskBar it has to have a Runner – a handle to a task running on the Canvas. A Task is an item that can be launched on the Canvas. A task can only be launched if there is a registered application that supports the task. The scheme part of the task URI is used to locate an application that can launch a specific task, form example mforms://mms001. All these interfaces and classes can be found in the Smart Office SDK API and some of them in the API Documentation under Help in the Mashup Designer. When writing JScripts you should be familiar with the Smart Office core programming concepts.

There are new overloads of LaunchTask that can open a window in different ways. If the code does not work on your version of Smart Office it is possible that the method used does not exist in your version.

Opening a new window

Below is an example from Norpe on how to create a non modal and a modal window with JScript. Enjoy.

If you don’t want to have modality to the new window you can create a window that shows up in the task bar using an overload of the LaunchTask method. The script below shows examples of how to launch a modal window and a non-modal window.

DialogWindow

import System;
import System.Windows;
import System.Windows.Controls;
import MForms;
import Mango.UI.Core;
import Mango.Services;
import Mango.UI.Services;

package MForms.JScript {
   class NewWindowTest {
      var controller, content, debug, host;
      var buttonOpen, buttomOpenModal, buttonClose;
        
      public function Init(element: Object, args: Object, controller : Object, debug : Object) {         
         this.controller = controller;
         this.debug = debug;
         var content : Object = controller.RenderEngine.Content;

         var stackPanel = new StackPanel();
         stackPanel.VerticalAlignment = VerticalAlignment.Center;
         stackPanel.HorizontalAlignment = HorizontalAlignment.Center;

         buttonOpen = new Button();
         buttonOpen.Content = "Open New Window";
         buttonOpen.Width = "160";
         stackPanel.Children.Add(buttonOpen);
         
         buttomOpenModal = new Button();
         buttomOpenModal.Content = "Open New Modal Window";
         buttomOpenModal.Width = "160";
         buttomOpenModal.Margin = new Thickness(0,8,0,0);
         stackPanel.Children.Add(buttomOpenModal);
         
         Grid.SetRowSpan(stackPanel, 100);         
         Grid.SetColumnSpan(stackPanel, 100);
         content.Children.Add(stackPanel);

         buttonOpen.add_Click(OnClickOpen);
         buttomOpenModal.add_Click(OnClickOpenModal);
         controller.add_Requested(OnRequested);                  
      }
      
      public function OnClickOpen(sender: Object, e: RoutedEventArgs) {         
         try {
            var title = "New Window Test";
            var task = new Task(new Uri("notused://")); // The uri is not important (but must be valid) when shortcut are not allowed
            task.AllowAsShortcut = false;
            task.VisibleName = title;
            task.ToolTipInfo = title;
            task.UseVisibleShortName = false;
            
            var runner = DashboardTaskService.Current.LaunchTask(task, HostType.Default);
            host = runner.Host;
            
            host.HostContent = CreateWindowContent("Window Content");  
            
            host.HostTitle = title;
            host.Width = 640;
            host.Height = 480;
            runner.Status = RunnerStatus.Running;
            host.Show();
         } catch(ex) {
            Log(ex);         
         }
      }
      
      public function OnClickOpenModal(sender: Object, e: RoutedEventArgs) {         
         try {
            var content = CreateWindowContent("Modal Window Content");  
            content.Width = 640;
            content.Height = 480;
            
            var title = "New Modal Window Test";
            host = new HostWindow(true);
            host.HostContent = content;
            host.HostTitle = title;
            DashboardService.Current.ShowDialog(host); // Use DashboardService to get modal "shake".
         } catch(ex) {
            Log(ex);         
         }
      }
      
      public function CreateWindowContent(text : String)
      {
         var grid = new Grid();
         var textBlock = new TextBlock();
         textBlock.Text = text;
         textBlock.VerticalAlignment = VerticalAlignment.Center;
         textBlock.HorizontalAlignment = HorizontalAlignment.Center;
         textBlock.FontSize = 48;
         grid.Children.Add(textBlock);
         
         buttonClose = new Button();
         buttonClose.Content = "Close";
         buttonClose.Width = "120";
         buttonClose.VerticalAlignment = VerticalAlignment.Bottom;
         buttonClose.HorizontalAlignment = HorizontalAlignment.Right;
         buttonClose.Margin = new Thickness(0,0,8,8);
         buttonClose.add_Click(OnClickClose);
         grid.Children.Add(buttonClose);
         
         return grid;
      }
      
      public function OnClickClose(sender: Object, e: RoutedEventArgs) {         
         if(host != null) {
            host.Close();
            host = null;
         }
      }
      
      public function OnRequested(sender: Object, e: RequestEventArgs) {
         buttonOpen.remove_Click(OnClickOpen);
         buttomOpenModal.remove_Click(OnClickOpenModal);
         controller.remove_Requested(OnRequested);
         if(buttonClose != null) {
            buttonClose.remove_Click(OnClickClose);
         }
      }
      
      function Log(text : String)
      {
         debug.WriteLine(text);
      }
   }
}

Smart Office 10.2.1 Hot Fix 6 is released

Last week we released update 6 for Smart Office Build 10.2.1.0.54. It has some nice new features that you should know about, especially for Lawson customers but also general performance improvements. You will notice performance improvements if you are running large Mashups but also in both Lawson and M3 Forms.

I’ve also added a new link to a new blog from iStone that you might find interesting, M3 Usability Blog.

Special thanks to Vince for the Lawson update below. For more Smart Office and Lawson related information be sure to follow the Infor Lawson Technology blog.

For additional information regarding Infor Smart Office Hot Fix 6 (Build 10.2.1.0.54) and a list of bug fixes and enhancements see KB article 1626878 on Infor Xtreme.

Lawson Import / Export tool

There are a few different tools for exporting and importing. There is a stand alone tool called Mango Admin that we have written about before – but it has it’s limitation as for example M3 and Lawson has other user related data as well and the Mango Admin only exports data on the Smart Office server. There is the export / import manager in Smart Office for settings and predefined widgets (with meta-data for Lawson widgets). But there are also other types of user data such as scripts and personlization files and for M3 and Lawson those files are located on the MUA / Lawson application server. M3 has the Personalizations tool and a Files tool that can export scripts and personlization files separately.  As of 10.2.1.0.54 Lawson has a new great  tool that allows administrators or anyone granted access via their Role to export to a zip file of the various personalization files stored on the Lawson application server. Once exported, this file can then be used to import the files to another server.

ImportExportLawson

Because many personalization files are associated with a Data Area and often the Data Area on the target server will be named differently than the Data Area on the source server, a dialog for ‘mapping’ the names and specifying which Data Areas to process is also provided.

DataArea

Smart Office LSF Administration Tools

Beginning with HF 6 of 10.2.1 Smart Office, a number of LSF Administration tools are made available.  These are the same tools available in Lawson/Ming.le.  The tools available are dependent on the version of LSF.

LSF 9.0.1.14

  • Language Definition
  • Printer Definition
  • Printer Group Definition

LSF 10.0.6

  • Job Queue Definition
  • Language Definition
  • Locale Definition
  • Printer Definition
  • Printer Group Definition

LSF 10.0.7

  • Distribution Group Definition
  • Job Queue Definition
  • Job Queue Group Definition
  • Language Definition
  • Locale Definition
  • Printer Definition
  • Printer Group Definition

LSF 10.0.8

  • Distribution Group Definition
  • Distribution List Group Definition
  • Job Queue Definition
  • Job Queue Group Definition
  • Language Definition
  • Locale Definition
  • Printer Definition
  • Printer Group Definition

Controlling Access

Users with PortalAdmin access will be able to access any of the tools that are available without any need for additional configuration.  Navigator widget links will be available under a new branch of Infor Lawson, LSF Administration Tools, for any user with access to one or more tools.

Navigator

For non-Admin users, access to the tools can be granted on the Administration tab in Role Manager.

RoleXml

Distribution Group Definition

DistributionGroup

Distribution List Group Definition

ListGroup

Job Queue Definition

QueueDef

Job Queue Group Definition

QueueGroupDef

Language Definition

LangDef

Locale Definition

LocaleDefinition

Printer Definition

printerDef

Printer Group Definition

printerGroupDef

Language Translation

For Languages other than English, a Translation Maintenance screen with several tabs is available to translate various phrases and messages defined in the system.  A page size can be selected to set the number of records returned. And columns with a filter field can be filtered much like filters work elsewhere within Lawson screens.

translation

To edit a phrase or message simply click on the Edit icon or the text under Translation:

editTranslation

When done editing on a particular tab, click the Save toolbar button to save changes for that tab. No reminder to save changes will be presented, but the Save button is only enabled if there are pending changes and each line with a pending change will be highlighted with a yellow icon on the left edge.

Phrases Translation

Phrases

Column Phrases Translation

ColumnPhrases

Titles Translation

titles

Value Lists Translation

values

Universe Message Translation

message

Application Messages Translation

appMessage

Mango Admin Tool – the import and export tool

The Mango Admin Tool is a stand-alone tool for exporting and importing data. It was first delivered in Smart Office 10.1 and is continuously enhanced as we create more tables in the database. The 10.1 version works with 10.0.5.4 as well and is used for migrating data from 10.0.5.4 to 10.1 since 10.1 is a new install. The tool (MangopAdminTool.zip) is located in the AdditionalFiles folder in the download package. You can unzip the tool in a folder on the server or on your client PC. Please note that it has the same .Net 4.5 requirement as Smart Office.
UPDATE: .Net 4.8 is required from ISO 10.2.1 HF54 10.2.1.0.452

AdminTool

Hints, tips and recommendations

  • You need to be a Smart Office administrator to run the Mango Admin tool.
  • The Mango Admin tool should only be used during a service window.
  • Roamed files can get very large. It is recommended to do the export in two steps. First all but the roamed files and then the roamed files.
  • Check the MangoServer log as it will print out when the export/import is started and completed
  • If you get the exception below – this does not mean that there is an error:
    System.AggregateException: One or more errors occurred. —> System.Threading.Tasks.TaskCanceledException: A task was canceled.
    It is caused by a timeout in the tool because there was no reply from the server. The timeout is specified in a config file next to the tool, see How to change tool settings.
  • Only run one export/import at a time. There are versions of Smart Office that does not check for concurrent request especially if you get the exception above you must check the log for completion in versions prior to 10.2 HF3.
  • If you would like to take a backup you should use the Management tools provided by the database provider for the database that Smart Office uses instead of this tool.
  • If you get the exception “Could not establish trust relationship for the SSL/TLS secure channel”. The server where Mango Admin tool is running must have the
    Grid Certificate installed in the Trusted Root Certificate for the target server.
  • If you get the exception “The handshake failed due to an unexpected packet format”. Check that the Session Provider of the Grid is setup correct.

Adding a server configuration

You can use the same tool to run against different servers. You need to enter a configuration per server. The first time the tool is started you will see the dialog below. This dialog can later be opened by clicking the configuration menu in the upper left corner of the application.

Serverconfig

  1. Press the plus sign to create a new server configuration.
  2. Enter a name for the configuration
  3. Enter the Server Uri in the format https://server.company.com:4000
  4. Press OK to save the configuration
  5. Back in the Select Server Configuration dialog press OK again to select the server you created
  6. Once a server configuration is selected you will see the name of the server configuration in the application window title

Entering a user for logon

You can click the User button to enter an administrator user and password that will be used to connect to the Smart Office server or you can continue using the tool and when the tool needs to connect to the server you will get a login prompt. Please note that the user needs to be a Smart Office Administrator and that the same user will be used throughout the session even if you change server configuration.

Using filters and selecting categories

There are three icon buttons that can be used for selecting / deselecting all categories for import/export. There is also a filter button that will clear all filters.

The filter field supports exact matches and start (*) matches. For example entering a user filter test* and checking the ‘Roamed files’ will export all settings, canvas etc. for all users with a user id that starts with test.

How to change Mango Admin Tool settings and reuse configuration

If you have started the Mango Admin Tool a MangoAdminToolSettings.xml file will be created in the same folder as the tool. It contains a list of settings for the tool as well as the last used filters etc and can be edited in a text editor.
This file contains a block with the added Configurations so it is safe to copy the configurations you have for a previous version of Smart Office to a new one by copying the Configurations block.

There is one setting for the timeout in the tool – that is how long the tool will wait for a reply while the export or import is done. The setting is RequestTimeoutSeconds and if you experience timeouts you can change this to a higher value – or split your export/import in chunks.

Import / Export categories

The Mango Admin tool is for exporting and importing different data categories of data that is stored in the Smart Office server’s database.

Filters
All filter fields can take the following input:

  • A name, for example a file name. For example: Profile.xml
  • A semicolon separated list. For example: CRMgen.mashup,Items.mashup
  • A simple wildcard expression. For example: *storage.xml

Default canvas files

Canvas files that can be configured for first time users in settings is stored in this category. The Default canvas consist of two parts:
(1) the file name in the Settings Editor and (2) the file in the database. Selecting this data category will export the canvas files.

Server files

The server files contains the MangoClient.application file for the installation point and the predefined widgets file. If you would like to export all predefined widgets specify the filter as: WidgetSettingsDefinitions.xml.

Settings files

The settings file is the default settings, the settings that are managed in the Settings Editor in Smart Office. Check include roles to include rules configured for roles and users. The filter can be set to the name of the settings file for example: Mango.UI.xml, Mango.Core.xml or Mango.* for all settings file that start with Mango. Note that the user specific settings are not included in this category. They are part of the Roamed files data category.

Shared files

These are files that are shared by all users. Links in M3 and S3 are part of this category. The filter can be set to for example *M3.xml to get the M3 links.

System files

This data category contains the following files: profile.xml, template.xml

It might also include channels.xml and users.xml from previous versions of Smart Office.

To export the profile xml enter profile.xml as filter.

Category files

Category file is specific generic table for storing files. These are the files that can be administered via the Category Files administration tool in Smart Office. The categories that are supported are: Mashup and Startpad. For the category Shared Shared files should be used and for System the System files should be used. It is not possible to add them as categories and export them here even if they are visible in the Category Files Administration tool.

The first filter field is the name of the component for example CRM* for all Mashup packages that starts with CRM. The category filter is the name for the category for example Mashup or Startpad.

Select include roles to include role mappings – for example all roles connected to Startpads and Mashups.

Roamed files

The roamed files contains all user files that are uploaded and downloaded to the client. For example all user settings files, Canvas, Favorites, private Startpads, excel templates and links.

To apply a filter enter the name of the file or a list of files for example Favorties.lfv,Canvas.xml in order to export all user’s favorites and canvas files. To export all files for a specific users enter a user name in the user filter. The filter is the same as all other filters it can take a list or a simple wildcard expression.

Collaboration users

If you are using the Collaboration you can select to export the list of user’s as well as their contacts if you select to include contacts. Offline messages will not be exported so this export is for user information and the contacts each user has.

Feature files

Including features will extract all features that are installed via LCM. You should select this if you move from a H2 database to another database provider. This will export all features and their application definitions. This is potentially a data category with a lot of data that you can consider exporting separately.

Note! If you are setting up a new environment and are installing all features and applications via LCM and you only what to export/import configuration this category should not be selected.

Importing data

When importing data only select the content that you know is contained in the zip.

How to export data

  1. Make sure you have a service window
  2. Select configuration
  3. Select the data categories to include
    1. Specify filters
    2. Consider exporting roamed files separately
  4. Press Export to start the export
    1. Monitor the MangoServer log for more information as the export runs
  5. Download the MangoData.zip using the Download button or locate the file on disk.
    1. The path to the file will be part of the success message

How to import data

  1. Make sure you have a service window
  2. Select configuration
  3. Upload the MangoData.zip
    • Use the Upload button and browse to the file –or
    • Copy the file to the MangoFiles/MangoImport folder located in a location similar to this: c:\LifeCycle\server.company.com\grid\GridName\grids\GridName\applications\MangoServer\MangoFiles
  4. Select the data categories to import that are included in the zip
    • Specify filters
    • Consider importing roamed files separately
  5. Press Import to start the export
    • Monitor the MangoServer log for more information as the import run
  6. Wait for a success message in the Mango Admin tool or in the log that the import has completed

Note! The Delete All button will clear the content in the database and can be used to clear an environment before importing. Use with extreme care 🙂

Finding the logs for trouble shooting

How do I find the logs for trouble shooting? In this post I’ll cover the Smart Office log as well as the M3 UI Adapter log. I will not be covering where logs are located in LSF, Landmark, Ming.le or IFS.

For Smart Office there are a few logs that can be of interest. In a previous post we had information about how to find the client log. Continue reading

Category Files Administration tool

In this post I’m going to give you a bit of information regarding the Category Files Administration tool that has been around since 10.0.5.2. It is a generic tool that handles files in the database but it can be configured to view files of a specific category so this tool is also the Mashup File Administration and the Startpad File Administration. The Startpad in 10.0.5 and 10.1 is a separate install which some customers do not install so in 10.0.5 you might just have the Mashup File Administration but it is in fact the same tool as below it is just that you are not allowed to change category.
Continue reading

Installation tips for upgrading (migrating) from 10.0.4.x to 10.1 or 10.2

During Ask the Experts webinar for (mainly) Lawson customers we got a lot of good questions. I’m going to try and answer some of the questions in coming posts and today I’m going to give you some tips and tricks for updating and migrating data to 10.1 and later. Continue reading

Ask the expert Webinar: Infor Smart Office Administration

On June 13th, 10AM CST there will be a free webinar on Smart Office Administration. It is hosted by the Lawson development organisation and it is a great opportunity to ask questions. The focus will be Lawson installations but for general Smart Office Administration a lot of things are the same. I will attend and I look forward to your questions. Read more and register on the Infor Lawson Technology blog.

Smart Office 10.2

Smart Office 10.2 is released for M3! I don’t have a release date for Lawson Applications but I will let you know as soon as it is released. This post contains overview information about the new features that we have developed in 10.2 for both M3 and Lawson applications. There are many new features and we will start a series of posts to cover all new functionality in greater detail.

Continue reading

Controlling the user’s canvas with stand-alone Jscripts

The user’s canvas is where the user has his shortcuts and widgets monitoring business data. The first time the user starts Smart Office she will get the default Canvas with the content that an administrator has configured. In this post I’ll show you how to share a canvas file on a fileshare and create a Jscript that will load the Canvas everytime Smart Office starts.

Continue reading

Cannot find compatible location for dependency LSO

Today’s post is just a quick entry about a common error that you might get as you install a .lawsonapp file in Life Cycle Manager 9 (or Life Cycle Manager 10). I’ve received more than one question about this error message from Life Cycle Manager so I hope that this info will be of interest to the many administrators out there. The error message that you get in Life Cycle Manager is ‘Cannot find compatible location for dependency LSO. No available location exist or the user is not authorized to install application.’.

Continue reading

Smart Office Startpad 2.0

The Smart Office Startpad is an add on that you can install in Smart Office 10.0.5 and 10.1.1. It enables your users and the administrator to build startpads with links to different programs. This application was first released for Smart Office 10.0.5 (version 1) with a limited set of functionality but has been greatly improved for Smart Office 10.1.1 (Startpad version 2). In this post I’ll cover the features in the StartPad Manager and how to deploy startpads. Continue reading

Migrating from Smart Office 10.0.5.2.16 to 10.1.1.0.19

There are quite a few customers installing 10.1.1 and migrating their data from 10.0.5.2.x.
It is important to note that this is still a migration of data and not an upgrade path. There is a new stand-alone tool (Mango Admin Tool) that will help you with the export and import of data.
Some important notes to consider:

  • You can only have one Smart Office installation per grid. (It does not matter if the name has hanged to MangoServer)
  • If you want to use the same grid you need to: upgrade to 10.0.5.2, export the data, move the zip or download it, then uninstall and install 10.1.1.
  • Separate .lawsonapplications need to be installed on 10.1.1 before importing the data, but the configuration will be imported. Installed features will not be migrated but installed Mashups will be included
  • For Lawson DSSO you should NOT configure Smart Office to use the DSSO Router. You should use the Default Router with the DSSO session provider.
  • You can run 10.1.1 on MS SQL server instead of the built in H2 database.
  • You can use the Mango Admin tool to export and import data in the same version, cloning your production setup to test for example.

One of our customers, has blogged about his experience in his blog, Potato IT – Upgrading from Smart Office 10.0.5.2.16 to 10.1.1.0.19. He covers upgrading M3 User Adapter and Smart Office.

Mashup – Enable a button based on status and CurrentItemChanged

I’ll show you how to enabled a button on a current item changed event in a Mashup list. The scenario is as follows: You have a list of planned orders and you want to add a button to execute a related option but only if the order status has a specific value. I’ll show you how to set a property value in an event and how to execute a related option using a button. The real case scenario here would be planned work orders in MOS197 but for simplicity if you don’t use that module I’ll simulate the checks by using a much simpler program and one of my favorites, CRS610. The hard part is to reset the IsEnabled for the button to be false so that it does not keep its state as we select different rows in the list. Continue reading

Adding settings to your feature

There are different kind of settings that you can use when developing your feature. There are profile settings, local settings and user/application settings. In this blog I’ll talk about user/application settings and the steps you need to do in order to add settings to your project. Using user/application settings will allow administrators to add role based values for some settings, provided that the Session Provider supports listing roles. Continue reading

What is M3 H5 Client?

M3 H5 Client provides an HTML 5-based user interface for accessing work-related information and applications from the M3 business system. In this post by Jack Rubillar gives you a quick introduction to the new web client for M3. M3 Workplace has been replaced with the H5 client and since it has support for more than one browser and Workspace / Infor Ming.le this is a great improvement.

Continue reading