Tip #36 | Using Mark and MarkedOnly in the Role Tailored Client

I always wanted to blog about myself, but humble as I am I never got around to do that. 😉

But now I have an excuse.

When the Role Tailored Client was introduced in 2009 one of the things that is missing from the UI was the ability to Mark some records and filter on Marked Only records. This is usefull when you want a subset of your data with records that have no common value to filter on.

In the Classic Client, now Development Environment, you can find the functions here:

Mark1 Mark2

However, this feature was discontinued from the IU, but not from C/AL.

In the C/AL Symbol Menu it is still possible to Mark records and filter them.


So let’s see what happens if we use that in a Page step-by-step. We’ll use the Customer List (Page 22)

Step 1 – Add a new Action Category (Optional)

To make it easy for end users to find the options we’ll start by adding a category for the actions we are going to add later.


Note that in order to add a new Category you need to also add the default ones. In this case we will work with Category4.

Step 2 – Add Actions with the correct properties

We add three actions in the ActionItems category


And we assign a Name, Caption, Image and PromotedCategory. I also choose to make them big and promoted.


Step 3 – Add C/AL Code

We add the C/AL commands to the actions


Note that we use the reverse value to toggle the values on and off

Step 4 – Add a column indicator

To make is easy for users to see if a record is marked or not we add a new column to the page with Mark as the source expression


The Result

When we run the page you see that we can Mark records which will be indicated in the new column, filter on them and easily clear the Marks.


TIP: Copy/Paste

Since we did not use any variables or functions we can just copy/paste the actions around to any other page, as long as the ActionCategoryML does not conflict with existing values.



  1. Daniele Rebussi says:

    Great tip! There should be no matters applying these steps in NAV 2013, right?


    1. markbrummel says:

      No. I should have mentioned that. You can apply this to 2013 and I guess to 2009 too.


  2. waldo1001 says:

    “MARK” by Mark .. lots of Marks in this post! 🙂


  3. markbrummel says:

    Mark(ed)Only 🙂


  4. Tim Grant says:

    This is brilliant as I have users who use the old toggle to differentiate custom function actions on certain products, great replacement for the RTC.

    Would adding something like this to allow multi-line selecting / dragging and marking:

    Mark – OnAction()


  5. Peter says:

    Great trick, but sad Microsoft removed this feature 😦
    Three things many developers do wrong, when working with MARK and SETSELECTIONFILTER.
    1) Never use SETSELECTIONFILTER on Rec. Always do it on a variable.
    2) Never use MARKEDONLY after calling SETSELECTIONFILTER.
    3) If your only “filter” is MARKs and MARKEDONLY, then always use the primary key if you need to loop the dataset.


    1. Nia says:

      This is great. Our users are quite happy that we added this back in. They have asked for the multiline selection however. Is there a better option other than the one posted?


    2. Alkro says:

      And what about this code?

      IF rcdCustomer.FINDSET THEN
      UNTIL rcdCustomer.NEXT = 0;


      1. guidorobben says:

        Don’t forget to Save the start record. And set the pointer on this record again after the the Mark loop is finished.

        Liked by 1 person

  6. sami says:

    Thanks! Great tip and very useful.


  7. Mark Smart says:

    Well, since no login required and I’m a Mark…
    I just tried to use a straight up F1 for marking records in 2009 to no avail. Perhaps some trickery in codeunit 1, or using sendkeys is in order. I implemented one in 2013 (where marks are visible in list form) using Ctrl-Shift-F1, but it was clunky to use. Like anyone uses F1 by itself for anything other than missing the esc key..


  8. Gary Winey says:

    This has been around a while, but I would suggest the following for the Clear Marks action code:


Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.