PdcAllocation.Save

From External Bemet Wiki
Revision as of 14:03, 25 April 2017 by Mike (talk | contribs) (Created page with "== Declaration == Save() as Boolean == Description == Creates an Allocation in PdC according to the filled in properties == Notes == '''Keep in mind''' that an allocation ca...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 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)