web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Filter Groups on Header based on Lines

(0) ShareShare
ReportReport
Posted on by

I have created a new document page with Header table and Line table.

My Requirement is I have to display Enteries in List page only if the current user is approver ( a field in line table) in atleast one of the lines. 

And when he clicks on the document , the page opens and only show the lines where the current user is approver and not other lines where he isnt a approver.

Any help would be great to have.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Amol Salvi Profile Picture
    18,698 on at

    How about creating list page based on lines and then write a code to open document page

  • Suggested answer
    Yogesh Kulkarni_ Profile Picture
    1,762 on at

    Jaspreet,

    Can there be multiple approvers for a single document?

     

    -Yogesh Kulkarni
    Please verify, if you find answer helpful.

  • Community Member Profile Picture
    on at

    Hi Yogesh, Yes there can be because the approver is on per line basis

  • Community Member Profile Picture
    on at

    Hi Amol , that is the workaround I was thinking but this would lead to multiple entries of the same document in case the approver has multiple lines that he has to approve in the same document

  • Suggested answer
    Yogesh Kulkarni_ Profile Picture
    1,762 on at

    Jaspreet,

    What about setting SubPageView property of a ListPage?

    Or the same can be achieved using code as well.

    You will need to show the records from ListPage where ListPage.UserID = USERID

     

    -Yogesh Kulkarni
    Please verify, if you find answer helpful.

  • Community Member Profile Picture
    on at

    Yogesh, SubPageView Property is not working for me. I used "WHERE(Approver ID=FILTER(USERID)) "     USERID should be the current user.

    for the code method Where exactly should i write this code ?

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    IF you are approver is approving based on line then you need to design customized page and if you approver field is available on header then I think you can filter on line for displaying only those records pertaining to that approver.

    Hope my understanding is correct Isn't It ??

  • Community Member Profile Picture
    on at

    Amol, Yes the approver is approving on basis of line. Approver User ID is available only on the line as well.

  • Suggested answer
    Yogesh Kulkarni_ Profile Picture
    1,762 on at

    Jaspreet,

    On OnAfterGetRecord trigger of List Page write code as:

    SETFILTER(Rec.Approver ID,'%1',USERID);

    You will see only those records where ApproverId will match with the logged in User ID.

    I have tested this and working well.

     

    -Yogesh Kulkarni
    Please verify, if you find answer helpful.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans