Skip to content

table 6505 "Lot No. Information" procedures ShowCard events #29476

@Kotaite

Description

@Kotaite

Why do you need this change?

At 4PS Construct, we have custom lot number information card functionality that requires the ability to initialize and configure the card page before it's displayed to users. The current OnShowCardOnAfterLotNoInfoNewSetFilters event in the standard "Lot No. Information" table has limitations that prevent us from implementing our functionality correctly.

The original implementation had two issues:

  1. ShowCard method (with TrackingSpecification): The integration event only passed LotNoInformation and TrackingSpecification parameters, but we needed access to the LotNo parameter and the LotNoInfoForm page object to properly initialize the form before display.

  2. ShowCard method (with WhseItemTrackingLine): There was no integration event at all, meaning we had no way to customize the behavior when showing the lot number card from warehouse item tracking contexts.

To correctly implement our custom lot number information card initialization and configuration, we need:

Enhanced first event: The OnShowCardOnAfterLotNoInfoNewSetFilters event must include two additional parameters:

LotNo - to access the specific lot number being displayed.
LotNoInfoForm - to configure the page before it runs.

New second event: A new OnShowCardOnAfterLotNoInfoNewSetFilters2 integration event for the warehouse scenario, with all necessary parameters (LotNoInformation, WhseItemTrackingLine, LotNo, and LotNoInfoForm).

Describe the request

Dear ALAppExtensions team,
On behalf of 4PS, I would like to request:

  1. An update to the integration event OnShowCardOnAfterLotNoInfoNewSetFilters in table 6505 "Lot No. Information" - add aditional parameters LotNo: Code[50], var LotNoInfoForm: Page "Lot No. Information Card"

local procedure OnShowCardOnAfterLotNoInfoNewSetFilters(var LotNoInformation: Record "Lot No. Information"; TrackingSpecification: Record "Tracking Specification"; LotNo: Code[50]; var LotNoInfoForm: Page "Lot No. Information Card")

  1. A new event in procedure ShowCard(LotNo: Code[50]; WhseItemTrackingLine: Record "Whse. Item Tracking Line")

procedure ShowCard(LotNo: Code[50]; WhseItemTrackingLine: Record "Whse. Item Tracking Line")
var
LotNoInfoNew: Record "Lot No. Information";
LotNoInfoForm: Page "Lot No. Information Card";
begin
Clear(LotNoInfoForm);
LotNoInfoForm.InitWhse(WhseItemTrackingLine);

  LotNoInfoNew.SetRange("Item No.", WhseItemTrackingLine."Item No.");
  LotNoInfoNew.SetRange("Variant Code", WhseItemTrackingLine."Variant Code");
  LotNoInfoNew.SetRange("Lot No.", LotNo);
  **OnShowCardOnAfterLotNoInfoNewSetFilters2(LotNoInfoNew, WhseItemTrackingLine, LotNo, LotNoInfoForm);**

  LotNoInfoForm.SetTableView(LotNoInfoNew);
  LotNoInfoForm.Run();

end;

local procedure OnShowCardOnAfterLotNoInfoNewSetFilters2(var LotNoInformation: Record "Lot No. Information"; WhseItemTrackingLine: Record "Whse. Item Tracking Line"; LotNo: Code[50]; var LotNoInfoForm: Page "Lot No. Information Card")

Current solution:

Image

Suggested extensibility:

Image Internal work item: [AB#614978](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/614978)

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an eventships-in-future-updateFix ships in a future update

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions