Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

How to get list of available pages in NAV

Posted on by Microsoft Employee

I need to get list of names of all available pages and corresponding table numbers to these pages. How can be done this in c/al? What system tables can be used for this purpose?

NAV 2013 R2, 2015, 2016.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to get list of available pages in NAV

    oh, i didn't see the 'Metadata' field type, it's BLOB, so obviously. I simply thought that we can retrieve one xml file with all pages metadata. Now it's clear..

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: How to get list of available pages in NAV

    use the below code to extract metadata into an xml file and in the xml file you have the property nodes

    This is just an example for Page 42

    .ObjectMetadata.png


    ObjectMetaData.SETRANGE("Object Type",ObjectMetaData."Object Type"::Page);
    ObjectMetaData.SETRANGE("Object ID",42);
    IF ObjectMetaData.FINDFIRST THEN BEGIN
    ObjectMetaData.CALCFIELDS(Metadata);
    IF ObjectMetaData.Metadata.HASVALUE THEN BEGIN
    ObjectMetaData.Metadata.CREATEINSTREAM(Data);
    IF ISNULL(XMLDoc) THEN
    XMLDoc := XMLDoc.XmlDocument;
    XMLDoc.Load(Data);
    XMLDoc.Save('C:\Temp\ObjectMetaDataxml.xml');
    END;
    END;

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to get list of available pages in NAV

    Hi everyone,

    At current moment i have made new custom xmlPort based on idea of aavio and setup new web service for my development goals in NAV 2016.

    In previous versions of NAV this virtual table is absent. I understand the idea of Yukon to use "Object Metadata" table and export data from it in xml file. But i don't know how to retrieve data with such structure as shown by Yukon. I can see only these columns

    1411.Untitled.png

    Thanks for the help

  • Binesh Profile Picture
    Binesh 7,885 on at
    RE: How to get list of available pages in NAV

    Follow these procedures
    Open Object Designer And Select Page Object And then Click New. See the Screenshot

    res.png

    p2.png

    p3.png

    Now Compile, Save And Run your page.....

    Here is the result

    res.png

    Please verify the answer if it satisfy your requirement. Doing so you'll help the community to identify the valid answers.

  • Verified answer
    aavio Profile Picture
    aavio 895 on at
    RE: How to get list of available pages in NAV

    its a virtual table, still you can create record variable referring to table 2000000138

    please check this link also msdn.microsoft.com/.../hh167225(v=nav.90).aspx

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to get list of available pages in NAV

    Hi aavio,

    I have NAV 2016 version 9.00.42815 and can't find table with such id. What version do you mean? Are any upgrades required?

  • Verified answer
    aavio Profile Picture
    aavio 895 on at
    RE: How to get list of available pages in NAV

    In 2016 there is new system table 2000000138 - Page Metadata

    you can refer this table to get the source table and SourceTableView

  • Verified answer
    Yukon Profile Picture
    Yukon 714 on at
    RE: How to get list of available pages in NAV

    Hi Vladimir,

              Jens already mention there is no API and toolkit for at this moment.

    I understanding Nav object is store on "Object Metadata" Table (Ver 6.0 and above). If you really want to get it you can try this way. Export the data from "Object Metadata" table and save as XML and then find the node as per your requirement.

    Here is export xml from "Object Metadata".

    Object-MetaData.png

    Regards,

    Yukon

  • Jens Glathe Profile Picture
    Jens Glathe 6,092 on at
    RE: How to get list of available pages in NAV

    Hi Vladimir,

    I'm afraid this is not possible from C/AL. You would need to query the SourceTableView property of the page objects, and I know of no API to do this. Interesting history: in the old NAVISION (text based), the program had a means to do just this. There was no fixed link (like LookupFormID, DrillDownFormID) in these tables, So, the NAVISION client presented a list of all suitable forms that had the right SourceTableView for the lookup.

    with best regards

    Jens

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans