Why do you need this change?
When creating a production order, users can manually set the Scheduling Direction to Forward to ensure that the start date of the production order remains unchanged. The default setting however is Backwards for most scenario's where changes are made to the production order, or production order line.
When planning production orders based on inventory, this behavior can become inconvenient. For example, when the quantity of a production order line is changed, the start date will automatically be moved backwards due to the scheduling calculation.
Describe the request
In the OnValidate of field Quantity (40) the field "Ending Time" gets validated. This recalculates the Production Order with the option "Backward" hardcoded.
The validation of field "Starting Time" will trigger the recalculation with the option "Forward" hardcoded.
Based on a new setting we have created in our product, we would like to either trigger the "Ending Time" or "Starting Time" field. To achieve this we will need an event before validating the "Ending Time" field.
The code would look as follows:
if CurrFieldNo <> 0 then begin
IsHandled := false;
OnBeforeValidateEndingTimeOnValidateQuantity(Rec, IsHandled);
if not IsHandled then
Validate("Ending Time");
end;
The same thing happens on the "Quantity (Base)" field.
IsHandled := false;
OnBeforeValidateEndingTimeOnValidateQuantityBase(Rec, IsHandled);
if not IsHandled then
Validate("Ending Time");
A counter-point you could make is that both fields have an IsHandled structure at the top of the validation. I do not think these are futureproof possibilities.
Performance note: Adding an event has no affect on the performance of the system.
Data sensitivity/security statement: No sensitive data will be exposed.
Multi-extension interaction assessment: Multiple subscribes could set the IsHandled property to true, as a software vendor and consultancy partner it is always your responsibility to verify cross-compatibility with other apps installed in the environment. You should also format your code like;
or
IsHandled := true or IsHandled;
Internal work item: AB#644773
Why do you need this change?
When creating a production order, users can manually set the Scheduling Direction to Forward to ensure that the start date of the production order remains unchanged. The default setting however is Backwards for most scenario's where changes are made to the production order, or production order line.
When planning production orders based on inventory, this behavior can become inconvenient. For example, when the quantity of a production order line is changed, the start date will automatically be moved backwards due to the scheduling calculation.
Describe the request
In the OnValidate of field Quantity (40) the field "Ending Time" gets validated. This recalculates the Production Order with the option "Backward" hardcoded.
The validation of field "Starting Time" will trigger the recalculation with the option "Forward" hardcoded.
Based on a new setting we have created in our product, we would like to either trigger the "Ending Time" or "Starting Time" field. To achieve this we will need an event before validating the "Ending Time" field.
The code would look as follows:
The same thing happens on the "Quantity (Base)" field.
A counter-point you could make is that both fields have an IsHandled structure at the top of the validation. I do not think these are futureproof possibilities.
Performance note: Adding an event has no affect on the performance of the system.
Data sensitivity/security statement: No sensitive data will be exposed.
Multi-extension interaction assessment: Multiple subscribes could set the IsHandled property to true, as a software vendor and consultancy partner it is always your responsibility to verify cross-compatibility with other apps installed in the environment. You should also format your code like;
or
Internal work item: AB#644773