Use this event to
Excerpt |
---|
Add new custom messages (translations) or modify existing messages. |
Description
Add translated labels you can use as Error Messages or directly in the Mobile Configuration File as @{MyLabel} placeholdersfrom your custom backend code (i.e. Error messages and information). Messages you add from this event is inserted into the Mobile WMS Messages table.
You may also overwrite existing messages:
- Overwrite Mobile WMS Messages that already exists in Mobile WMS Message table
- Overwrite labels used in the Android App Mobile Configuration File (used as "@{LabelName}"). Adding a new message "LabelName" (with no '@' or '{}') will overrule messages from Android App resource files.
Requirements
"Mobile Language Code" must be present on the "Mobile User"
Your new eventsubscriber is executed when:
... you manually select the action "Create Messages" from "Mobile Language" page (after subscribing)
... a mobile user logs into the database and no "Mobile Messages" exists (usually only the first time a mobile user logs on)
... the Mobile WMS Application (BC App) is upgraded to a newer version
If you want to ensure your new messages is always added to an existing Mobile Wms installation, consider (also) adding the messages from your own Install-/Upgrade-codeunits in your customization app project instead.
Template
procedure OnAddMessages(_LanguageCode: Code[10]; var _Messages: Record "MOB Message")
begin
end;
Example
[EventSubscriber(ObjectType::Codeunit, Codeunit::"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 (Content by label) | ||||||||
---|---|---|---|---|---|---|---|---|
|
...