Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Page Filtered By USERID From Role Center Action

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Page Filtered By USERID From Role Center Action

    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!

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Page Filtered By USERID From Role Center Action

    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
    Community Member Microsoft Employee on at
    RE: Page Filtered By USERID From Role Center Action

    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
    keoma 32,675 on at
    RE: Page Filtered By USERID From Role Center Action

    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
    Community Member Microsoft Employee on at
    RE: Page Filtered By USERID From Role Center Action

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

  • Suresh Kulla Profile Picture
    Suresh Kulla 43,895 on at
    RE: Page Filtered By USERID From Role Center Action

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Page Filtered By USERID From Role Center Action

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

    Any Ideas?

  • Suggested answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 14,178 Super User 2025 Season 1 on at
    RE: Page Filtered By USERID From Role Center Action

    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.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,971 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,846 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans