Discovered a RoleCentre PageType problem?

boywonderboywonder Member Posts: 179
edited 2013-03-12 in NAV Three Tier
Having a really strange problem here...HELP!!!

Not sure if it's me going mad or whether this is a bug/feature...

In a Page (PageType::RoleCentre) I have simply added new Actions and added code to the OnAction triggers to run a Page with some different filters set (simply code for filtergroup,setfilter,page.run).

The Page RunObject property is <Undefined> as I want the code to be used only....but I am receiving the following error...

The Object Metadata does not exist. Identification fields and values: Object Type='Page',Object ID='0'

If I put a Page RunObject in then the error goes away but that doesn't solve my problem because I want to filter on a field being >= 'WORKDATE' which can't be done via properties only C/AL code.

I've tried recompiling the page that my code refers to as I've had this type of error before but this hasn't helped at all....

Have I discovered a bug with the RoleCentre page type or did I do something really stupid :shock:

Comments

  • boywonderboywonder Member Posts: 179
    Anybody, please?
  • BeliasBelias Member Posts: 2,998
    if you run your page by code like this
    page.run(0,mytable);
    
    did you set the lookupformID to your "mytable"?
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • boywonderboywonder Member Posts: 179
    lookupformID is set correctly to the page I want and using "Page.run(0,myTable)" doesn't work either :?

    (tried runmodal as well just in case - same problem) - I think this is a bug / limitation?
  • BeliasBelias Member Posts: 2,998
    mine doesn't work either...you can try with R2 :-k
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • boywonderboywonder Member Posts: 179
    must be a 'feature' then :roll:
  • VectorKVectorK Member Posts: 86
    It Happens to me as well ](*,)

    Is there a solution, please?

    Thanks in advance
  • pawanppawanp Member Posts: 90
    Its not a bug. Thats the way it works.
    No trigger code is allowed on pages of type Role Center

    If you notice in NAV 2013 you cannot write any code in Role Center Page.


    Anyways. In this solution you will end up losing one page object. Create a new page with base table integer(or any table). On OpenPageTrigger write your code
    .
    .
    .
    PAGE.RUN(PAGE::"Customer Card");
    CurrPage.CLOSE;

    Set this new page in Action RunObject on your RoleCenter Page.
  • VectorKVectorK Member Posts: 86
    Thank you very much!!
Sign In or Register to comment.