Develop custom pages
- Last UpdatedNov 01, 2024
- 1 minute read
When developing customized MES Web Portal pages, refer to the following notes:
Special characters in object names and identifiers
The following special characters that are used in SQL Server calls to the MES database should not be used for MES object names and IDs:
-
% (percent)
-
_ (underscore)
-
^ (carat)
-
[ or ] (square brackets)
MES objects can be a physical entity, a line, an item, a work order, a lot, an attribute or other objects that can be added to the MES database.
Using these characters can cause unexpected behavior when retrieving records from the MES database, such as missing or extra objects being returned.
Specifically, these special characters are used by SQL Server calls that use the LIKE operator. For more information about this operator and how these characters are used in a LIKE expression, see the LIKE (Transact-SQL) topic in the Microsoft SQL Reference document.
Update the Funcs.GetTranslations method for server-side string translations
Most of the MES Web Portal pages use the Funcs.GetTranslations method for string translations.
If any of the Web Portal pages have been customized, the method must be updated to pass the following required parameters: middlewareHost, token, languageId.
An example implementation is shown below.
@using MES.Web;
@{
int[] stringsToTranslate = { 15, 1053, 2489, 7736 };
var token = Request.Headers.Get("mes-token");
var middlewareHost = Request.Headers.Get("mes-middleware");
var languageId = Request.Headers.Get("mes-language");
var translatedStrings = Funcs.GetTranslations(middlewareHost, token,
languageId, stringsToTranslate);
}