Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Use this event to

Populate "Item Unit of Measure" prior to record being inserted or updated.


Template

    // [Template]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnItemDimensions_OnAfterCreateItemUnitOfMeasure''', true, true)]
    local procedure OnPostAdhocRegistrationOnItemDimensions_OnAfterCreateItemUnitOfMeasure(var _RequestValues: Record "MOB NS Request Element"; var _ItemUnitOfMeasure: Record "Item Unit of Measure")
    begin
    end;

Example

    // [Example] 
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnItemDimensions_OnAfterCreateItemUnitOfMeasure''', true, true)]
    local procedure MyOnPostAdhocRegistrationOnItemDimensions_OnAfterCreateItemUnitOfMeasure(var _RequestValues: Record "MOB NS Request Element"; var _ItemUnitOfMeasure: Record "Item Unit of Measure")
    var
        RegistrationType: Text;
        Cubage: Decimal;
    begin
        // example only, RegistrationType is not used in the code below
        RegistrationType := _RequestValues.GetValue('RegistrationType');


        // prerequisite: the "Cubage"-step must to be created from separate event to be able to actually read this value here
        // see: https://docs.taskletfactory.com/display/TFSK/OnGetRegistrationConfiguration_OnAddSteps
        Cubage := _RequestValues.GetValueAsDecimal('Cubage');

        _ItemUnitOfMeasure.Validate(Cubage, Cubage);
    end;


More examples

There are no items with the selected labels at this time.


Version History

Version

Changes

MOB5.17Introduced
  • No labels