Versions Compared

Key

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


Excerpt
Set custom values for <LookupResponse>-elements (values transferred from "Bin Content" table).



Sample request

...

<request name="Lookup" created="2019-08-14T10:39:46+02:00" xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Request">
     <requestData name="Lookup">
          <Location>SILVER</Location>
          <Bin>S-01-0001</Bin>
          <LookupType>BinContent</LookupType>
     </requestData>
</request>

Template

...

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS LookupMOB WMS Lookup", 'OnLookupOnBinContent_OnAfterSetFromBinContent''', true true, true true)]
    procedure OnLookupOnBinContent_OnAfterSetFromBinContent(_BinContent: Record "Bin ContentBin Content"; var _LookupResponseElement: Record "MOB NS WhseInquery ElementMOB NS WhseInquery Element")
    begin
    end;

Example

...

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS LookupMOB WMS Lookup", 'OnLookupOnBinContent_OnAfterSetFromBinContent', '', true true, true true)]
    procedure OnLookupOnBinContent MyOnLookupOnBinContent_OnAfterSetFromBinContent(_BinContent: Record "Bin ContentBin Content"; var _LookupResponseElement: Record "MOB NS WhseInquery ElementMOB NS WhseInquery Element")
    begin
        with     with_LookupResponseElement LookupResponseElement do begin
          Set            Set_DisplayLine1('Set from OnLookupOnBinContentSet from OnLookupOnBinContent_OnAfterSetFromBinContent');
          SetValue            SetValue('ZoneCode', 'OnLookupOnBinContent_OnAfterSetFromBinContent Custom Tag for Zone Code ' + OnAfterSetFromBinContent Custom Tag for Zone Code ' + _BinContent."Zone CodeZone Code");
             end;
    end;

Version History

...

VersionChanges
MOB5.00Introduced

...