Versions Compared

Key

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

Use this event to

Excerpt

XXX

Handle collected values from Registrations (“Line Steps”).

Description

XXX

This event is used to handle collected "line" level steps for consumption and is executed once for each individual Mobile WMS Registration.

Examples of use could be:

  • Write collected values to new or existing fields in the database that subsequently can be accessed from standard posting function events.
  • Validate collected values against live data since registration at the mobile device is mostly conducted offline.
  • Not to process "header" level steps.  Steps added via OnAddStepsToProdOrderLine[...] is better handled via OnPostAssemblyOrder_OnBeforePostAssemblyOrder-event.

Note
titleCommit

Database transactions in this event is committed to database prior to calling standard BC posting routines. Your customized code must be structured accordingly.

However, since the Production Journal is used for the posting, all journal lines for the UserId is consistently disposed and recreated between each posting attempt.


Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Assembly", 'OnPostAssemblyOrder_OnHandleRegistrationForAssemblyLine''', true, true)]
    local procedure OnPostAssemblyOrder_OnHandleRegistrationForAssemblyLine(var _Registration: Record "MOB WMS Registration"; var _AssemblyLine: Record "Assembly Line"; var _NewReservationEntry: Record "Reservation Entry")
    begin
    end;

Example

    // [Example]  Verify custom step 'CustomNetWeightGrams' is in the Xml file and can be read from 'MOB WMS Registration' later
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Assembly", 'OnPostAssemblyOrder_OnHandleRegistrationForAssemblyLine''', true, true)]
    local procedure MyOnPostAssemblyOrder_OnHandleRegistrationForAssemblyLine(var _Registration: Record "MOB WMS Registration"; var _AssemblyLine: Record "Assembly Line"; var _NewReservationEntry: Record "Reservation Entry")
    begin
        // Example: Throw error if custom step is not in Xml
        // Step was created in OnGetAssemblyOrderLines_OnAddStepsToConsumptionLine
        _Registration.GetValueAsDecimal('CustomNetWeightGrams', true);

        // Add your custom code here...
    end;



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

  

Version History

VersionChanges
MOB5.24Introduced