AppSourceCop Error AS0084

The ID range assigned to the extension must be within the allowed range

Description

The ID range assigned to the extension must be within the range allowed for AppSource applications.

Remarks

This rule validates that the ID range specified in the app.json of your extension is contained within the range allowed for AppSource application.

For more information about the object ID ranges in Business Central, see Object Ranges in Dynamics 365 Business Central.

For more information about the properties in the app.json file, see JSON Files.

How to fix this diagnostic?

If you are targeting the AppSource marketplace, you need to update the ID range in your app.json file with the one that Microsoft provided you with.

Note

If you are targeting the AppSource marketplace and do not have an ID range assigned, follow the steps defined in Get Started with Building Apps.

If you are not targeting the AppSource marketplace, you can suppress this rule using rulesets.

Code example triggering the rule

The ID range is outside the range allowed for AppSource applications

The app.json file of the extension:

{
   [...]
   "idRanges": [
    {
      "from": 50100,
      "to": 50149
    }
    [...]
  ]
}

The ID range specified is not contained in the range allowed for AppSource applications.

The ID range is not specified

The app.json file of the extension:

{
  [...]
}

If the ID range is not specified, the default ID range is used. As the default ID range spans outside the allowed ID range for AppSource applications, a diagnostic will be reported.

Code example not triggering the rule

The app.json file of the extension:

{
   [...]
   "idRanges": [
    {
      "from": 1000000,
      "to": 1000100
    }
    [...]
  ]
}

The ID range specified is included in the range allowed for AppSource applications.

See Also

AppSourceCop Analyzer
Get Started with AL
Developing Extensions