Sunday, June 17, 2018

VS Code - Launch.Json and App.Json file parameters

Hello Friends,

This blog is content detail about all parameter detail about this 2 important configuration file.

Json Configuration Files

JSON stands for JavaScript Object Notation, which is a lightweight data interchange format, often used for storing and transporting data. In an AL project there are two JSON files: the app.json file and the launch.json file. These files are automatically created when you start a new AL project. These files are used to store configuration data about your AL project. The app.json file contains information about the extension you are building, such as publisher information, the name and the version of the extension.

Launch.json file

The launch.json is a configuration file that contains information about the server that the extension launches on. There are two configurations depending on whether the extension is published to a local server or to the cloud.


Let’s discuss some important and mandatory properties.

Publish to local server settings


Setting
Mandatory
Value
name
Yes
Name of your configuration, for example "Local dev server"
type
Yes
Must be set to “.al”. Required by Visual Studio Code
request                     
Yes
Must be set to “launch”. Required by Visual Studio Code
server
Yes
The HTTP URL of your server, for example “http://localhost”
serverInstance
Yes
The instance name of your server, for example: “D365”
authentication
Yes
Specified the server authentication method
startupObjectId
Yes
Specified the ID of the object to open after publishing. Only objects of type Page and Table are currently supported
startupObjectType
Yes
Specifies with type of object to open after publishing. This is used in combination with the setting “startupObjectId”. Only objects of type Page and Table are currently supported
schemaUpdateMode
No
Specifies the data synchronization mode when you publish an extension to the development server: "Synchronize” or “Recreate". The default value is Synchronize. With Synchronize the existing data is kept, while Recreate will delete the existing data.

Publish to cloud settings

Setting
Mandatory
Value
name
Yes
Name of your configuration, for example "Local dev server"
type
Yes
Must be set to “.al”. Required by Visual Studio Code
request
Yes
Must be set to “launch”. Required by Visual Studio Code
serverInstance
Yes
The instance name of your server, for example: “US”
startupObjectId
Yes
Specified the ID of the object to open after publishing. Only objects of type Page and Table are currently supported
startupObjectType
Yes
Specifies with type of object to open after publishing. This is used in combination with the setting “startupObjectId”. Only objects of type Page and Table are currently supported

App.json file 

The app.json file contains information about the extension that you are building, such as publisher information, name and the minimum supported version. Often the app.json file is referred to as the manifest.


Setting
Mandatory
Value
id
Yes
The unique ID of the extension. When the app.json file is automatically created, the ID is set to a new GUID value
name
Yes
The unique extension name
publisher
Yes
The publisher name
brief
No*
Short description of the extension
description
No*
Longer description of the extension
version
Yes
The version of the app package
platform
Yes
The minimum supported version of the platform symbol package file
application
Yes
The minimum supported version, for example “application”: “11.0.0.0”
idRange
Yes
A range for application object IDs. Objects outside the range will raise a compilation error. A new ID is automatically suggested. The allowed range is provided to you from Microsoft.

* Required for AppSource submission 
JSON stands for JavaScript Object Notation, which is a lightweight data interchange format, often used for storing and transporting data. In an AL project there are two JSON files: the app.json file and the launch.json file. These files are automatically created when you start a new AL project. These files are used to store configuration data about your AL project. The app.json file contains information about the extension you are building, such as publisher information, the name and the version of the extension.

Launch.json file

The launch.json is a configuration file that contains information about the server that the extension launches on. There are two configurations depending on whether the extension is published to a local server or to the cloud.

No comments:

Post a Comment