Getting Resource Strings in Code on a Creatio Freedom UI Page

There are many cases where you need to get a localizable resource string in code on a Freedom UI page. For example, displaying prompts to the user. This is a simple thing, however, this article should clear uo any doubts of how to retrieve them in page requests.

In this scenario, I have a resource string with a code value of “MyMessageText”. I can retrieve this string in code when executing requests by using the $context included in the request. The code will look as follows:

const msg = await request.$context.Resources.Strings.MyMessageText;

 

Want content like this delivered to your inbox? Sign up for our newsletter!
ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

Submit a Comment

Your email address will not be published. Required fields are marked *