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.

With a bookmark you can set any filter fields that are in the top pf the program. If the filter is not set correcty after following the guide below then you should submit the issue to support since it might be an issue with the bookmark implementation in that program.

I’ll start with OIS301 and hopefully it will work with bookmarks. As you can see OIS301 has a lot of filter fields and an apply button.

Start with adding a M3 -> ListPanel. Then select to show the list header (at least until we are done with the mashup).

Then you enter OIS320 and press capture. This will run the program in a special Bookmark capture mode. I use ctrl + click to select the fields in the header. Then you will need to navigate into detail panel and then you press “create bookmark”. But wait I can’t navigate to the details becuase I get this error message “Customer order number must be entered”. So I press “Create bookmark” and the I close the capture window. Now I’m back that the M3List and the Bookmark Settings are filled with values.

This did not work as I wanted.

I take a look at the fields that are suggested for the startup event.
It looks like this:

You can see that ORNO and PONO are keys the the file. But how about the ordernumer? Isn’t that shown in the list?

Open OIS301 again and start the conditional styles wizard. Open it by selecting Tools – > Personalize -> Conditional styles. Then select New.

Here you can see all the fields that are required for the bookmark. These are all the fields that are required in order to get to the detail panel. Notice that ORNO is not ORNO in the list but OBKV. So that is why I can’t open the line. This means that I can start the program, set fields in the header but I will not be able to double click and enter the line.

This is a consequence of the first design goal of bookmarks, bookmarks were designed for accessing a detail panel directly without having to work though a panel sequence. That does not mean that we can’t use it for lists but it means that the field has to be avaiable. There are a bunch of fallbacks if the field is not entered in the bookmark but basically you need to have the values there. For coming versions of Lawson Smart Office we will address this but for now at least you’ll be able to know when you don’t have enough information to do to the detail panel. A work around would be to display a seperate detail panel within the mashup (see the end of this post).

How to I set the fields in the header? I add a startup event and set the fields that I selected and pass in values.

Now when I run the fields are added to the header:

Bookmark test program
Start mforms://mts043
Enter the program and the file and press enter.
Here you can test the values that you need to set to launch M3 program with a bookmark!
Always try this program if there are issues. When you test in this program and are unable to enter a line this means that you will not be able to double click a line in the Mashup and open a line.

The work around
The workaround that you can try when you can’t enter the line is the following.
1. Disable double click in the list byxxx
2. Add a detail panel
3. Add an event for currentItemChanged on the list and map it to the detail panel where you have the same bookmark but you map the name of the column to the name in the bookmark.

Now I did try and find a sorting order and a view with all the fields that I need to display the details but I can’t see to find a view that has all the keys that I need for the bookmark. So … I’m a little lost on M3 and should probably never have picked OIS301 to start with. Let’s have a look at OIS350 to see if I can try the workaround there. That program has a similar issue. Opening a line will not work since the field is called INVO in the bookmark but the column name is EXIN.

Now this is how far I got in OIS350. I did not get all the way and I’ll explain why.

<Grid xmlns="" xmlns:x="" 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">

    <ColumnDefinition Width="*" />
    <RowDefinition Height="*" />
    <RowDefinition Height="*" />
    <RowDefinition Height="Auto" />
  <m3:ListPanel Name="master">
        <mashup:Event SourceEventName="Startup">
          <mashup:Parameter TargetKey="UHCONO" />
          <mashup:Parameter TargetKey="UHDIVI" />
          <mashup:Parameter TargetKey="UHYEA4" Value="2011" />
          <mashup:Parameter TargetKey="UHINPX" />
          <mashup:Parameter TargetKey="UHIVNO" />
      <m3:Bookmark Program="OIS350" Table="OINVOH" KeyNames="UHCONO,UHDIVI,UHYEA4,SOINPX,UHIVNO" FieldNames="WWYEA4,WWFACI" SortingOrder="1" />
  <m3:DetailPanel Name="details" Grid.Row="1">
        <mashup:Event SourceName="master" SourceEventName="CurrentItemChanged" TargetEventName="Get" Debug="True">
          <mashup:Parameter TargetKey="UHCONO" />
          <mashup:Parameter TargetKey="UHDIVI" />
          <mashup:Parameter TargetKey="UHYEA4" Value="2011" />
          <mashup:Parameter TargetKey="UHINPX" />
          <mashup:Parameter TargetKey="UHIVNO" SourceKey="EXIN" />
      <m3:Bookmark Program="OIS350" Table="OINVOH" KeyNames="UHCONO,UHDIVI,UHYEA4,UHINPX,UHIVNO" Panel="E" SortingOrder="1" />
  <ui:StatusBar Name="StatusBar" Grid.Row="2" Grid.Column="0" />

