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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to create a custom lookup to show delivery addreses

(0) ShareShare
ReportReport
Posted on by 134
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
    237,697 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,827 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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans