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.
- Add extra steps during posting (interrupt posting to collect addtional steps)
- Used for "conditional" steps i.e. when values from previously collected steps determines if the step are to be included
- Extra steps can be collected for the "header" only. Extra steps per document line are currently not supported for planned document types
- Posting are restarted (started over) when the additional steps have been collected on the mobile device
- Events are executed every time posting starts over and can be used to chain even more steps.
...
Template
...
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) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...