Custom JavaScript in Business Process Forms can now make requests to external APIs and services where cross-origin resource sharing (CORS) is enabled. This means forms can retrieve data from an outside system and use that data in the form experience. For example, a form could fetch address suggestions from an external API in the background and use the results to update form options.
To use this capability, the target server must be configured to allow CORS requests from the appropriate Laserfiche sandbox domain for your region:
-
United States: sandbox-forms.laserfiche.com
-
Canada: sandbox-forms.laserfiche.ca
-
EU: sandbox-forms.eu.laserfiche.com
Custom JavaScript continues to run in a protected sandbox, separate from the main Laserfiche application. This helps protect user sessions and prevents scripts from accessing application cookies or local storage.
For setup details and an example script, see the documentation: Custom JavaScript with CORS Requests in Business Process Forms.