Reserve Transfer line for Sales line

finderfinder Member Posts: 129
Hi,

I made a special solution for creating transfer order from sales order. It's working very nice. Now I want to create automatically reservations between sales and transfer order and got stucked. In sales line table there is a function like AutoReserve which works very well if I don't have to specify which entry to reserve (takes automatically). But in my case I want to specify sales line and certain transfer line for reservation. Can somebody suggest which functions I could use for this.

Thanks in advance,
Anti

Answers

  • krikikriki Member, Moderator Posts: 9,110
    I am afraid that in this case you will have to write something yourself.
    First do manually the steps you need to reserve a certain TO for your SO. With the debugger you follow what Navision does. After this you have a good idea how to program it to simulate this behaviour.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • finderfinder Member Posts: 129
    Then it seems to be quite difficult. By doing it manually it goes through different forms (reservation based on Entry Summary table and Available - Sales Lines based on Sales Line) until it starts to create reservation. It's very complicated process and I don't know for sure which functions I can left out and which not to guarantee it working properly. Maybe you can suggest some places in the program where this kind automatic reservation takes place (between certain documents) which I could look at.
  • kinekine Member Posts: 12,562
    Some tips:

    Codeunit 99000832 - Sales Line-Reserve
    Functions:

    CreateReservation
    CreateReservationSetFrom

    or

    Codeunit 99000836 - Transfer Line-Reserve

    CreateReservation
    CreateReservationSetFrom
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • finderfinder Member Posts: 129
    Yes, I checked also these CU-s but I have some questions about these functions. CreateReservationSetFrom has a parameter FromBatchName what should I specify to this code. Should it be enough to use only these two functions and should it give me the same result as I've done reservation manually?
  • kinekine Member Posts: 12,562
    Fields, you do not know how to fill them, just skip (fill them with blanks). The functions are generic and when you are reserving from journal, you will some parameters, and when reserving from document, another set of parameters...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.