Tag Archives: Mashup

MIPanel enhancements for the Mashup Designer

Smart Office Hot Fix 12 was just released (10.2.0.88). We have some new features and in this post I’ll cover a changes to the MIPanel that will make it easier to chain calls together. The new features for the MIPanel are:

  • New events: CompletedSuccessfully and CompletedWithError
  • New properties: ShowMessagesInDialog and ShowMessagesInStatusBar
  • New result property that you can bind to: MIPanel.ErrorInfo. This property will contain error information from the first failed transaction. It has ErrorMessage, ErrorCode, ErrorField, Transaction and Program.

Properties

For those of you who have use conditions on events you can now consider using the new events. An example scenario would be updating item information and if that transaction is successful you would like to run another transaction. In that case you can trigger the second update based on CompletedSuccessfully instead of UpdateCompleted.

Item update

Please note that I have some hard coded values in the example. I did have to configure MandatoryInputFields since I’m not changing the item number as the behavior of the MIPanel is to only send updated data to an MITransaction. The use of the event is pretty straight forward. For numeric input I used the NumericTextBox. You will not find it in the Designer UI but it is part of Smart Office so you can use it if you edit the XAML. Here is the XAML:

<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ui="clr-namespace:Mango.UI.Controls;assembly=Mango.UI" xmlns:mashup="clr-namespace:Mango.UI.Services.Mashup;assembly=Mango.UI" xmlns:m3="clr-namespace:MForms.Mashup;assembly=MForms">
	<Grid.ColumnDefinitions>
		<ColumnDefinition Width="1*" />
	</Grid.ColumnDefinitions>
	<Grid.RowDefinitions>
		<RowDefinition Height="Auto" />
		<RowDefinition Height="1*" />
		<RowDefinition Height="Auto" />
		<RowDefinition Height="Auto" />
	</Grid.RowDefinitions>
	<m3:MIPanel Name="ItemDetail" Grid.Row="0" Margin="0,15,0,0">
		<m3:MIPanel.Events>
			<mashup:Events>
				<mashup:Event SourceEventName="Startup" TargetEventName="Get">
					<mashup:Parameter TargetKey="ITNO" Value="AC-001" />
					<mashup:Parameter TargetKey="FACI" Value="010" />
				</mashup:Event>
			</mashup:Events>
		</m3:MIPanel.Events>
		<Grid>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="10" />
				<ColumnDefinition Width="200" />
				<ColumnDefinition Width="15" />
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" />
				<RowDefinition Height="5" />
				<RowDefinition Height="Auto" />
				<RowDefinition Height="5" />
				<RowDefinition Height="Auto" />
				<RowDefinition Height="5" />
				<RowDefinition Height="Auto" />
				<RowDefinition Height="10" />
				<RowDefinition Height="Auto" />
			</Grid.RowDefinitions>
			<Label Content="Item number:" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0" Padding="0" />
			<TextBox MaxLength="15" Text="{Binding [ITNO]}" IsEnabled="false" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
			<Label Content="Name:" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0" Padding="0" />
			<TextBox MaxLength="30" Text="{Binding [ITDS]}" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
			<Label Content="Description 2:" Grid.Row="4" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0" Padding="0" />
			<TextBox MaxLength="60" Text="{Binding [FUDS]}" Grid.Row="4" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
			<Label Content="Avergage cost:" Grid.Row="6" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0" Padding="0" />
			<ui:NumericTextBox MaxLength="10" Name="inputAPPR" Text="{Binding [APPR]}" Grid.Row="6" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
			<Button Name="SaveButton" Content="Update" Grid.Row="8" Grid.Column="2" HorizontalAlignment="Right">
				<Button.CommandParameter>
					<mashup:Events>
						<mashup:Event TargetName="ItemDetail" SourceEventName="Click" TargetEventName="Update" Debug="True">
							<mashup:Parameter TargetKey="ITNO" Value="{Binding [ITNO]}" />
							<mashup:Parameter TargetKey="FUDS" Value="{Binding [FUDS]}" />
							<mashup:Parameter TargetKey="ITDS" Value="{Binding [ITDS]}" />
						</mashup:Event>
					</mashup:Events>
				</Button.CommandParameter>
			</Button>
		</Grid>
		<m3:MIPanel.DataSources>
			<m3:MIDataSourceList>
				<m3:MIDataSource Program="MMS200MI" Transaction="Get" Type="Get" InputFields="ITNO" OutputFields="ITNO,ITDS,FUDS" />
				<m3:MIDataSource Program="MMS200MI" Transaction="GetItmFac" Type="Get" InputFields="FACI,ITNO" OutputFields="APPR" />
				<m3:MIDataSource Program="MMS200MI" Transaction="UpdItmBasic" Type="Update" InputFields="ITNO,ITDS,FUDS" MandatoryInputFields="ITNO" />
			</m3:MIDataSourceList>
		</m3:MIPanel.DataSources>
	</m3:MIPanel>
	<m3:MIPanel Name="SecondUpdatePanel">
		<m3:MIPanel.Events>
			<mashup:Events>
				<mashup:Event SourceName="ItemDetail" SourceEventName="CompletedSuccessfully" TargetEventName="Update" Debug="True">
					<mashup:Event.Conditions>
						<mashup:Conditions>
							<mashup:Condition SourceValue="{Binding ElementName=inputAPPR, Path=Text}" TargetValue="{Binding ElementName=ItemDetail, Path=[MMS200MI.GetItemFac.APPR]}" Operator="NotEqual" />
						</mashup:Conditions>
					</mashup:Event.Conditions>
					<mashup:Parameter SourceKey="ITNO" />
					<mashup:Parameter TargetKey="FACI" Value="010" />
					<mashup:Parameter SourceKey="APPR" />
				</mashup:Event>
			</mashup:Events>
		</m3:MIPanel.Events>
		<m3:MIPanel.DataSource>
			<m3:MIDataSource Program="MMS200MI" Transaction="UpdItmFac" Type="Update" InputFields="FACI,ITNO,APPR" />
		</m3:MIPanel.DataSource>
	</m3:MIPanel>

	<ui:StatusBar Name="StatusBar" Grid.Row="3" Grid.Column="0" />
