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

X++ code for How to get Customer Delivery Contact, and X++ code for how to insert new Delivery Contact record.

(0) ShareShare
ReportReport
Posted on by 4

6443.pastedimage1657873405813v1.png

4251.pastedimage1657873452198v2.png

First Go to All customer, select any one customer, Select one Delivery Address, click on Advanced button as shown in 1st screenshot .

then new page will open as shown in 2nd screenshot . So i just want this delivery contact by X++ code for specific customer.

and after that I need to insert new record for Delivery contact here by x++ code .

1-X++ code for How to get Customer Delivery Contact for specific customer,

2-X++ code for how to insert new Delivery Contact record for specific customer.

Kindly Give me Code. 

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    299,576 Super User 2025 Season 2 on at
    RE: X++ code for How to get Customer Delivery Contact, and X++ code for how to insert new Delivery Contact record.

    Hi Naveen,

    All addresses are linked to the global address book record (party) related to the customer. To get a specific address with a certain purpose, you can use the class DirParty and method getPostalAddressByType.

    Contact information is stored in the table LogisticsElectronicAddress. You can link the record to the location (LogisticsLocation) which is used on the address.

  • nunomaia Profile Picture
    25 Moderator on at
    RE: X++ code for How to get Customer Delivery Contact, and X++ code for how to insert new Delivery Contact record.

    In CustTable , take a look on invoiceAddress method.

    You can use a similar query, but change it to delivery address 

  • Naveen Mishra Profile Picture
    4 on at
    RE: X++ code for How to get Customer Delivery Contact, and X++ code for how to insert new Delivery Contact record.

    Hi Nuno,

    Thanks for reply , I saw your given method

    I already have delivery address, but I want Delivery contact x++ code , not delivery address.

  • Naveen Mishra Profile Picture
    4 on at
    RE: X++ code for How to get Customer Delivery Contact, and X++ code for how to insert new Delivery Contact record.

    Hi André ,

    Thanks for reply, Do you have any exact code to get customer delivery contact ,as shown in 2nd screenshot.

  • Naveen Mishra Profile Picture
    4 on at
    RE: X++ code for How to get Customer Delivery Contact, and X++ code for how to insert new Delivery Contact record.

    Hi Andre,

    15.07.2022_5F00_18.58.45_5F00_REC.png

    pastedimage1657892535958v1.png

    I know the Relation of LogisticsElectronicAddress with LogisticsLocation but unfortunately Relation field value i.e. Location is blank in standard table. 

  • André Arnaud de Calavon Profile Picture
    299,576 Super User 2025 Season 2 on at
    RE: X++ code for How to get Customer Delivery Contact, and X++ code for how to insert new Delivery Contact record.

    Hi Naveen,

    When nothing is presented, it doesn't mean that there is no Location reference. You are currently using the Dynamics 365 table browser which replaces the record ID value with the replacement key of the LogisticsLocation table. The replacement value is the field Description which can be empty.

    To check the values, you can better use SQL server management studio where you can check the RecordId reference.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,771

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 542 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans