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, ...
Answered

How to get unique email addresses of customer ?

(1) ShareShare
ReportReport
Posted on by 33
I have a requirement where I want to pull all the email address of customer which should be unique. Please let me know how to do this in X++ what tables to use and what could ne the possible relations between them.
 
Thanks in advance :)
I have the same question (0)
  • Verified answer
    harshil9898 Profile Picture
    33 on at
    How to get unique email addresses of customer ?
    @CA Neeraj Kumar thank you for your help. The enum value is  LogisticsElectronicAddressMethodType::Email. By using this we can pull the required emails. 

    Also in x++ code i have used set. 
     
    while (setIterator.more())
    {
        uniqueEmail = setIterator.value();
        if (uniqueEmail) 
        {
            con = connull();
            con = conins(con, 1, uniqueEmail);
        }
        setIterator.next();
    }
     
     
    this worked for me in x++.
  • Verified answer
    CA Neeraj Kumar Profile Picture
    834 on at
    How to get unique email addresses of customer ?
    Hi Harshil, 
     
    Below is sql query for reference:
     
    -Select distinct T1. locator, T2. AccountNum from dirPartyContactInfoView T1JOIN Custtable T2 ON T1.PARTY =T2.PARTY
    WHERE T1.Type = LogisticsElectronicAddressType = Email.. (Unable to recall enum value). 
     
    Regards, 
    Neeraj

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 878 User Group Leader

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 496 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans