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
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!
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 ?
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...
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.
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...
Which page you are running and what action you are using ?
Thanks Saurav Dhyani, but I´m trying to achieve this not from a Cue but from an Action on the left side.
Any Ideas?
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.
André Arnaud de Cal...
291,971
Super User 2025 Season 1
Martin Dráb
230,846
Most Valuable Professional
nmaenpaa
101,156