New Log Viewer – Part II

Part I – Overview of the Improved UI
Part III – Getting the Facts and Categories
Part IV – ClickOnce Installation Log
Part V – M3 Transaction Time Measurements

How can I become more efficient working with the new Log Viewer?

Assume that you encounter an issue running Smart Office or have a log file sent to you. To view the content of the log file you can open it in any text reader and perform a free-text search, but even if you know what to look for it’s time consuming.

Open the improved Smart Office log viewer instead and it will show the log entries related to the current session of the running Smart Office. In the session selector you will see when you started this Smart Office session, number of issues found and the time for the latest log entry. The content in the viewer is only refreshed when you launch the viewer, press the Current button or import a previously saved log file.

ISOLogViewerStart

In the right side-panel, the Smart Office version and Windows related versions are extracted and presented among other interesting facts.

Start the investigation by expanding the left side-panel and under the General header, click and go through in order; Fatal, Errors, Exceptions and Warnings to make a quick examination and see if there are any relevant log entries in each category.

If you encounter a log entry of interest, select it, open the context menu and click the View Selection in Session Context. The full session will now be visible and you can see what has occurred before and after the selected log entry.

Highlight and mark lines in the log

To keep track of log entries you can mark lines with a color or do a strikeout to make them stand out when scrolling through the content. Select the lines to mark and use the context Mark menu to perform the action. To retrieve the marked lines click on the categories under Markers in the left side-panel. The markers will disappear when the log viewer is closed and restarted.

Errors and exception log entries can automatically be marked in the left margin with a colored line, if the Enable Color Markers option is set in the context menu.

ISOLogViewerMarkers

Yesterday I encountered an issue that’s no longer in the current log

The Smart Office log file is renewed every calendar day and the previous one is renamed with the date added as a suffix on the filename. The log files from the last week are stored beside the current log in the client data area.

Open a previous log file by pressing the Import button while holding down the SHIFT- or CTRL- key to add the necessary filter option and set the target directory to the client data area. In the dialog that appears you select the Old Log Files filter and the existing logs from the last week appears.

ISOLogViewerOpenOldLogFile

Where do I Find the S3 Excel Add-in log file?

The S3 Excel add-in has a separate log file that is also located in the client data area. Perform the same operation as when looking for older log files but look for files whose name starts with S3.ExcelAddin.log.

I need help to resolve the issue

There are a couple of ways for you to share the log content with support or another helpful person.

ISOLogViewerButtons

Copy Image

Takes a snapshot of the Log Viewer window and put it in the Clipboard. This is intended for documentation and communication, but not useful to send in a support request.

Copy Session

Copy the full log of the selected session into the Windows Clipboard.

View External

Open the log file in the Windows associated text viewer.

Mail Support Zip

Create a new mail in Microsoft Outlook with Smart Office support related files zipped in an attachment.

Mail Log

Create a new mail in Microsoft Outlook with the full log file as an attachment.

I’m the recipient of a log file

If you received a help request or a support ticket with a log file attached, you can view it in the Log Viewer to make a quick review of the content and get the basic facts extracted about versions and runtime environment. You can open the log from the Windows Clipboard or the filesystem. Press the Current button to reload the active Smart Office log file.

ISOLogViewerButtons2

Current

Reload and show the current Smart Office log file.

Paste

Show the log file found in the Windows Clipboard.

Import

Open a log file stored in the file system. Press SHIFT- or CTRL- when the button is pressed to set the client data area as initial directory.

 

Canvas Theme Emulator

Smart Office enables the user to adjust the overall appearance of its canvas and windows in terms of theme color, wallpaper and color saturation from a pre-defined set of options.
The boundaries for what the user is allowed to adjust is set by the Smart Office administrator in the system profile, application- and user- settings. The final appearance is the combined result of the settings and internal rules.

Once in a while  it happens that the appearance is not matching the expectation after an upgrade or settings change. It can be difficult to pin-point and determine what is causing the new appearance.

The Theme Emulator tool will assisst you to sort things out. It will hook into the theme service and regard it as a black box, apply your settings and visualize the result unaware of the internal rules.

The Theme Emulator is launched with the Smart Office link internal://themeulator or via the improved Log Viewer content-area context-menu under Tools.

themeulator

When the Theme Emulator tool is launched it will show the current applied Smart Office settings in the Preview Settings- and Preview- area. The current values in the system profile, application- and user- settings are listed under Theme Setting Sources.

Changing the Preview Settings is harmless and will only affect the look of the Preview area. Click on the ‘Reset’ button to return to the current settings. The padlock icon next to each user setting show if the setting can be changed by the user or has been locked by the administrator.

A click on a preview icon (document/looking-glass) beside the theme source header will apply the current settings for that source on the Preview.

The Settings… and Profile… button will launch the corresponding administration tool if the current user is a Smart Office administrator.

The Clipboard button captures a snapshot image of the tool window and puts it in the Windows Clipboard. It can be useful for documentation and communication purposes.

The User Theme Disabled checkbox is always read-only in the ‘Preview Settings’ area. It’s not intended to be changed, just show the current property value.

