Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Use this event to

Handle existing or new 'Whse. Inquiry' document types.

Description

Optionally use this event to handle new custom Document Types in the 'Whse. Inquiry' document handler class.

You may handle new custom Document Types for Whse. Inquiry either by:

  1. subscribing to this event
  2. or: create a new handler class and change Mobile Document Type setup accordingly to direct the new custom Document Type to this new class. Handle your custom Document Type in OnRun in the new class.

Both courses of action are valid, and your choice may be dependent on how old code is structured when doing migrations from older MOB versions.


Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Whse. Inquiry", 'OnWhseInquiryOnCustomDocumentTypeAsXml''', true, true)]
    procedure OnWhseInquiryOnCustomDocumentTypeAsXml(var _XMLRequestDoc: XmlDocumentvar _XMLResponseDoc: XmlDocument; _DocumentType: Textvar _RegistrationTypeTracking: Text[200]; var _IsHandled: Boolean)
    begin
    end;


Example

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Whse. Inquiry", 'OnWhseInquiryOnCustomDocumentTypeAsXml''', true, true)]
    procedure OnWhseInquiryOnCustomDocumentTypeAsXml(var _XMLRequestDoc: XmlDocumentvar _XMLResponseDoc: XmlDocument; _DocumentType: Textvar _RegistrationTypeTracking: Text[200]; var _IsHandled: Boolean)
    begin
        if (_DocumentType <> 'MyCustomWhseInquiryDocumentType') or _IsHandled then
            exit;

        // ... custom code here ...

        // TODO – Better example of how to return _RegistrationTypeTracking / see i.e. MoibWmsAdhocRegistration..CreateRegisterItemImageRegColConf()

        _IsHandled := true;
    end;


More examples


Version History

VersionChanges
MOB5.11Introduced
  • No labels