Versions Compared

Key

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

Use this event to

Excerpt
Modify existing response for online search 'ItemSearch' (values transferred from "Item" table).

...

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Online Search", 'OnSearchOnItemSearch_OnAfterSetFromItem', '', true, true)]
    localprocedure OnSearchOnItemSearch_OnAfterSetFromItem(_Item: Record Item; var _SearchResponseElement: Record"MOB NS WhseInquery SearchResult Element")
    begin
    end;

Example

    // [Example]  Display "No. 2" in search response
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Online Search", 'OnSearchOnItemSearch_OnAfterSetFromItem', '', true, true)]
    localprocedure MyOnSearchOnItemSearch_OnAfterSetFromItem(_Item: Record Item; var _SearchResponseElement: Record"MOB NS WhseInquery ElementSearchResult Element")
    var
        MobToolbox: Codeunit"MOB Toolbox";
    begin
        // Display "No. 2" as part of DisplayLine1 if populated
        if _Item."No. 2" <> ''then
            _SearchResponseElement.Set_DisplayLine1(_SearchResponseElement.Get_DisplayLine1() + MobToolbox.CRLFSeparator() + _Item."No. 2");
    end;


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

...