Elaborate with the preview values and compare with the setting sources and you will soon figure out the source and what setting to change to get the wanted appearance.

Smart Office User Id is not always the same as User Name – information to SDK developers

If you have implemented a feature or SDK application that retrieves the user id from the user context, you should ensure that you use:

 ApplicationServices.UserContext.UserId

and NOT the property

ApplicationServices.UserContext.UserName

The UserId and UserName property returned the same value in many system configurations until a few years ago when additional security configuration options were introduced. To be on the safe side and be future proof, the UserName property should be used for display purposes in the user interface and the UserId property used for REST calls and business functions.

New Log Viewer – Part I

Part II – How to Find Your Way
Part III – Getting the Facts and Categories
Part IV – ClickOnce Installation Log
Part V – M3 Transaction Time Measurements

Overview of the Improved UI

An improved user interface for Smart Office Log Viewer was introduced in 10.2.1.0.189 (HF18) to make it easier and more efficient to resolve issues and find relevant information. The benefits and features of the improved user interface will be covered in a series of blog posts.

The main new features are:

  • Smart Office log session selector
  • Extraction of relevant facts from the log
  • User customizable content categories
  • Improved sharing of log content

ISOLogViewerAreas

The improved user interface consists of:

  1. Session Selector where you choose whether to see the entire log, a specific session or a time span. By default the latest session is selected.
  2. Category selector where you choose the category related log entries.
  3. Content area where you see the log entries based on the current session- or category- selection.
  4. Extracted facts that is often relevant for support issues. The area can be expanded or collapsed.

At the bottom you have the quick access buttons to import- and share- the log file.

On the very first launch after installation the (2) Category- and (4) Facts- areas will be collapsed. You can expand/collapse the areas by dragging the window splitters or click the Verbose toggle button.

Where do I find the Log Viewer?

• Open the Smart Office About dialog and click on the link.
• Open the Administration Tools folder in the Navigator Widget and launch Log Viewer.
• Launch the Smart Office link internal://log using a Canvas Shortcut or using the Canvas Start field (CTRL+R).
• As a Standalone Windows Application found in LogViewer.zip under Additional Files in the Smart Office installation package.

What if I prefer the original user interface?

You can switch to the original user interface by clicking on the Classic button, create a Canvas Shortcut or Navigator Widget Favorites link with the URL internal://log/classic.

What’s in it for me as a SDK Developer?

You can create one or more categories specific for your feature and define a launch link that will open the Log Viewer with your category selected. How to do this will be covered in an upcoming blog post.

Ming.le Homepages

It’s been quite some time since I published on this Blog. I’ll see if I can get the Smart Office Developers to write some more posts. Don’t forget to check out the Infor Technology blog where you can find Lawson Smart Office related posts.

There are a few new features in Smart Office related to the Ming.le feature and the Ming.le integration.

I currently work on Ming.le Homepages so there is not that much time to write posts but we all help out trying to answer your comments and questions. If you like to know more about Homepages, please read Infor Homepages: Your hub across Infor OS.

Homepages-Slide-Master-1024x621

 

Smart Office Improved support for ADFS 3.0 – information to SDK developers

If you have implemented a feature or SDK application that requests the credentials from the user context when calling services the include-domain-with-user parameter must be true in order to function properly with an environment using ADFS 3.0.

If the user logs in to Smart Office as user@domain or domain\user setting the parameter true ensures that the domain is included in the user name.

If you’re using the MangoHttpClient class for doing REST calls it’s already handled for you so no changes are necessary. The ADFS 3.0 support was introduced in Smart Office 10.2.10.88 (HF12) released in March 4th 2016.

It may be necessary for a ISO feature/application to change one argument when requesting credentials from the Smart Office user context in order to support ADFS 3.0. The parameter includeDomainWithUser should be set to true. This will return the user name including the domain, if the user logged on to Smart Office with a domain, otherwise it will only return the user name.

Existing code that looks like this:

ApplicationServices.UserContext.RequestCredentials(out username, out password);
ApplicationServices.UserContext.RequestCredentials(out username, out password, false);

Should be changed to set includeDomainWithUser argument to true:
ApplicationServices.UserContext.RequestCredentials(out username, out password, true);

There is also a new LDAP Setting described in the Administration Guide (p. 267) ”Add domain after authentication” that you should be aware of.

This setting is used in scenarios where some applications such as IDM requires a domain but the Smart Office server does not require one. When the setting is enabled, a user may log-on without a domain to Smart Office and still be authenticated with domain for the application.

Settings values:
No = Not enabled
Yes (user@domain) = Enabled with the username format “User Principal Name”.
Yes (domain\user) = Enabled with the user nameformat “Down-Level Logon Name”.

M3 Search Examples

M3 has created a Knowledge base article on the search syntax for Search in M3 13.3 and 13.4. M3 Infor Enterprise Search is a great tool which can greatly improve your workflow when used in the way it has been designed to work.

Depending on how you are using Enterprise Search (IES) today, you might have encountered a few instances where it has not retrieved the desired result.

This can in many cases be addressed by altering your search query to be better suited for the Lucene Search Engine which IES is built upon.

In this blog post I’ll do a quick overview of some of the queries from the examples in the Knowledge based article as a introduction but I recommend you to read the full article as it contains even more examples. I just wanted to take some of the material and the references so that it is easier to find if you search for tips on this blog, which I know a lot of our readers do.

Please note that if you are new to Enterprise Search there are  available courses and How-to videos at the Sales Portal and the Infor Campus.

Simple search

This is the simplest form of search with entry of full words. Note that search is always case insensitive. Searching for cheese would give you the following result:
cheese

You can enter multiple words in the search field but those values have to be displayed in the list. The default behaviour when using multiple words in search is applying AND for all words. This means that they have to exist in one or more columns. Using OR means one of them must exist in one of the columns which will result on more hits. Use parentheses to combine blocks of AND and OR. Use wild card to enter the first part of a word. Or a ‘?’ to replace a single character. Note that you can’t replace blank space.

cheese2

Examples:
cheese OR juice
cheese OR (juice 011215) - Combine with ()
chee* - starts with chee
chee*jui?e - ? replace a single character

To limit the search to a specific column, right click on the column and select ‘Add to search’. It will add a column prefix to the search.

addtosearch


ITDS:Cheese

Dates and numeric values are entered in the same date format as the user has in MNS150, the user master. Dates can be entered with 6 or 8 digits.

Advanced search

Intervals
Intervals are done using the following two formats [ x TO y] or { x TO y } or any combination of them. Usage of [] means that the range should be included in the search where as {} means that the range should be excluded.

Examples

STQT:[100 TO 480]
STQT:[* to 0} - find all items with negative quantity

Not conditions and use of ?
Not conditions are a bit special since they must start with another query and then the NOT condition can be introduced. The tip if there is no such natural condition is to start with the company number and then add the NOT search. The company number will search the entire table. An example query in MMS002 of all items that have not been part of a stock take in this year will look like this:

CONO:790 NOT INDT:YEAR(0)

Note the YEAR(0) function that will translate to an interval covering the to and from dates of the current year. There are a number of functions that can be used to create useful Macros that can be saved to favorites, canvas, as menu option or in toolbox area.

Creative usage of the ? allows for a simple search for all records with supplier number. This since ? only finds records with a character in the position. Blanks are omitted. Query SUNO:?* gives you all records with a supplier number in this case. For numeric fields you use the NOT statement like CONO:780 NOT STQT :0.
SUNO:?*
CONO:780 NOT STQT :0

Fuzzy search
The ~ is used for a fuzzy search that is useful for finding spelling errors and similar texts. An example would be a query like ‘min*~’ which would produce hits even if there is no exact match on anything starting with min, for example mild would also be a hit in this case. Not that it cannot be used for numeric values.

The full article covers more examples!

M3 IES reserved word and functions

SortBy:x,y,!z Sorts search result in x, y z hierarchy. The ! Prior field name perform a descending sorting (NCR 6670 and 6671)
SearchFields:x;y Limits search to listed fields x, y etc. Increases performance and can eliminate false hits
YEAR(x) Replaces with date range of year relative to current year x=-1 equals last year etc
MONTH(x) Same as YEAR but for month
WEEK(x) Same as YEAR but for week
DATE(x) Similar to YEAR but replaces with specific date
<xxxx> List & list header based replacements to query string. (NCR 6813)

All below are described in NCR 6220
Using the value within you can use the following replacement variables.

<USID>   Replaced by logged on user id
<CONO> Replaced by logged on company number
<DIVI>     Replaced by logged on Division. Note – same as <CurrentDivison>
<FACI>    Replaced by default facility from user master (MNS150)
<CUNO> Replaced by customer no from user master
<LNCD>  Replaced by language code from user master
<TIZO>    Replaced by time zone from user master
<WHLO> Replaced by warehouse from user master
<DEPT>   Replaced by department from user master
<MNVR> Replaced by menu version from user master
<DFMN> Replaced by menu name from user master
<CurrentLanguage> Replaced by currently used language in M3 (in case of switched language during logged in session)
<CurrentDivision> Current division. Note that this is the same as DIVI.

Reserved word for key search only

  • <QRY> Replaced by entered query in the search string
  • MAXJOIN:x Used to change number of records used in the key search join (default set in IES local management pages) (NCR 4351)
  • NOOPT Used when multiple key searches done to same table (like find items with attribute x, y but NOT z or items existing in warehouse a, b and c (NCR 4349)

M3 IES Stop words

Stop words in IES has the meaning of words that are not indexed and are automatically removed from the search query. Examples of stop words are “and”, “or” “etc” and other similar types. IES, by default has a set of English based stop words which apart from above examples also includes “a”, “by”, “is”, “as” plus about 20 other words. Unfortunately in many cases when searching ERP type of data you might want to search for “factor a”, the Swedish word for ice “is” etc.

The work around for this is to add a new stop word in the IES admin pages. Make sure it is something never search for like “lksdhja7789”. By doing that the default stop words are not used anymore. Please note that affected tables like MITMAS, MITLAD, OCUSMA, CIDMAS etc need to be re-indexed after this has been done.

Read more examples in the KB.