OnLookupOnSubstituteItems_OnAfterSetFromItemSubstitution

Use this event to

Set custom "lookup Substitute Items" values for <LookupResponse>-elements derived from ItemSubstitution-table.


Sample request

<request name="Looxkup" created="2019-08-14T10:39:46+02:00" xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Request">
     <requestData name="Lookup">
          <ItemNumber>1968-S</ItemNumber>
          <LookupType>SubstituteItems</LookupType>
     </requestData>
</request>

Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Lookup", 'OnLookupOnSubstituteItems_OnAfterSetFromItemSubstitution''', true, true)]
    local procedure OnLookupOnSubstituteItems_OnAfterSetFromItemSubstitution(_ItemSubstitution: Record "Item Substitution"; var _LookupResponseElement: Record "MOB NS WhseInquery Element")
    begin
    end;

Example

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Lookup", 'OnLookupOnSubstituteItems_OnAfterSetFromItemSubstitution''', true, true)]
    local procedure MyOnLookupOnSubstituteItems_OnAfterSetFromItemSubstitution(_ItemSubstitution: Record "Item Substitution"; var _LookupResponseElement: Record "MOB NS WhseInquery Element")
    begin
        _LookupResponseElement.Set_DisplayLine1('Set from OnSubstituteItemsOnAfterSetFromItemSubstitution');
        _LookupResponseElement.SetValue('Interchangeable''OnSubstituteItemsOnAfterSetFromItemSubstituion Custom Tag for Interchangeable ' + Format(_ItemSubstitution.Interchangeable));
    end;


More examples

There are no items with the selected labels at this time.

Version History

VersionChanges
MOB5.00Introduced