In the code above notice . This is a mapping from EXIN which is the invoice number field in the list and the parameter that the bookmark wants. But when I run the mashup I get invalid bookmark. Another look at the parameters and I realise that CONO and DIVI will be available in the program but what about UHINPX, what is that.
Ok so I work for Lawson and I check the field help and INPX is “Invoice prefix”.

I didn’t find the field help from within the program’s detail panel like I normally do. This time running the program and looking at fields were not enought. I could not find it. As it turns out I searched the field help in our dev enviroment. Then I actually looked at some M3 code and found that INPX is “subfile hidden key fields from record”. Ok so I have hit another dead end. The field is completly hidden to the client.

Remember when I said that bookmarks are a way to get to a specific panel for a specific item. A bookmark is what you create in M3 when you are on a panel and say “hey, I want a link to this screen, exactly the detail that I have here” then you go Tools -> Bookmarks and create your bookmark. Now that is a bookmark in it’s true essence.

So before you spend too much time on investigating why a bookmark does not work, it is porobably because you are not setting all the fields that needs to be set or those are not available in the screen. Test the bookmark in MTS043 and make sure you know the key fields. In some cases the workaround will be enought (or a simple mapping) in other you just have to make the conclusion that you can’t get what you want. You can always contact support and make a request for an enchancement. Now that we see excellerated use of bookmarks you might think that perhaps they could send INPX to the client in this case. I’m not sure if it is possible but we do our best to make our customers happy so contacting support or a product responsible seems like the thing to do!

