Code Monkey home page Code Monkey logo

Comments (3)

EmilDamsbo avatar EmilDamsbo commented on June 16, 2024

Hello, yes this is a new requirement as it is generally bad practice to use field IDs outside your defined ID ranges, as was pointed out by this issue: #7547

For a while we have had rules in AppSourceCop that does a similar job for the AppSource object ID range:
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0013
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0099

As the new PTE0022 and PTE0023 rules are both in pre-release, the documentation has not yet been updated with guidance on how to act on them. We invite you to share your perspective on the new rules so we might improve them if necessary.

from al.

ptrk-tr avatar ptrk-tr commented on June 16, 2024

While I agree that the rule in itself makes sense, I don't find it useful for the ID range 50.000 - 99.999 which is reserved for customizations. I assume extensions that use this ID range will only ever be developed for, and installed in one specific customers environment, so ID clashes with existing objects would most likely be apparent while developing these customizations as they'd be developed against these customers symbols.

As a general question, what is the best practice to put into the app.json for the valid ID range if I develop in the 50.000 - 99.999 range?

Last time I checked I could publish extensions with objects defined outside the license but within the specified valid object ID in the app.json, which then made problems as they couldn't be used at runtime, so I specified the valid ID range in the app.json to what the license allows me to do.

Asking because, theoretically I could be a small company with a license only including the ID range of 50.000 - 50.005 because generally I only need a couple of objects for customization, with the new rule I could also only add 5 fields into a table extension (if I specify the valid ID range in the app.json to my license object ID range).

So if I see this correctly I have three options:

  1. Define the valid ID range in the app.json to 50k-99.9k and run into the danger of publishing an extension including objects outside the valid ID range of my license.

  2. Define the valid ID range to just cover my license and then potentially be bound to restrict the number of fields in my table extensions to the valid range.

  3. Ignore the warning in the code cop and hope it won't turn into an error eventually.

What would be the best approach in this case?

from al.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.