Solved Dynamic LookUpPage

FrAusDoFrAusDo Member Posts: 3
edited 2016-01-12 in NAV Three Tier
Hi,


I have a problem.

I want to deposit in a tables field A a table ID and B open on the LookUp an Additional Field to the lookup table in the field A.

Is that possible?

Have I made myself clear?

An example. If the field A is a 18 to the lookup Page "Customer List" to be called,

If the field A is a 27 then it should be the Page "Item List".

Does anyone have a solution?




Greeting Frank

Comments

  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from 'NAV Tips & Tricks' forum to 'NAV Three Tier' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • DenSterDenSter Member Posts: 8,307
    You can set that up as a conditional table relationship in the Table Designer, and NAV will automatically use that target table's lookup page.
  • FrAusDoFrAusDo Member Posts: 3
    edited 2016-01-06
    Hi Daniel,

    Thanks, but that is not dynamic enough.
    A field can have the IDs of all the tables. The Conditional list would be very long and must be replaced with new fields, if I understand you correctly.

    Greeting Frank

    I think you mean so, right ??

    e5mm0s78z3pn.jpg
  • DenSterDenSter Member Posts: 8,307
    Yes that's it. If that doesn't work for you, can you explain what "not dynamic enough" means?
  • ufukufuk Member Posts: 514
    edited 2016-01-06
    Hi Frank,

    You can use recordref and variant variable types to run default pages.

    RecRef.OPEN(TableID);
    VariantRec := RecRef;
    PAGE.RUN(0,VariantRec);
    Ufuk Asci
    Pargesoft
  • FrAusDoFrAusDo Member Posts: 3
    Thanks a lot.

    Greeting Frank
  • tfranzentfranzen Member Posts: 25
    Hi.

    I had the same wish and this solution works fine. But one more question: is it possible to get back the selected records from that page?

    Thanks for any ideas

    Thomas
  • ufukufuk Member Posts: 514
    I think you cannot do this unless programming in page object. Selection is part of page events and you cannot access these events when you use page.run(modal) function. SelectionFilterManagement codeunit includes examples of generic access to selected rows but as you can already notice there, each seperate table has it's own function.
    Ufuk Asci
    Pargesoft
Sign In or Register to comment.