PdcAllocation.Save
Declaration
Save() as Boolean
Description
Creates an Allocation in PdC according to the filled in properties
Notes
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
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
if alloc.Save() then
Label1.Caption = alloc.ReservationID
else
Label1.Caption = "error: " + PDC.LastError
end if
Availability
Available since May 2017 (from version 5.4)