Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Localize message in a JavaScript Business Rule

Hi.

I need to show a result.focus message to the user from a JavaScript business rule. It works fine if I put the message straight into the method call:


var fieldValue = [Length];
if (fieldValue > 153600) {
// prevent the default action processing
this.preventDefault();

// popup alert
this.result.focus('Length', 'Picture is too big.');
}


However, if I try to localize it using a token, it doesn't seem to work:


var fieldValue = [Length];
if (fieldValue > 153600) {
// prevent the default action processing
this.preventDefault();

// popup alert
this.result.focus('Length', '{0}', localizer.replace('LocalizationToken', 'Picture is too big.'));
}


Is there a way to localize a message in a JavaScript business rule?

Thanks in advance.

Ivan
(COT 8.7.13.0, Unlimited, TouchUI, SPA)
1 person has
this question
+1
Reply