Use this event to
Excerpt |
---|
Populate new line when adding to an Item Journal (location without "Directed Put-away and Pick") |
...
Run additional code after a PostAdhocRegistration request has been executed. |
Template
// [Template]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnAddCountLine_OnAfterCreateItemJnlLineOnAfterPostAdhocRegistration', '', true, true)]
local procedure OnPostAdhocRegistrationOnAddCountLine_OnAfterCreateItemJnlLine( OnAfterPostAdhocRegistration(_MessageId: Guid; _RegistrationType: Text; var _RequestValues: Record "MOB NS Request Element"; var _ItemJnlLineRegistrationTypeTracking: Record "Item Journal Line"Text)
begin
end;
Example
// [Example]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnAddCountLine_OnAfterCreateItemJnlLineOnAfterPostAdhocRegistration', '', true, true)]
local procedure MyOnPostAdhocRegistrationOnAddCountLine_OnAfterCreateItemJnlLine( MyOnAfterPostAdhocRegistration(_MessageId: Guid; _RegistrationType: Text; var _RequestValues: Record "MOB NS Request Element"; var _ItemJnlLineRegistrationTypeTracking: Record "Item Journal Line"Text)
var
RegistrationType MobSetup: Text;
ItemNo: TextRecord "MOB Setup";
LocationCode MobWmsToolbox: Text;
BinCode: TextCodeunit "MOB WMS Toolbox";
begin
RegistrationType := if _RequestValues.GetValue('RegistrationType')RegistrationType <> MobWmsToolbox."CONST::UnplannedCount"() then
exit;
ItemNo := _RequestValues.GetValue('AddCountLineItem'MobSetup.Get();
LocationCode := _RequestValues.GetValue('Location');
BinCode if MobSetup."Skip Whse Unpl Count IJ Post" then begin
// Some code to calculate item journal adjustment using the "Calculate Whse. Adjustment" report
// ...
end;
_RegistrationTypeTracking := _RequestValues.GetValue('Bin');
_ItemJnlLine.Validate(Description, CopyStr(StrSubstNo('%1 %2 at %3 %4', RegistrationType, ItemNo, LocationCode, BinCode), 1, MaxStrLen(_ItemJnlLine.Description)));
RegistrationTypeTracking + ' / Item Journal adjustment calculated';
end;
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Version History
Version | Changes |
---|---|
MOB5.1727 | Introduced |