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

« Previous Version 21 Current »

Use this event to

Add new custom messages (translations) or modify existing messages. Mobile Messages

Description

Add translated labels you can use from your code (i.e. error messages, field names and information).

Messages you add from this event are inserted into "Mobile Messages" and can be accessed from your custom code using the codeunit MobWmsLanguage.GetMessage('LabelName') function.

You may also overwrite existing messages:

  • Overwrite Mobile WMS Messages that already exists in Mobile Messages table
  • Overwrite labels used in the Android App Mobile Configuration Files (used as "@{LabelName}"). Adding a new message "LabelName" (without '@' or '{}') will overrule similar labels from Android App resource files.


Requirements

"Mobile Language Code" must be filled in on Mobile Users (2/10)

Your new eventsubscriber is executed when:

  1. ... you manually select the action "Create Messages" from "Mobile Language (7/10) -page with this event subscriber active
  2. ... a mobile user logs into the database and no "Mobile Messages" exists (usually only the first time a mobile user logs on)
  3. ... the Mobile WMS extension is upgraded


To ensure your new messages is always added, consider (also) adding the messages from your own Install-/Upgrade-codeunits


Template

    procedure OnAddMessages(_LanguageCode: Code[10]; var _Messages: Record "MOB Message")
    begin
    end;

Example

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Language", 'OnAddMessages''', true, true)]
    procedure MyOnAddMessages(_LanguageCode: Code[10]; var _Messages: Record "MOB Message")
    begin
        if _LanguageCode = 'ENU' then begin
            _Messages.Create('ENU''TESTCODE''My custom test translation');
            _Messages.Create('ENU''TESTCODE2''My custom test translation 2');
            _Messages.Create('ENU''SENDER''My replaced standard translation SENDER');
        end;
    end;


See also:

Filter by label

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

 

Version History

VersionChanges
MOB5.17Introduced
  • No labels