Info | ||
---|---|---|
| ||
|
Use this event to
Excerpt |
---|
Interrupt Item Journal Batch Phys. Inventory Recording posting and add extra steps (“Header Steps”) based on values already collected. |
Description
Interrupt posting and add extra steps (“Header Steps”) based on values already collected.
Template
...
...
Steps with no "conditions" are better created using the OnGetCountOrderLines_OnAddStepsToAnyHeader-event.
See also: OnPostPhysInvtRecordingOrder_OnAddStepsToAnyBatch
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS CountMOB WMS Phys Invt Recording", 'OnPostCountOrderOnPostPhysInvtRecording_OnAddStepsToItemJournalBatchOnAddStepsToPhysInvtRecording', '', truetrue, truetrue)]
local procedure OnPostCountOrder OnPostPhysInvtRecording_OnAddStepsToItemJournalBatchOnAddStepsToPhysInvtRecording(var _OrderValues: Record "MOB Common ElementMOB Common Element"; _ItemJnlBatchPhysInvtRecordHeader: Record "Item Journal Batch "Phys. Invt. Record Header"; var _StepsElement: Record "MOB Steps ElementMOB Steps Element")
begin
end;
Example
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS CountMOB WMS Phys Invt Recording", 'OnPostCountOrderOnPostPhysInvtRecording_OnAddStepsToItemJournalBatchOnAddStepsToPhysInvtRecording', '', truetrue, truetrue)]
local procedure MyOnPostCountOrder MyOnPostPhysInvtRecording_OnAddStepsToItemJournalBatchOnAddStepsToPhysInvtRecording(var _OrderValues: Record "MOB Common ElementMOB Common Element"; _ItemJnlBatchPhysInvtRecordHeader: Record "Item Journal Batch "Phys. Invt. Record Header"; var _StepsElement: Record "MOB Steps ElementMOB Steps Element")
begin
// Break if some condition to include news stepBreak if some condition to include news step(s) is not met
is not met
// if if .... then
then
// exit exit;
// Break if new datestep is already collected to prevent infinite loop
if Break if new datestep is already collected to prevent infinite loop
if _OrderValues.HasValue('MyPostingDateMyRecordedDate') then
exit;
// Create a new date step for manually selecting Posting Date
Create a new date step for manually selecting Recorded Date
_StepsElement.Create_DateStep(10000, 'MyPostingDateMyRecordedDate');
_StepsElement.Set_header('Posting DateRecorded Date');
_StepsElement.Set_minDate(Today() - 10);
_StepsElement.Set_maxDate(Today());
end;
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Version History
Version | Changes |
---|---|
MOB5.27 | Introduced |