KVSFCYMandatoryFieldsLib#
Procedures#
EditWorkCenter(Record Work Center) :#
Summary: Initiates maintenance mode for a work center, triggering mandatory field validation workflows. This procedure sets the work center into maintenance mode and configures the mandatory field checking framework based on the manufacturing setup configuration. It updates the maintenance status to indicate that the work center is undergoing field validation, initializes the appropriate field checking status based on whether mandatory field validation is enabled in manufacturing setup, and applies blocking logic to prevent work center usage during the validation process. The procedure ensures that work centers comply with mandatory field requirements before they can be used in manufacturing operations, maintaining data quality and completeness standards. It coordinates with the broader mandatory fields framework to enforce validation rules and user workflows, automatically saving the changes to the work center record to persist the maintenance state and validation configuration for subsequent processing workflows.
procedure EditWorkCenter(var WorkCenter: Record "Work Center"):
Parameters:
WorkCenter: Work center record variable that will be placed into maintenance mode with appropriate mandatory field validation configuration and blocking status.
FinishWorkCenter(Record Work Center) :#
Summary: Completes the mandatory field validation process for a work center and finalizes maintenance status. This procedure executes the final validation workflow for work centers by either performing comprehensive mandatory field checks or marking the validation as skipped based on manufacturing setup configuration. When mandatory field checking is enabled, it runs the full validation process with user interface display of any found validation issues and updates the work center record with validation results. When mandatory field checking is disabled, it bypasses validation and marks the checking status as skipped while still completing the maintenance workflow. The procedure handles both validation scenarios by setting appropriate maintenance and blocking status, ensuring work centers are properly configured for manufacturing operations. It automatically saves all changes to persist the final validation state and maintenance completion status, enabling work centers to be used in production workflows once validation requirements are satisfied.
procedure FinishWorkCenter(var WorkCenter: Record "Work Center"):
Parameters:
WorkCenter: Work center record variable that will have its mandatory field validation completed and maintenance status finalized.
BatchFinishWorkCenter(Record Work Center) :#
Summary: Performs batch processing of mandatory field validation for multiple work centers simultaneously. This procedure processes all work centers in the provided record set, executing validation workflows for each work center based on manufacturing setup configuration. It iterates through the work center collection, applying either comprehensive mandatory field validation or marking validation as skipped depending on system configuration. When mandatory field checking is enabled, it performs silent validation without user interface display for efficient batch processing, while still updating records with validation results and maintenance status. When validation is disabled, it processes each work center by marking validation as skipped and completing maintenance workflows. The procedure ensures consistent validation processing across multiple work centers while maintaining performance through optimized batch operations. All changes are automatically saved for each work center to persist validation states and enable subsequent manufacturing operations once validation requirements are satisfied across the entire batch.
procedure BatchFinishWorkCenter(var WorkCenter: Record "Work Center"):
Parameters:
WorkCenter: Work center record set containing multiple work centers to be processed through batch mandatory field validation workflows.
BatchFinishMachineCenter(Record Machine Center) :#
Summary: Performs batch processing of mandatory field validation for multiple machine centers simultaneously. This procedure processes all machine centers in the provided record set, executing validation workflows for each machine center based on manufacturing setup configuration. It iterates through the machine center collection, applying either comprehensive mandatory field validation or marking validation as skipped depending on system configuration. When mandatory field checking is enabled, it performs silent validation without user interface display for efficient batch processing, while still updating records with validation results and maintenance status. When validation is disabled, it processes each machine center by marking validation as skipped and completing maintenance workflows. The procedure ensures consistent validation processing across multiple machine centers while maintaining performance through optimized batch operations. All changes are automatically saved for each machine center to persist validation states and enable subsequent manufacturing operations once validation requirements are satisfied across the entire batch.
procedure BatchFinishMachineCenter(var MachineCenter: Record "Machine Center"):
Parameters:
MachineCenter: Machine center record set containing multiple machine centers to be processed through batch mandatory field validation workflows.
KVSFCYConditionTest(RecordRef, Record KVSKBAMandatoryCheckField) : Boolean#
Summary: Evaluates conditional logic for mandatory field validation rules based on record field values. This procedure determines whether mandatory field validation rules should be applied by testing conditional criteria against record field values. It examines the mandatory field configuration to identify any conditional field requirements and evaluates the specified condition against the actual field value in the provided record reference. When no condition is specified (empty condition field or value), it defaults to allowing validation to proceed. When conditions are present, it retrieves the field reference, handles FlowField calculations if necessary, and evaluates the condition using the enhanced value comparison logic. The procedure supports complex conditional validation scenarios where mandatory field requirements depend on the values of other fields within the same record, enabling flexible and context-sensitive validation workflows that can adapt to different business scenarios and record states in the mandatory field framework.
procedure KVSFCYConditionTest(RecRefPar: RecordRef; MandFieldPar: Record "KVSKBAMandatoryCheckField"): Boolean
Parameters:
RecRefPar: Record reference containing the fields to be evaluated against the conditional mandatory field validation criteria.MandFieldPar: Mandatory field configuration record containing the condition field number, condition value, and validation criteria for conditional evaluation.
Returns: Boolean value indicating whether the condition is met (true) or not met (false), determining if mandatory field validation should be applied.
Events#
OnBeforeOnValidateGLAccountBlockedUser(Record G/L Account, Boolean) :#
Summary: Integration event raised before validating G/L account blocked user field during mandatory field workflows.
[IntegrationEvent(false, false)]
local procedure OnBeforeOnValidateGLAccountBlockedUser(var GLAccount: Record "G/L Account"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYMandatoryFieldsLib", 'OnBeforeOnValidateGLAccountBlockedUser', '', false, false)]
local procedure DoSomethingOnBeforeOnValidateGLAccountBlockedUser(var GLAccount: Record "G/L Account"; var IsHandled: Boolean)
begin
end;
Parameters:
GLAccount: Variable parameter containing the G/L account record being validated.IsHandled: Variable parameter to indicate if the validation has been handled by subscriber.
OnBeforeSetGLAccountBlockedWhenMaintenanceInProgress(Record G/L Account, Boolean, Boolean) :#
Summary: Integration event raised before setting G/L account blocked status when maintenance is in progress.
[IntegrationEvent(false, false)]
local procedure OnBeforeSetGLAccountBlockedWhenMaintenanceInProgress(var GLAccount: Record "G/L Account"; UseMandatoryFieldCheck: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYMandatoryFieldsLib", 'OnBeforeSetGLAccountBlockedWhenMaintenanceInProgress', '', false, false)]
local procedure DoSomethingOnBeforeSetGLAccountBlockedWhenMaintenanceInProgress(var GLAccount: Record "G/L Account"; UseMandatoryFieldCheck: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
GLAccount: Variable parameter containing the G/L account record to have blocked status updated.UseMandatoryFieldCheck: Parameter indicating whether mandatory field checking is enabled.IsHandled: Variable parameter to indicate if the blocking logic has been handled by subscriber.
OnBeforeSetGLAccountBlockedWhenMaintenanceComplete(Record G/L Account, Boolean) :#
Summary: Integration event raised before setting G/L account blocked status when maintenance is complete.
[IntegrationEvent(false, false)]
local procedure OnBeforeSetGLAccountBlockedWhenMaintenanceComplete(var GLAccount: Record "G/L Account"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYMandatoryFieldsLib", 'OnBeforeSetGLAccountBlockedWhenMaintenanceComplete', '', false, false)]
local procedure DoSomethingOnBeforeSetGLAccountBlockedWhenMaintenanceComplete(var GLAccount: Record "G/L Account"; var IsHandled: Boolean)
begin
end;
Parameters:
GLAccount: Variable parameter containing the G/L account record to have blocked status finalized.IsHandled: Variable parameter to indicate if the blocking logic has been handled by subscriber.
OnBeforeOnValidateWorkCenterBlockedUser(Record Work Center, Boolean) :#
Summary: Integration event raised before validating work center blocked user field during mandatory field workflows.
[IntegrationEvent(false, false)]
local procedure OnBeforeOnValidateWorkCenterBlockedUser(var WorkCenter: Record "Work Center"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYMandatoryFieldsLib", 'OnBeforeOnValidateWorkCenterBlockedUser', '', false, false)]
local procedure DoSomethingOnBeforeOnValidateWorkCenterBlockedUser(var WorkCenter: Record "Work Center"; var IsHandled: Boolean)
begin
end;
Parameters:
WorkCenter: Variable parameter containing the work center record being validated.IsHandled: Variable parameter to indicate if the validation has been handled by subscriber.
OnBeforeSetWorkCenterBlockedWhenMaintenanceInProgress(Record Work Center, Boolean, Boolean) :#
Summary: Integration event raised before setting work center blocked status when maintenance is in progress.
[IntegrationEvent(false, false)]
local procedure OnBeforeSetWorkCenterBlockedWhenMaintenanceInProgress(var WorkCenter: Record "Work Center"; UseMandatoryFieldCheck: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYMandatoryFieldsLib", 'OnBeforeSetWorkCenterBlockedWhenMaintenanceInProgress', '', false, false)]
local procedure DoSomethingOnBeforeSetWorkCenterBlockedWhenMaintenanceInProgress(var WorkCenter: Record "Work Center"; UseMandatoryFieldCheck: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
WorkCenter: Variable parameter containing the work center record to have blocked status updated.UseMandatoryFieldCheck: Parameter indicating whether mandatory field checking is enabled.IsHandled: Variable parameter to indicate if the blocking logic has been handled by subscriber.
OnBeforeSetWorkCenterBlockedWhenMaintenanceComplete(Record Work Center, Boolean) :#
Summary: Integration event raised before setting work center blocked status when maintenance is complete.
[IntegrationEvent(false, false)]
local procedure OnBeforeSetWorkCenterBlockedWhenMaintenanceComplete(var WorkCenter: Record "Work Center"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYMandatoryFieldsLib", 'OnBeforeSetWorkCenterBlockedWhenMaintenanceComplete', '', false, false)]
local procedure DoSomethingOnBeforeSetWorkCenterBlockedWhenMaintenanceComplete(var WorkCenter: Record "Work Center"; var IsHandled: Boolean)
begin
end;
Parameters:
WorkCenter: Variable parameter containing the work center record to have blocked status finalized.IsHandled: Variable parameter to indicate if the blocking logic has been handled by subscriber.
OnBeforeOnValidateMachineCenterBlockedUser(Record Machine Center, Boolean) :#
Summary: Integration event raised before validating machine center blocked user field during mandatory field workflows.
[IntegrationEvent(false, false)]
local procedure OnBeforeOnValidateMachineCenterBlockedUser(var MachineCenter: Record "Machine Center"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYMandatoryFieldsLib", 'OnBeforeOnValidateMachineCenterBlockedUser', '', false, false)]
local procedure DoSomethingOnBeforeOnValidateMachineCenterBlockedUser(var MachineCenter: Record "Machine Center"; var IsHandled: Boolean)
begin
end;
Parameters:
MachineCenter: Variable parameter containing the machine center record being validated.IsHandled: Variable parameter to indicate if the validation has been handled by subscriber.
OnBeforeSetMachineCenterBlockedWhenMaintenanceInProgress(Record Machine Center, Boolean, Boolean) :#
Summary: Integration event raised before setting machine center blocked status when maintenance is in progress.
[IntegrationEvent(false, false)]
local procedure OnBeforeSetMachineCenterBlockedWhenMaintenanceInProgress(var MachineCenter: Record "Machine Center"; UseMandatoryFieldCheck: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYMandatoryFieldsLib", 'OnBeforeSetMachineCenterBlockedWhenMaintenanceInProgress', '', false, false)]
local procedure DoSomethingOnBeforeSetMachineCenterBlockedWhenMaintenanceInProgress(var MachineCenter: Record "Machine Center"; UseMandatoryFieldCheck: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
MachineCenter: Variable parameter containing the machine center record to have blocked status updated.UseMandatoryFieldCheck: Parameter indicating whether mandatory field checking is enabled.IsHandled: Variable parameter to indicate if the blocking logic has been handled by subscriber.
OnBeforeSetMachineCenterBlockedWhenMaintenanceComplete(Record Machine Center, Boolean) :#
Summary: Integration event raised before setting machine center blocked status when maintenance is complete.
[IntegrationEvent(false, false)]
local procedure OnBeforeSetMachineCenterBlockedWhenMaintenanceComplete(var MachineCenter: Record "Machine Center"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYMandatoryFieldsLib", 'OnBeforeSetMachineCenterBlockedWhenMaintenanceComplete', '', false, false)]
local procedure DoSomethingOnBeforeSetMachineCenterBlockedWhenMaintenanceComplete(var MachineCenter: Record "Machine Center"; var IsHandled: Boolean)
begin
end;
Parameters:
MachineCenter: Variable parameter containing the machine center record to have blocked status finalized.IsHandled: Variable parameter to indicate if the blocking logic has been handled by subscriber.