Skip to content

[Event Requet] Table 27 "Item".PickItem #29816

@fridrichovsky

Description

@fridrichovsky

Why do you need this change?

We need option change filter before count and findfirst. We set filter by Location and set custom field filters.

Describe the request

procedure PickItem(var Item: Record Item): Code[20]
    var
        FindRecordMgt: Codeunit "Find Record Management";
        ItemList: Page "Item List";
        RaiseNotification: Boolean;
    begin
        if Item.FilterGroup = -1 then
            ItemList.SetTempFilteredItemRec(Item);
        //--------------------------------------------OnPickItemOnBeforeFindFirstItem:BEGIN
        OnPickItemOnBeforeFindFirstItem(Item);
        //--------------------------------------------OnPickItemOnBeforeFindFirstItem:END

        RaiseNotification := Item.Count > FindRecordMgt.GetMaxRecordCountToReturn();

        if Item.FindFirst() then;
        ItemList.SetTableView(Item);
        ItemList.SetRecord(Item);
        ItemList.LookupMode := true;
        if RaiseNotification then
            ItemList.DoShowNotification();
        if ItemList.RunModal() = ACTION::LookupOK then
            ItemList.GetRecord(Item)
        else
            Clear(Item);

        exit(Item."No.");
    end;

    //--------------------------------------------OnPickItemOnBeforeFindFirstItem:BEGIN
    [IntegrationEvent(false, false)]
    local procedure OnPickItemOnBeforeFindFirstItem(var Item: Record Item)
    begin
    end;
    //--------------------------------------------OnPickItemOnBeforeFindFirstItem:END

Internal work item: AB#624781

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an event

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions