
If you’re working with code in Creatio Freedom UI pages and using request handlers with arrow functions, async/await, etc, you’re likely seeing Javascript warnings in the code editor. What I am referring to is the following:
By default, the editor is validating for a version of Javascript that doesn’t support things like async functions, await, const, arrow functions, optional chaining, etc. You can tell the editor to use the correct ES version for validating your code for a Freedom UI Page by adding this comment to the very top of the code:
/* jshint esversion: 11 */
The complete top of the client schema will now look as follows:
/* jshint esversion: 11 */ define("Accounts_FormPage", /**SCHEMA_DEPS*/["@creatio-devkit/common"]/**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/(sdk)/**SCHEMA_ARGS*/ { return { viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/[ //.../
This tells the editor to allow for that type of syntax. There will no longer be warnings displayed and you’ll still get the warnings/errors for invalid Javascript.
IMPORTANT NOTE: Current versions of Creatio (as of 8.0.6) will lose this comment at the top of the code anytime the page is saved in the page editor. Every time you reopen the code file. Hoping this gets fixed/addressed in a future release – and also added as a default in Freedom UI page schemas.
Subscribe To Our Newsletter
Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!
You have Successfully Subscribed!