SFDO-Community / declarative-lookup-rollup-summaries

Declarative Lookup Rollup Summaries (DLRS) is a community built and maintained Salesforce application that allows you to create cross object roll-ups declaratively - no code! For install instructions and documentation, visit our website https://sfdo-community-sprints.github.io/DLRS-Documentation/
https://sfdo-community-sprints.github.io/DLRS-Documentation/
BSD 3-Clause "New" or "Revised" License
683 stars 235 forks source link

Replace Schema describe with SOQL EntityDefinition/FieldDefinition-based validation #1378

Open sfenton3 opened 11 months ago

sfenton3 commented 11 months ago

Is your feature request related to a problem? Please describe. Potentially query the EntityDefinition and FieldDefinition SObject instead of global schema to avoid API dependencies and release problems.

Describe the solution you'd like If DLRS is at API Version 58 but the object is new in API Version 59, DLRS's current strategy is unable to validate that the object exists and rejects the rollup configuration save. DLRS should be able to determine the object exists even at higher API versions to allows users to create rollups before DLRS can provide an updated release.

Describe alternatives you've considered Apex can query the EntityDefinition and FieldDefinition SObjects. Using the data available here shouldn't be API gated and should allow confirmation of object names and fields without relying on Schema Definition methods.

Additional context https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_fielddefinition.htm https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_entitydefinition.htm