PdcAllocations.New

From External Bemet Wiki
Jump to navigation Jump to search

Declaration

New() as pdcAllocation

Description

Creates a new TpdcAllocation object.

Notes

This TpdcAllocation object can be used to create and write off an allocation in PdC. Keep in mind that an allocation can only be written off through scripting if the material has the correct write-off-settings. Check the notes in pdcAllocation.WriteOff for more information.

Code example

This code creates a new TpdcAllocation object and sets the properties needed in order to create an allocation in PdC.

dim alloc
Set alloc = PDC.Logistics.Allocations.New

alloc.MaterialID = 2075
alloc.MaterialNo = "ASSY3 SCHAW10"
alloc.Quantity = 4
alloc.LMV_ID = 111
alloc.ReservationID = 357
alloc.UseExistingAlloc = False

Availability

Available since May 2017 (from version 5.4)