web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 117
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
    236,822 Most Valuable Professional on at
    How to create a custom lookup to show delivery addreses
    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
    How to create a custom lookup to show delivery addreses
    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,825 Moderator on at
    How to create a custom lookup to show delivery addreses
    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
    How to create a custom lookup to show delivery addreses
    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

Responsible AI policies

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

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 765 Super User 2025 Season 2

#2
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 743

#3
Sumit Singh Profile Picture

Sumit Singh 551

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans