Skip to Content
0
Jul 23, 2021 at 09:33 AM

How to production with DI API

913 Views

Hi,

I need to do production using the DI API, and I have not done this before. There is no example code in the SDK for this process, so I am hoping someone can steer me in the right direction.

A specific requirement is that I need to change the cost price of one component each time.

All answers, and any advice or suggestions are most welcome.

Following the steps as in the B1 client, I suppose I would have to go about it like this(?):

  1. Open the relevant BOM, and change the price of the relevant component
  2. Create a new Production Order with status planned
  3. Add the Production Order
  4. Get it back with GetByKey and set it to status released.
  5. Create a Receipt From Production
    a. interface WorkOrders > BoObjectTypes.oWorkOrders ?
    b. if so, how do I draw from the Production Order, or is this even possible?
    c. example code for this step would be great.
  6. Add the Receipt From Production
  7. Get the Production Order back with GetByKey and set it to status closed.

Are there any steps I can skip?

Regards,

Johan