</Grid>

Unfortunately the Documentation in the Mashup Designer is not updated with the new properties etc as there has been no update to the Mashup Designer. You can always find the latest API documentation in the Smart Office SDK.

Please note that these events applies to update transactions. You set the type of the transaction on the MIDataSource. We will automatically try and determine the type based on the transaction name.

For a full listing of changes made on this release, refer to Lawson KB 1626878 / M3 KB 1623430.

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

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

Inline personalizations in M3 Mashups

The Inline personalizations functionality in M3 Mashups can be used to deploy personalizations as part of a Mashup. Instead of relying on the personalizations for the regular programs you can create custom personalizations that are only used in Mashups and that do not affect the other personalizations.

Support for inline personalizations was added in Smart Office version 10.0.5.0 but there have been some fixes so this functionality should only be used with Smart Office 10.0.5.1 or later.

Continue reading

Custom list templates in M3 Mashups

Support for custom list templates in M3 Mashups was added in Smart Office version 10.0.3. The requirement was to be able to display lists in a more compact way, similar to a card view list. The settings dialog for the M3 ListPanel control now have the option to choose two different List styles called Standard and Template. The Template List style lets you to create a custom list template that defines how the list rows are displayed in the list. Continue reading

Connecting a Mashup to a role or user in 10.0.5

In Smart Office 10.0.5 we introduced support for connecting Mashups to roles. This is something that we should have implemented from day one but there are a few reasons why we haven’t. First of all Smart Office is a platform for different applications, we did not want to create yet another custom tool where you manage and create LSO roles. M3 have their roles, S3 has there roles, roles are related to Security and there is another team who handles Security. We were pushing for a common solution for Lawson. The Smart Office server has moved to the Grid (9.1.3).

Authentication is handled by the Session Provider in the grid and in the grid it is possible to connect users to roles. The session provider can be connected to for example IFS, Infor Federated Services, were you set up claims and claim rules. Continue reading

Printing from a Mashup

In Smart Office 10.0.4 a new Mashup control was added that adds basic printing supports to Mashups. Before you get too excited it should be noted that this functionality is more like print screen and it does not support pagination or output formatting. The new PrintControl supports printing of parts of the Mashup or the entire Mashup window. The output can be sent to a printer, a print preview window or to a file. Continue reading

Using JScript and a Mashup to browse for values on M3 panels

The goal of this post is to show how JScript and Mashups can be used to extend the browse functionality in M3. The idea is simple, instead of using the M3 Browse dialog to find a field value on a panel a custom built Mashup is used instead. The Mashup can use M3 panels with Enterprise Search, data services and all the other Mashup controls to improve the browse experience for the user.

The solution consists of two parts, a generic JScript and one or more browse Mashups. The browse Mashup is started using a button or a keyboard shortcut, the user selects something in the Mashup and then one or more values from the Mashup are used to update fields on the panel. The rest of the post will cover a simple browse Mashup and the important parts of the JScript. Continue reading

Adding a profile setting to your mashup

This blog describes how you can add your own profile setting, for example an URL to a SOAP web service, to your mashup so that your profile setting can be delivered and deployed as part of your mashup.

In Lawson Smart Office we have two main different types of settings. We have settings in settings files; these are the user settings and applications settings that can be administrated via group policies. Examples of user settings are my M3 default option or the theme color of my Canvas. Examples of applications settings are if private deploy of mashups is allowed or if the user is allowed to change the theme. Those are set by the administrator and cannot be changed by the user. Continue reading

SOAP Mashup with Bing search

In this post I’ll create a Mashup with the DataListPanel. Data will be retreived from the Bing search web service. Then I’ll format the result in the list with a datatemplate, a clickable uri and use the the Open event to launch a web page and I show you how to show a clickable Uri. The Open Event is available in Lawson Smart Office 10.0.1.

Prereq: In order to use the Bing search API (for testing) you need to register and get your own application ID as identifier. In my Mashup this ID is replaced with “BingApplicationID”. Register to get your ApplicationID Continue reading

MIListPanel with Open Event

In this post I will use a MIListPanel in order to list customers and then add an open event that will open CRS610 for the selected customer.
I’ll start by getting the Bookmark for the program I want to open on the double click in the list.

1. Start the program and select to create a bookmark on the canvas.
2. Open the shortcut and make a copy of the URL. Continue reading

Enabling a button on CurrentItemChanged in a Mashup

One of the nice features in WordPress is that I can see what users search for on my blog. One of the searches last week was “xaml enable button after listpanel currentitemchanged”. In this case I think I know what the reader wanted to do so this post is about how to control IsEnabled on a button depending on the current item changed event. Continue reading

Calling a SOAP based Web Service in a Mashup

New in Lawson Smart Office is the support for calling a web service in a Mashup. Now we did have REST support in 9.1.3 and using the template XML functionality it was possible to make a SOAP request to get data. What is new in 10.0.0 is the ability to point to a WSDL, call it and get the TYPED objects back. So you don’t work with XML, but the actual types that are described in the WSDL. How can you try this new feature?

You use one of the Data Service controls in your mashup. For example select Insert Control -> DataService -> DataListPanel. As a service type you can choose between REST, MI (M3 API) and WS. Now if you want to use M3 APS I would recommend the MIPanels but the access to M3 API is available as a Data Service as well. Continue reading

Using Bookmarks in M3

Bookmarks in M3 is a way to navigate into a specific form without having to go though the list. As it turns out Bookmarks is a key component to M3 Mashups. You configure a M3List or a M3DetailPanel with a bookmark. Not all programs support Bookmarks and even if the bookmark does work there might be issues when you try and open a detail form. In this post I will cover a way to test the bookmark and to analyze issue you might encounter when you build your M3 Mashups. Continue reading