Versions Compared

Key

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

Use this event to

Excerpt

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

...

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 Production Consumption", 'OnPostProdConsumption_OnHandleRegistrationForProductionJnlLine''', true, true)]
    local procedure OnPostProdConsumption_OnHandleRegistrationForProductionJnlLine(var _Registration: Record "MOB WMS Registration"; var _ProductionJnlLine: Record "Item Journal Line")
    begin
    end;

Example

    // [Example]  Verify quantity at Registration will not be rounded during posting process but can be posted exactly as-is
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Production Consumption", 'OnPostProdConsumption_OnHandleRegistrationForProductionJnlLine''', true, true)]
    local procedure MyOnPostProdConsumption_OnHandleRegistrationForProductionJnlLine(var _Registration: Record "MOB WMS Registration"; var _ProductionJnlLine: Record "Item Journal Line")
    var
        UoMMgt: Codeunit "Unit of Measure Management";
    begin
        _Registration.TestField(Quantity, Round(_Registration.Quantity, UoMMgt.QtyRndPrecision()));
    end;



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

...