web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Page Filtered By USERID From Role Center Action

(0) ShareShare
ReportReport
Posted on by

Hi,

I'm trying to open a page filtered by USERID from a role center action, so I wrote some code at "OnAction" trigger to make the filter and then run the page.

The system gives me an error: "No trigger code is allowed on pages of type Role Center"

So I'm forced to duplicate my page and then put the code on "OnOpenPage" trigger but I was wondering if someone has a workaround for this issue.

Any ideas?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,380 Super User 2025 Season 2 on at

    Hi J Barrenas,

    For Opening a Page Filtered By User ID, use User ID As a Flow Filter in the table which you can use in On Open Page.

    For Reference you can refer the

    Table - 9054 (used for Cue in Finance Role Centre)

    Page - 9036 (Created From the Table)

    Refer Fields - "Requests Sent for Approval" & "Requests to Approve".

    When These Pages get Opened they are filtered by User ID - Pages (658,654).

    Let me know if any doubts.

  • Community Member Profile Picture
    on at

    Thanks Saurav Dhyani, but I´m trying to achieve this not from a Cue but from an Action on the left side.

    Any Ideas?

  • Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    Which page you are running and what action you are using ?

  • Community Member Profile Picture
    on at

    My page is a Role Center Page

    At Page > Actions I create a new action called "My Sheets". This should open a page filtered by USERID, but there´s no way to accomplish that with "SetTableView" property, neither through "OnAction" since C/AL Code is not allowed in Role Center pages.

    I know this can be donde using Cues but my hope is to open the filtered page from the left side pane.

    I'm starting to think that finally, there's no way...

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    follow

    msdn.microsoft.com/.../dd568734(v=nav.80).aspx

    msdn.microsoft.com/.../dd568723(v=nav.80).aspx

    in the new list page you want to run from role center just add setrange ("user id",userid) to onopenpage trigger assuming you have a field called "user id" in the underlying record.

  • Community Member Profile Picture
    on at

    Hi Jonathan,

    The point is that I want to reuse the same page for two links on the left side:

    - My Sheets

    - All Sheets

    So your suggestion forces me to create two identical pages, one filtered and the other not...

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    that is in that case a solution, maybe the only (simple) one.

    adding actions to a role center seems to be a very limited functionality. no trigger code allowed. also the usage opportunities of action property RunPageView seems to be limited. only fields with datatype boolean or option are accepted. i tried some others, got always an error message when saving the changes.

    i worked on that issue and after hours found in the end a solution, but a quite complicated. in short words: create a kind of a wrapper page, type list, source table does not matter, but should have a boolean or option field. create a subpage, type list, with the wanted data. add that as list part to the parent/wrapper page. so it's possible to call the same (wrapper) page with different values in property RunPageView when used in 2 actions. this filter can then used to filter the data in the sub page by calling subpage.page.settableview.

    not pretty, but does not matter, it works.

    in the end remains the question: why do you need that ?

  • Community Member Profile Picture
    on at

    As I said, my need is to create a single page that can be filtered by USERID from two links from the left pane.

    Thanks a lot for your answer. I read that solution on a blog post but I thought that it could be a better solution.

    Anyway, thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans