Skip to content

[Event Request] codeunit 22 "Item Jnl.-Post Line" procedure TestFirstApplyItemLedgerEntryTracking #30350

Description

@kmistrytnp

Why do you need this change?

I need to provide better error messages for the user, the current error messages make references to the "Item Journal Line" record - which is a temporary record for document postings (such as a Sales Order or Purchase Invoice) - so the user cannot tell from the error message which document line or which specific Item is missing the Item Tracking (Serial/Lot).

I also need to skip the lot checking in a specific scenario, so I would like the ItemTrackingCode parameter to be a var parameter so I can amend it accordingly.

I therefore want to do the check myself and error with a better error message BEFORE the standard code by having an OnBeforeTestFirstApplyItemLedgerEntryTracking(ItemLedgEntry, OldItemLedgEntry, ItemTrackingCode) event at the start.

Describe the request

The following to be added at the start

OnBeforeTestFirstApplyItemLedgerEntryTracking(ItemLedgEntry, OldItemLedgEntry, ItemTrackingCode);

Event procedure created as follows

    [IntegrationEvent(false, false)]
    local procedure OnBeforeTestFirstApplyItemLedgerEntryTracking(ItemLedgEntry: Record "Item Ledger Entry"; OldItemLedgEntry: Record "Item Ledger Entry"; var ItemTrackingCode: Record "Item Tracking Code")
    begin
    end;

Internal work item: AB#642242

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an eventext-ready-to-implementReviewed and ready to implement and create PR

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions