Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Use this event to

Excerpt

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


Template

    // [Template]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnItemDimensions_OnAfterCreateItemUnitOfMeasureOnBeforeInsertModifyItemUnitOfMeasure''', true, true)]
    local procedure OnPostAdhocRegistrationOnItemDimensions_OnAfterCreateItemUnitOfMeasureOnBeforeInsertModifyItemUnitOfMeasure(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_OnAfterCreateItemUnitOfMeasureOnBeforeInsertModifyItemUnitOfMeasure''', true, true)]
    local procedure MyOnPostAdhocRegistrationOnItemDimensions_OnAfterCreateItemUnitOfMeasureOnBeforeInsertModifyItemUnitOfMeasure(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://docstaskletfactory.taskletfactoryatlassian.comnet/wiki/display/TFSK/OnGetRegistrationConfiguration_OnAddSteps
        Cubage := _RequestValues.GetValueAsDecimal('Cubage');

        _ItemUnitOfMeasure.Validate(Cubage, Cubage);
    end;


Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
titleMore examples
excerptTypesimple
cqllabel = "bc" and label = "example" and label = "OnPostAdhocRegistrationOnItemCrossReferenceOnPostAdhocRegistrationOnItemDimensions_OnAfterCreateItemCrossReferenceOnBeforeInsertModifyItemUnitOfMeasure"


Version History

Version

Changes

MOB5.17Introduced