web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Update delivery schedule on purchtable.

(0) ShareShare
ReportReport
Posted on by 7

Hi,
I am facing an issue while trying to update a supplier's purchase order delivery schedule using X++ code. Here's the scenario:

We have a purchase order with, for example, 3 items, each having a defined delivery schedule with specific quantities yet to be delivered. The delivery schedule has been confirmed. Now, considering a situation where the remaining quantity for a certain item has been physically received, I need to update the delivery schedule by adding new lines for the items that have been received anew. Additionally, I need to input primary information for these quantities, such as the lot number.

In this case, I am encountering a problem with inserting these new delivery lines, especially in relation to line numbers.

Could you please provide guidance on how to insert these new delivery lines through X++ code and ensure proper linkage to the line numbers?

Thank you for your assistance.

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    306,446 Super User 2026 Season 1 on at
    Hi,
     
    Can you share the code you used yourself within your attempts. Can you then also explain what you mean with "I am encountering an error"? What is the current behavior? We might then be able to suggest for some changes instead of redoing all the work you did so far.
  • Hana Xue Profile Picture
    Microsoft Employee on at
    Hi,
    Can you provide more relevant information such as screenshots or code. Your description is too lengthy. You can specify the code you wrote about inserting new delivery lines to facilitate other experts to provide better suggestions.
    Best Regards,
    Hana
  • CU31081222-2 Profile Picture
    7 on at
    Hi thanks for your response. I am actually using this code in this screenshot : (via this link : https://axaptaforfreshers.blogspot.com/2020/07/create-delivery-schedule-for-purchase.html)
    this code is working good for inserting the first delivery schedule lines, but as i explained, when i have a remaining quantity thatt is recently recieved and now i should update my delivery schedule lines and insert the new items that are newly recieved, i can't do it.
    I will be so grateful if you could help me. 
  • André Arnaud de Calavon Profile Picture
    306,446 Super User 2026 Season 1 on at
    Hi,
     
    Can you clarify what you mean by "i can't do it"? Where and how do you need help? Did you already make an attempt for updating records? Do you get errors or are you new to X++ and don't know where to start?
  • CU31081222-2 Profile Picture
    7 on at
    Hi, Actually i am using the same code to insert new lines in purch delivery schedule, this  code is giving results but it's not what i wanted. Actually : it is overwritnig the existing delivery schedule, and creating a new delivery schedule with the new added lines and updating the quantity in the principal order line. but what i wanted is to keep the existing lines and insert below them the new lines.
  • André Arnaud de Calavon Profile Picture
    306,446 Super User 2026 Season 1 on at
    I will repeat my question. How do you need help? What do you expect from the volunteers helping here answering questions on the forum? If the coding below is not what you need, then you can either add another method or change this one.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 382 Super User 2026 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 265 Most Valuable Professional

#3
Subra Profile Picture

Subra 262

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans