Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

Update delivery schedule on purchtable.

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.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,353 Super User 2024 Season 2 on at
    Update delivery schedule on purchtable.
    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.
  • CU31081222-2 Profile Picture
    CU31081222-2 7 on at
    Update delivery schedule on purchtable.
    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
    André Arnaud de Cal... 290,353 Super User 2024 Season 2 on at
    Update delivery schedule on purchtable.
    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
    CU31081222-2 7 on at
    Update delivery schedule on purchtable.
    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. 
  • Hana Xue Profile Picture
    Hana Xue Microsoft Employee on at
    Update delivery schedule on purchtable.
    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
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,353 Super User 2024 Season 2 on at
    Update delivery schedule on purchtable.
    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.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,353 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,251 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans