PdcCalculation.EndProduction
Declaration
EndProduction
Description
Ends production for the calculation.
Notes
This method ends production for the calculation. The functionality is equal to that of the manual action EndProduction. I.e. an error message is generated to report on any outstanding intermediate stocklines, reservations, purchaselines or instalment lines. The errormessage is reported in pdc.LastError. If the method is called on a calculation which is already ended the calculation is changed back to the status before ending production.
Code example
This code ends production for the active calculation.
Sub sEndProduction
dim objCalc
set objCalc = pdc.ActiveCalculation
if IsValid(objCalc) then
objCalc.EndProduction
if pdc.LastError <> "" then
msgbox pdc.LastError
end if 'pdc.LastError <> ""
end if 'IsValid(objCalc)
End Sub 'sEndProduction
Availability
Available since October 2014 (5.0).