Editar

Compartilhar via


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're 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're targeting the AppSource marketplace and don't have an ID range assigned, follow the steps defined in Get started with building apps.

If you aren't 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 isn't contained in the range allowed for AppSource applications.

The ID range isn't 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.

AppSourceCop Analyzer
Get Started with AL
Developing Extensions