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)

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

(0) ShareShare
ReportReport
Posted on by 14

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

I have the same question (0)
  • Verified answer
    Hannes Holst Profile Picture
    5,767 on at

    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.

  • Goonie Profile Picture
    14 on at

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

  • Goonie Profile Picture
    14 on at

    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 :)

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)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans