How is your experience with the OutSystems Community?
32
Views
7
Comments
order script
Question

Imagine an application where a Required Script is configured at the app level, while both a Screen and a Block also have their own Required Scripts. If the Block is included within the Screen, what would be the sequence in which the related JavaScript files are loaded in the browser during the Screen initialization process?




2026-06-20 17-43-43
Sherif El-Habibi
Champion

Hello @maged shokry,

The JavaScript files would be loaded in the following sequence during the Screen initialization process:

  1. Application/Module Required Scripts
  2. Block Required Scripts
  3. Screen Required Scripts

So, in your scenario:

  • The app-level Required Script loads first.
  • Then the Block’s Required Script loads (because the Block is part of the Screen).
  • Finally, the Screen’s own Required Script loads.

This follows the OutSystems documented execution order for Required Scripts.

2026-03-12 10-32-06
Wahaj Adil

hi @maged shokry , hope you're doing well.
Execution of JavaScripts : In runtime, JavaScript in O11 apps is executed in a specific order depending on where it was added. The order is as follows:

  1. Module required scripts
  2. Block required scripts
  3. Screen required scripts.

Thanks & regards!

UserImage.jpg
Prince Kumar

Hi @maged shokry 

Here is the JS loading sequence 

1. Module-level script

2. Block-level script 

3. Screen-level script 
You can checkout this 👉🏼 JS Code. 

2025-07-28 06-45-20
Rupesh Patil

hi @maged shokry 

Screen initialization process :

In OutSystems, the correct loading order is:

1)Application Required Script  

2)Block Required Script 

3)Screen Required Script

Explanation:

1)Application-level Required Script loads first because it is global and must be available throughout the application.

2)Block-level Required Script loads next because Blocks are rendered as part of the Screen content structure. During screen rendering, included Blocks are processed before the Screen's own initialization logic completes.

3)Screen-level Required Script loads last, after all child elements (including Blocks) have been prepared.

So if a Block is included inside a Screen, the browser initialization sequence becomes:

App - Block - Screen

This is the expected behavior in OutSystems screen initialization.

I hope this helps

Thanks


2026-02-25 07-20-39
P Anantha Raman

Hi @maged shokry


Attached image and Url for Javasript load sequence .
Link -  Outsystems Javascript sequence URL

 
Thanks 


2025-09-25 14-38-22
Lokesh Kumar Yadav


During Screen initialization, the JavaScript files are loaded in this sequence:


Application-level Required Script

Loaded first because it is global and available for the entire application.

Screen-level Required Script

Loaded next when the Screen starts initializing.

Block-level Required Script

2021-09-06 15-09-53
Dorine Boudry
 
MVP

@Lokesh Kumar Yadav ,

you are answering on a week old post that already had several answers, all the others are saying the same as each other and the same as the documentation.

Are you saying all of them AND the documentation is wrong ?

Dorine

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.