Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

SubPageLink (ListPart) Show either data from one OR another Key

(0) ShareShare
ReportReport
Posted on by 12

Hello All,

This is actually my first post to this forum, so I hope I do it right :)
I have a setup  that looks very mundane at first. 


Using extensions, I have created a new table with some subscription data. This data is related to the customer but on two different key: A "customer no" and a "Invoice customer no." This is because that sometimes some other customer is the customer to be invoiced. 

My goal is to show this in listpart on the customer page. But the listpart should contain both the records where the customer is "customer" OR "invoice customer"

Any ideas are most welcome :)

/Cheers !

*This post is locked for comments

  • Goonie Profile Picture
    12 on at
    RE: SubPageLink (ListPart) Show either data from one OR another Key

    Hi Hannes,

    Sorry for the late reply. I actually never got around to try out your suggestion. We ended up having 2 listparts instead. The customer liked that solution. But I have still marked it as an answer .Thank you for your time :)

  • Goonie Profile Picture
    12 on at
    RE: SubPageLink (ListPart) Show either data from one OR another Key

    Thanks a lot for your input - I will try it out, and get back here for the results

  • Verified answer
    Hannes Holst Profile Picture
    5,767 on at
    RE: SubPageLink (ListPart) Show either data from one OR another Key

    Hi,

    In such situation, I would utilise a temporary table.

    Make the sourcetable of listpart temporary and create a public function in the listpart-object.

    The function takes one parameter (the customer no.) and looks up the records which do match with the customer no. in either the field "customer no." or "invoice customer no.".

    When such a record is found, write the result in the temporary Rec-table of the listpart.

    I think you have to do a CurrPage.UPDATE in the end to refresh the view.

    To execute the function, simply call it from the "OnAfterGetCurRecord"-trigger of the parent page.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,209 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans