Category Archives: Feature – SDK development

Microsoft Edge Chromium and ClickOnce

The new Microsoft Edge Chromium browser doesn’t provide native support for ClickOnce as of version 81.0.416.6.

It will by default NOT work to launch a Smart Office ClickOnce install point link in Edge Chromium.

To enable ClickOnce support in Edge Chromium:

  1. Enter edge://flags link in Edge Chromium browser.
  2. Scroll down to ClickOnce Support setting and select ‘Enable’ from the dropdown list.
  3. Restart the browser.
Note: This setting will be overridden if your organization configures the 
"Allow users to open files using the ClickOnce protocol" policy. – Windows

The Edge Chromium will always prompt the user before launch of a 
ClickOnce link because Chromium doesn't rely on the Windows Security Zones.

ScriptUtil.LoadAssemblyFromUrl() is Obsolete

The ScriptUtil.LoadAssemblyFromUrl method was marked obsolete in v10.2.1.0 HF32. A workaround for M3 scripts using the method is to replace with the following code:

var assembly = Assembly.Load(WebReader.GetRequestBinary(url));

In between version 10.2.1.0.333 (HF32) and 10.2.1.0.385 (HF42) the obsolete method will
fail in silence and just return null.

This has been changed in 10.2.1.0.389 (HF43) and an InvalidOperationException will be thrown when calling the method.

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.

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”.

Smart Office SDK unable to run project

The last week I’ve got two questions from Smart Office Developers in the partner network desperately trying to run the Smart Office SDK but as soon as they log in to Smart Office they are presented with “Infor Smart Office has encountered a problem”, “We are sorry for the inconvenience. Please tell Infor about this problem and provide the log file and information of the steps leading up to it. Press the Support button to save the log file at a location of your choice.”.

restartdialog

What to do?

When you are having an issue always check the log file. when developing the log file is located in a location similar to this example from Windows 10:

C:\Users\username\AppData\Local\Infor\Mango Client

This generic “catch-all” is only shown when there is an unhandled exception on a background thread. When developing always make sure that you have try-catch on code that is executed on a background thread. If you are developing and get this error the issue is probably in your code. But not in this case.

The log

In this case the log file had the following log at the bottom:

2016-06-30 16:07:25,519 [20] FATAL Mango.UI.Client.MangoApplication.OnUnhandledExceptionCurrentDomain – Fatal shutdown caused by unhandled exception on background thread.
2016-06-30 16:07:25,520 [9] FATAL Mango.UI.Client.MangoApplication.OnUnhandledExceptionCurrentDomain – [MUI0040] Unhandled exception from AppDomain. IsTerminating=True.
System.IO.FileNotFoundException: Could not load file or assembly ‘System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified.
File name: ‘System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’

Server stack trace:
at Mango.Core.Persistance.Statistics.GetRecentlyUsed(Int32 returnCount)
at Mango.UI.Services.ApplicationUsageService.RecentlyUsed(Int32 returnCount)
at Mango.UI.Services.HistoryDS.LoadRecent()
at Mango.UI.Services.HistoryDS.Execute()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)

The solution

SQL Server Compact Edition is a requirement for SDK development. Usually you don’t need to install it – it just works. But if you have any issues then please download Microsoft SQL Server Compact 3.5 Service Pack 2 for Windows Desktop from Microsoft and install it. On a 64-bit computer install both 32-bit and 64-bit versions.

I hope that this post will find it’s way to any SDK developer that encounter this issue.

Icons and icon buttons

When the new style for Smart Office was introduced in version 10.1.0 we also added a new set of icons. There are now almost two hundred icons that can be used on buttons, menus or to convey information in an application. In addition to the new icons a couple of controls were added to make it easy to use the icons. These new controls are the Icon, IconButton and CommandBarButton in the Mango.DesignSystem namespace. 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

How to use the keyboard in a Mashup

Do you want to add keyboard support in a Mashup? In this blog I’ll show how to get a keyboard key to invoke an event and how to user keyboard shortcuts to switch beteen tabs. I’ll talk about focus and how to user accelerator keys to jump to an input field and some other nice to know topics for Mashup and feature development. Continue reading

Introduction to MForms extensions

When extending the functionality of M3 panels in MForms you have three different options and these are JScript files, Script assemblies and MForms extensions. MForms extensions allow you to do similar things as with a regular JScript files but extensions are Smart Office features, written in a .NET language such as C#. The way extensions are deployed, configured and registered is also somewhat different compared to how you usually do with JScript.

This post is a brief introduction of how to create and deploy an MForms extension using the Smart Office SDK. Note that if you don’t have access to the SDK you will not be able follow along in the example on your own. I will also assume that you are familiar with the Smart Office SDK and will mainly focus on what is specific for MForms extensions.

Continue reading

Script assemblies in MForms

The most common way to extend the functionality of M3 panels in MForms is to use JScript files but there are other options such as Script assemblies and MForms extensions. With Script assemblies you can write code in most languages supported by .NET such as C# and VB.Net and you can actually debug your code using Visual Studio. Instead of deploying the script as a JScript file you use a .NET assembly in the form of a DLL file.

Continue reading

Getting started with the Smart Office SDK

With Infor Smart Office SDK you have access to our application development framework. The SDK has been around since version 9.2 and it enables you to build your own application using the power of the Smart Office framework and the Infor Design System. As of last week Smart Office SDK is available, not only to partners but also directly to customers. We have build applications such as M3, Lawson, Analytics and Process Server and you can build your applications in the same way. Continue reading

URI shema overview for Infor Smart Office

In this post I’ll present a short overview of the different application schemas that we use in Smart Office. As you know we use URL syntax to identify applications within Smart Office. We build our big product lines around one schema per application and use the host part of the URI as the program name. Continue reading

LSO and Grid Application Discovery Service

In LSO 9.1.3 we moved the server to the Grid. There is a discovery service for LSO SDK applications (features) and Mashups that have a need to communicate with a Lawson Grid application. The discovery service reduces the configuration that needs to be added to the feature or mashup, e.g. no System Profile information needed in the manifests. This also means that there will be less work for the installer/administrator to configure installed applications. The discovery service can be used to retrieve the base URL to the Lawson Grid Application. Continue reading

Modal task URIs

In Lawson Smart Office (LSO) version 10.0.0 two generic URI parameters were added to support modal tasks. The requirement was to be able to launch any LSO URI in a modal window.

A modal window is a child window that requires users to interact with it before they can return to operating the parent application (http://en.wikipedia.org/wiki/Modal_window). There are many scenarios where this could be useful (if a modal behavior is desired) such as Mashups, personalized links, navigator links, canvas shortcuts etc. Continue reading

Lawson Design System

When we started the Lawson Smart Client project we worked together with Frog Design. Frog did the design and delivered the Lawson Design System a set of guidelines for Lawson applications in general and for the Lawson Smart Client. Frog called it Smarter Software.

For the different XAML controls we have a global style implementation. In this post I’ll show an overview of controls that you can use in your Mashups and applications. If you have the SDK pack there is a DesignSystem example project. I you haven’t checked it out yet it is a must. Continue reading

Calling M3 APIs

For easy access to M3 APIs we have created a few classes that you can use both in your JScripts and in your features. For those of you who don’t know the difference, JScripts are used on a standard M3 and S3 forms to add new functionality. A feature is an application that runs natively within Lawson Smart Office. This is the way we build the UI to our applications such as M3, S3, LBI, Process Server, Document Archive… to mention a few.

I got a question from one of our Solution Consultants, Peter Johansson. He was using MIAccess to get customer data but he was experience delays due to the amount of data.

“Is there a way to specify which fields should be returned by the API?”

Of course there is! Continue reading