PdcCalculation.RecalcDatesPerOperation: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:


== Notes ==
== Notes ==
This method will recalculate the start date for alle operations and then refresh the form. The calculation will still need to be saved afterwards.
This method will recalculate the start date for alle operations and then refresh the form. The new dates are updated in the database.


== Code example ==
== Code example ==

Revision as of 11:04, 15 April 2024

Declaration

RecalcDatesPerOperation()

Description

Recalculates the start date for all operations in the calculation, this includes any subcalculations.

Notes

This method will recalculate the start date for alle operations and then refresh the form. The new dates are updated in the database.

Code example

This code example is will take the active calculation, that has a production number reserved, and adds a new operation that will not have a start date. Then by calling the function it will recalculate the start dates.

PDC.App.ActiveCalculation.OperationList.InsertLineNumber(PDCEXT.pdcOperationKind.pdcInternalOp, "FR001", 15)
PDC.App.ActiveCalculation.RecalcDatesPerOperation()
PDC.App.ActiveCalculation.Save()

Availability

2024.2.3.0