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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to create a custom lookup to show delivery addreses

(0) ShareShare
ReportReport
Posted on by 136
Hi
 
On a new forms grid, I need a lookup that can display delivery addresses related to a customer.
 
The tricky part is to show the address, but store the ref recid
 
the 'standard' way is to have a reference group on the form, but that doe not allow me to filter the records that is shown by customer or address type.
 
I have tried a SysTableLookup, but then only the recid is displayed on the form
 
Any hints ?
 
Thanks
 
Kind regards
Steen
I have the same question (0)
  • Martin Dráb Profile Picture
    239,031 Most Valuable Professional on at
    I would use a reference group, override lookupReference() and implement the lookup with a custom filter there.
  • Suggested answer
    Hana Xue Profile Picture
    Microsoft Employee on at
    Hi,
    Found related articles for you on how to create a lookup in D365FO, you can simply check it out, hope it helps.
    How to create lookup in D365FO using X++ (d365snippets.com)
    Custom lookup in D365 X++ – Sampath's D365 F&O Technical Blog (wordpress.com)
    Best Regards,
    Hana
  • GirishS Profile Picture
    27,843 Moderator on at
    Hi Steen,
     
    As Martin mentioned if you are using reference group control then you need to override the lookupReference method. Also, you need to use the SysReferenceTableLookup class for reference group control.
    Refer to the below blog for getting the customer delivery address from the list of tables.
     
    Thanks,
    Girish S.
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    The simplest way would be to copy the standard code which is present in the SalesTable Form. If you navigate to SalesTable Form, in the datasource of SalesTable, under field DeliveryPostalAddress, you can see a method called lookupReference. That will help you.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 659

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 465 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 304 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans