Showing results for 
Search instead for 
Did you mean: 

DI API - Receipts from Production

Former Member
0 Kudos

Hi all,

Do you know if it is possible to create programmatically Receipts from Production (with DI API)?

Thanks a lot.


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Cyril,

yes, I did it...

Simply create a InventoryEntry instance and set baseentry property of Document_Lines with DocEntry of your production order.

Here's a snippet of my code

Set oInventoryDocument = sboCompany.GetBusinessObject(oInventoryGenEntry)

oInventoryDocument.Lines.SetCurrentLine 0

oInventoryDocument.Lines.BaseEntry = SelProductionOrder.AbsoluteEntry

// SelProductionOrder must be a valid instance of ProductionOrder object

// Then set other line properties (quantity produced, etc.

// Finally call ooInventoryDocument.Add()

Hope this helps

Answers (0)