Codeunit 70491905 EOS055.01 HU Status Management

Codeunit 70491905 EOS055.01 HU Status Management

Status management for handling units.

Methods

ChangeStatusYesNo

procedure ChangeStatusYesNo(var Hu: Record "EOS055 Handling Unit")

Opens a dialog to allow the user to change the status of a handling unit.

Parameters / Return Value

  • Hu Record "EOS055 Handling Unit"

    The handling unit to be changed.


ChangeStatus

procedure ChangeStatus(var Hu: Record "EOS055 Handling Unit"; NewStatus: Enum "EOS055.01 Handling Unit Status")

Changes the status of a handling unit. This will cause additional validation and checks, depending on the status being set. Also note that, by default, you can not go backwards. This function does not modify the record. If the new status is the same as the current status, nothing will be done.

Parameters / Return Value

  • Hu Record "EOS055 Handling Unit"

    The handling unit.

  • NewStatus Enum "EOS055.01 Handling Unit Status"

    The new status to be set on the handling unit.


ChangeStatus

procedure ChangeStatus(var Hu: Record "EOS055 Handling Unit"; NewStatus: Enum "EOS055.01 Handling Unit Status"; Force: Boolean)

Changes the status of a handling unit. This will cause additional validation and checks, depending on the status being set. Also note that, by default, you can not go backwards. This function does not modify the record. If the new status is the same as the current status, nothing will be done, unless Force is specified.

Parameters / Return Value

  • Hu Record "EOS055 Handling Unit"

    The handling unit.

  • NewStatus Enum "EOS055.01 Handling Unit Status"

    The new status to be set on the handling unit.

  • Force Boolean

    Specifies whether status logic will be executed even if the current status is already the same as the new status.


CheckHuConsistency

procedure CheckHuConsistency(Hu: Record "EOS055 Handling Unit")

Checks the consistency of a handling unit.

Parameters / Return Value

  • Hu Record "EOS055 Handling Unit"

    The handling unit to check.


CheckHandlingUnitIssues

procedure CheckHandlingUnitIssues(DocVariant: Variant)

Checks all handling units assigned to the given source document for issues. If any errors are found, a runtime error is thrown.

Parameters / Return Value

  • DocVariant Variant

    The source document.


CheckHandlingUnitIssues

procedure CheckHandlingUnitIssues(SourceType: Integer; SourceSubtype: Integer; SourceNo: Code[20])

Checks all handling units assigned to the given source document for issues. If any errors are found, a runtime error is thrown.

Parameters / Return Value

  • SourceType Integer

    The source document type.

  • SourceSubtype Integer

    The source document subtype.

  • SourceNo Code[20]

    The source document no.


CheckHandlingUnitIssues

procedure CheckHandlingUnitIssues(var HandlingUnit: Record "EOS055 Handling Unit")

Checks all given handling units for issues. If any errors are found, a runtime error is thrown.

Parameters / Return Value

  • HandlingUnit Record "EOS055 Handling Unit"

    The handling units to check.


Events

OnBeforeCheckHuConsistency

local procedure OnBeforeCheckHuConsistency(Hu: Record "EOS055 Handling Unit"; var Handled: Boolean)

Raised before consistency checks on a handling unit are evaluated.

Parameters / Return Value

  • Hu Record "EOS055 Handling Unit"

    The handling unit being checked.

  • Handled Boolean

    Indicates whether this event is handled. Use this to bypass consistency checks or implement your own.


OnAfterCheckHuConsistency

local procedure OnAfterCheckHuConsistency(Hu: Record "EOS055 Handling Unit")

Raised after consistency checks on a handling unit have completed. You can add your own checks here.

Parameters / Return Value

  • Hu Record "EOS055 Handling Unit"

    The handling unit being checked.


OnBeforeChangeStatus

local procedure OnBeforeChangeStatus(var Hu: Record "EOS055 Handling Unit";var NewStatus: Enum "EOS055.01 Handling Unit Status";var StatusChangeAllowed: Boolean;var Force: Boolean)

Raised before the status of a handling unit is changed. You can use this to apply custom conditions or allow a status change that would otherwise not be allowed.

Parameters / Return Value

  • Hu Record "EOS055 Handling Unit"

    The handling unit.

  • NewStatus Enum "EOS055.01 Handling Unit Status"

    The new status that is about to be applied to the handling unit.

  • StatusChangeAllowed Boolean

    Set this to true to allow the status change. Setting this to false will throw an error and will not change the status. This will already be pre-set by the default logic and you can change this.

  • Force Boolean

    Gets or sets if the status change was triggered in forced mode. You can change this. A forced status change will trigger all validation logic, even if the status itself does not change. By default this is false, and a status change of the same status will not do anything.


OnAfterChangeStatus

local procedure OnAfterChangeStatus(var Hu: Record "EOS055 Handling Unit"; NewStatus: Enum "EOS055.01 Handling Unit Status"; Force: Boolean)

Raised after the status of a handling unit has been changed.

Parameters / Return Value

  • Hu Record "EOS055 Handling Unit"

    The handling unit.

  • NewStatus Enum "EOS055.01 Handling Unit Status"

    The new status that has been applied.

  • Force Boolean

    Specifies if the status change was performed in forced mode.



EOS Labs -