Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Creating Tree Views

Posted on by Microsoft Employee

I'm Creating a new page which is essentially the same as Outstanding Sales Line Page. The difference for this is It needs to use tree view mode. So each sales Line in the table with the Same Document No will be able to be viewed by clicking the+ Box. I've added a Field to the Sales Line table called Indentation (Integer). I've set up the repeater on the page design to allow tree view around the Document No. 

Here's some code which simply explains what my aim is.. Can I Have some guidance on how to complete it further. 

recSalesLine.RESET;

recSalesLine.SETRANGE(Type, recSalesLine.Type::Item);
recSalesLine.SETFILTER("Outstanding Quantity", '>%1', 0);
IF recSalesLine.FINDSET THEN REPEAT
IF recSalesLine."Document No." <> recSalesLineTMP."Document No." THEN BEGIN
Indentation := 0;
Rec := recSalesLine;
INSERT;
END;
recSalesLineTMP := recSalesLine;
UNTIL recSalesLine.NEXT =0;

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Creating Tree Views

       Thank you, I'm attempting to populate my new page with existing Sales Lines, Here is my code so far however when the page opens it still doesn't display any information.  106.PNG ( The functions are called from the On Open Page)

  • Verified answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
  • Verified answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: Creating Tree Views

    Please refer also to www.pardaan.com/.../some-tips-about-creating-tree-view-in-list-pages

  • Verified answer
    keoma Profile Picture
    keoma 32,675 on at

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