16 thoughts on “Using Bookmarks in M3

  1. Gunilla Andersson

    I am trying to use bookmarks when I use MWS060 and MWS070 in a mashup. My problem is that I can´t make the mashup fill the field WWWHLO when I use the bookmark (I want info from MWS060 to be startvalues for MWS070).
    I tested to not use the bookmark, and use the Apply-code instead, and then it works. But, the problem is that I don´t know how to define sorting order and view when I use the apply function instead of bookmark. Is that possible? Do you have an example how the code should look like?

  2. norpe

    There seems to be issues with the bookmark implementation in MWS070. I would suggest that you contact BE support regarding this.

    It is currently not possible to set Sorting Order / View using the Apply event but we will consider adding support for this in future releases.

  3. Frode Sollie

    Are there any way to modify a program (OIS056) to bookmark-enable it? With skilled MAK-programmers… 🙂
    If possible, how big a job is it?

    1. karinpb Post author

      Hi Frode,
      I had to check with M3 Development for this one, since I’m not a M3 programmer.
      Development is adding bookmark specific code to a lot of programs in the main branch (base for next BE version). They publish source code excepts (not a complete source) from these programs on an internal site. There is a programming standrard for adding bookmarks and in the KB you can search for “Bookmarks in M3 10.1”).

      The bookmark code must be managed as M3 modifications at customers today, but they will be part of the next release of M3 (so if added as modification today, customers will not have to worry about upgrading them with the next M3 release, as they will be part of standard).

      Acctually OIS056 seems to be published which means it is bookmarked in the next version, so it should not be a big deal. (I don’t have a link to share)
      Start with the Knowledge Base or ask your Infor contact to help you.

  4. Martin Trydal Torp


    How do I define a option key in the “Bookmark” string?

    In MTS043 you can define which option the program is to be opend with. For example if I wish to open APS110 with Option=”Ctrl+11″ so that it opens APS112/E(Invoice control). This is possible to do via MTS043 but I can’t make it work in a Mashup. But then again, I don’t know if it possible to give the option value in the code.

    regards Martin

    1. karinpb Post author

      Hi, this is what you do in the Mashup Designer on the settings for your M3:ListPanel. You start capture mode in APS110, take option 11 and then press capture bookmark and close. Then you need to hook up the event that will feed the list to get the input that you need from another list. Ok my example were a list to a list but it should work the same with a detail panel.

      1. Martin Trydal Torp

        Hi, yes that would be the way if it was possible to use the “Create Bookmark” button in the designer. But the problem is that you cannot click the this button because it isn’t highlighted/enabled. That’s why I was wondering if you could hardcode the option value.


      2. norpe

        If the “Create Bookmark” button is not enabled in capture mode it could be because the program does not support bookmark or the current panel does not support bookmarks. If the bookmark can be verified in MTS043 it should be possible to hardcode the bookmark values in the Settings panel instead if the bookmark cannot be created in capture mode.

  5. Martin Trydal Torp

    Yes, I know that, but it doesn’t work. I’m able to show the fields from APS112/E but there are no values in them. The same problem occurs if you bookmark APS110 on the regular way and try to open some of the related alternatives like Ctrl + 15 and Ctrl + 11 – no values are shown, so I’m guessing there is something wrong with this bookmark, even dough it works in MTS043.

  6. Patsy

    On a list panel from ARS200, the related option 19 is not working because all of the keys needed are not in the view. Our users are not wanting the keys to be a part of the view. Is there another way to pass the keys to the related option without them being visible in the view on the list panel?

    1. norpe

      All bookmark keys must be available either on the list row or in the list header. This is a limitation for related options in a Mashup compared to the regular M3 programs since the related options are implemented using bookmarks in a Mashup.

      It is possible to use values frin hidden list columns and columns can be hidden in two different ways. The M3 BE program and view definition can be modified to hide a list column using indicators and conditions. It is also possible to hide list columns in a Mashup using the ExcludeColumns property on the ListPanel control. This will only hide the columns when used in a Mashup though, but it could be an options if a specific view is used in the Mashup that is not used in the regular program for example.

  7. Pingback: Mashup quality control #5 – M3 ideas

  8. Pingback: Mashup quality control #6 – M3 ideas

  9. Fazlan

    Hi, We can use MTS043 to test bookmark validity. Is there a way to copy the request created by MTS043 so that we don’t need to manually construct the url ?

  10. Lasse Oskarsson


    I need help finding a function in a bookmark URL for a date X days back in time.

    We have a bookmark to be used as a shortcut from OIS300 to OIS275.
    In my view in OIS275 there are a from date and a to date fields to be populated by the bookmark url. Until now the solution used has been the formula {=ToString(GetNow(), ’yyMMdd’)}.
    This is fine as long as the date you need is “today” in both fields.
    But how to get “today” minus one or more days or the date for the same weekday last week?

    The bookmark URL below uses a standard view in OIS275 and populating the last modified date field with today’s date. You may need to adjust the ‘yyMMdd’ to meet your users or systems date format if you would like to test it.
    mforms://bookmark/?program=OIS275&tablename=OXCNTR&startpanel=B&includestartpanel=True&requirepanel=True&suppressconfirm=False&source=MForms&sortingorder=4&view=STD04-01&name=Batch+Customer+Order.+Open+-+OIS275%2fB1&keys=EVCONO%2c100%2cEVORNO%2c%2b%2cEVPONR%2c%2b%2cEVPOSX%2c%2b&fields=WTSLCT%2c55%2cW1OBKV%2c{=ToString(GetNow(), ‘yyMMdd’)}

Comments are closed.