{"title":"Scripts Property","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-scripts-property/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-scripts-property, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-scripts-property","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Specifies the list of scripts to include in the control add-in.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Applies to","slug":"applies-to","at":242,"chars":30},{"level":2,"title":"Property values","slug":"property-values","at":272,"chars":353},{"level":2,"title":"Remarks","slug":"remarks","at":625,"chars":565},{"level":2,"title":"Syntax example","slug":"syntax-example","at":1190,"chars":143},{"level":2,"title":"Scripts paths on control add-ins can be relative to the control add-in source file","slug":"scripts-paths-on-control-add-ins-can-be-relative-to-the-control-add-in-source-file","at":1333,"chars":1527},{"level":3,"title":"Organizing resources example","slug":"organizing-resources-example","at":2208,"chars":652},{"level":2,"title":"Related information","slug":"related-information","at":2860,"chars":76}],"text":"> Version: _Available or changed with runtime version 1.0._\nSpecifies the list of scripts to include in the control add-in. The scripts could be local files in the package or references to external files using the http or the https protocol.\n## Applies to\n Control Add In\n## Property values\nA list of comma-separated strings that represent paths to script files. The default is blank, with no scripts being used by the control add-in.\nYou can specify multiple files within the same path string by using a combination of a valid literal path and wildcard characters (* and ?). However, it doesn't support regular expressions.\n## Remarks\nAlthough this property is optional, the control add-in must either specify the StartupScript property or specify one or more scripts. Scripts can be either external resources referenced using a URL or can be embedded within the extension. Embedded script files must be added to the extension project folder in Visual Studio Code and referenced using a relative path. For security and usability reasons, it's recommended to reference any external scripts by using the HTTPS protocol. Scripts are loaded immediately when the control add-in is initialized.\n## Syntax example\n```al\nScripts = 'https://code.jquery.com/jquery-2.1.0.min.js',\n              'js/main.js',\n              'scripts/*.js';\n```\n## Scripts paths on control add-ins can be relative to the control add-in source file\n> APPLIES TO: Business Central 2024 release wave 1 and later\nStarting from runtime 13, you can store control add-in resources in a location relative to the file that contains the source code of the control add-in. This provides more flexibility in organizing and locating control add-in resources.\nWhen the system needs to locate these resources, it follows a specific search order; first, it looks for the resources in a location relative to the root of the project. If the resources aren't found there, it then searches in a location relative to the source file of the control add-in.\nThe following example shows the two options for organizing control add-in resources; scripts, images, and stylesheets. For the file MyControlAddIn.al, the resources are organized in two different ways.\n### Organizing resources example\nFor the file MyControlAddIn.al.\n```al\ncontroladdin MyControlAddIn\n{\n    Scripts = './js/myscript.js';\n    Images = './images/myimage.png';\n    StyleSheets = 'css/mystyle.css';\n    ...\n}\n```\nThe resources are relative to the project root:\n```\n.\n[src]\n    MyControlAddIn.al\n[resources]\n    [js]\n        myscript.js\n    [png]\n        myimage.png\n    [css]\n        mystyle.css\napp.json\n```\nThe resources are relative to the control add-in source:\n```\n.\n[src]\n    MyControlAddIn.al\n    [resources]\n        [js]\n            myscript.js\n        [png]\n            myimage.png\n        [css]\n            mystyle.css\napp.json\n```\n## Related information\nControl add-in object<../devenv-control-addin-object>"}