Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How to Access Customer's Addresses given Customer Account Number Programmatically via OData

Posted on by 52
Hi everyone! 
 
I am using Microsoft.OData.Client and Microsoft.Dynamics.DataEntities to programmatically access elements from D365 using OData, such as access Sales Orders and creating them. 
 
I would like to access a customer's addresses, with all address information including some customisation fields that we have included. Using the D365 portal, this can be done by viewing all customers, finding the desired customer and clicking on them, viewing their details (there is a subsection called Addresses), clicking Advanced, and a list of all address details are presented as shown below:
 
Using the OData library, how can this information be accessed? I have tried to get the customer object using Customers, CustomersV2, and CustomersV3 Entities, but none of them have a list of addresses that I can access. Is there another way? 
 
Thanks in advance! 
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    How to Access Customer's Addresses given Customer Account Number Programmatically via OData
    Hi Mar23,

    There is an entity called CustomerPostalAddress. You can use this one for multiple customer addresses. Ensure that you will extend this entity to be able to use your custom fields.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans