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, ...
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
    301,053 Super User 2025 Season 2 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
    301,053 Super User 2025 Season 2 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
    301,053 Super User 2025 Season 2 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

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 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans